From 9e2cbe870b617c4052b1731d6a44d7b43f6d067f Mon Sep 17 00:00:00 2001 From: Arjun Sharma Date: Tue, 6 Oct 2026 22:29:24 +0000 Subject: [PATCH] task template: import sqlite3 before pandas so pytest-cov loads In some task images pandas loads the system libstdc++ first, and the env's libicu (needed by sqlite3, which coverage imports) then fails with CXXABI_1.3.15 not found. pytest.main raised, and the runner recorded no tests. --- .../template/tests/jinja_patch_plugin_pandas.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/datasmith/harbor_adapter/template/tests/jinja_patch_plugin_pandas.py b/src/datasmith/harbor_adapter/template/tests/jinja_patch_plugin_pandas.py index e06a8c56..4a719a00 100644 --- a/src/datasmith/harbor_adapter/template/tests/jinja_patch_plugin_pandas.py +++ b/src/datasmith/harbor_adapter/template/tests/jinja_patch_plugin_pandas.py @@ -1,6 +1,12 @@ import importlib import pathlib +# Load the env's libstdc++ (through sqlite3's libicu) before pandas can load the older system one; otherwise pytest-cov fails to import. +try: + import sqlite3 # noqa: F401 +except Exception: + pass + def _patch_jinja_package_loader() -> None: try: