From 812c045c44cf400b80cf4d01c0c3337fa77581af Mon Sep 17 00:00:00 2001 From: Kevin Liu Date: Wed, 25 Feb 2026 10:17:08 -0800 Subject: [PATCH 1/4] dont read local env and config --- bindings/python/tests/conftest.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/bindings/python/tests/conftest.py b/bindings/python/tests/conftest.py index 75ee3f36a3..db672c7335 100644 --- a/bindings/python/tests/conftest.py +++ b/bindings/python/tests/conftest.py @@ -25,6 +25,7 @@ import pytest from pydantic_core import to_json +from pyiceberg.utils.config import Config from pyiceberg.partitioning import PartitionField, PartitionSpec from pyiceberg.schema import Schema @@ -36,6 +37,20 @@ ) +@pytest.fixture(scope="session", autouse=True) +def isolate_pyiceberg_config() -> Generator[None, None, None]: + monkeypatch = pytest.MonkeyPatch() + with TemporaryDirectory() as empty_home_dir: + monkeypatch.setenv("HOME", empty_home_dir) + monkeypatch.setenv("PYICEBERG_HOME", empty_home_dir) + + import pyiceberg.catalog as catalog + + monkeypatch.setattr(catalog, "_ENV_CONFIG", Config()) + yield + monkeypatch.undo() + + @pytest.fixture(scope="session") def avro_schema_manifest_entry() -> Dict[str, Any]: return { From 7926c44f5f658bb158f1d4bc3842e87b308eedd5 Mon Sep 17 00:00:00 2001 From: Kevin Liu Date: Wed, 25 Feb 2026 10:17:18 -0800 Subject: [PATCH 2/4] ci warning should error --- bindings/python/pyproject.toml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bindings/python/pyproject.toml b/bindings/python/pyproject.toml index 38efa00b34..9f62b5716d 100644 --- a/bindings/python/pyproject.toml +++ b/bindings/python/pyproject.toml @@ -51,6 +51,11 @@ include = [ [tool.ruff.lint] ignore = ["F403", "F405"] +[tool.pytest.ini_options] +filterwarnings = [ + "error", +] + [dependency-groups] dev = [ "maturin>=1.0,<2.0", From 75fc3f082c0276b356e470a668c5c32822f97d46 Mon Sep 17 00:00:00 2001 From: Kevin Liu Date: Wed, 25 Feb 2026 10:17:42 -0800 Subject: [PATCH 3/4] make install should also install pyiceberg-core --- bindings/python/Makefile | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/bindings/python/Makefile b/bindings/python/Makefile index c36a1091dd..0e8b9632dc 100644 --- a/bindings/python/Makefile +++ b/bindings/python/Makefile @@ -15,12 +15,15 @@ # specific language governing permissions and limitations # under the License. - -install: - uv sync --group dev --no-install-project +.PHONY: build install test build: uv run maturin develop +# uv sync may remove local editable pyiceberg-core, so install rebuilds it afterwards. +install: + uv sync --group dev --no-install-project + $(MAKE) build + test: uv run --no-sync pytest From 99beea64341e0c893901f200e66851645a3bdc42 Mon Sep 17 00:00:00 2001 From: Kevin Liu Date: Wed, 25 Feb 2026 10:22:33 -0800 Subject: [PATCH 4/4] replace deprecation --- bindings/python/tests/test_datafusion_table_provider.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bindings/python/tests/test_datafusion_table_provider.py b/bindings/python/tests/test_datafusion_table_provider.py index 915b787697..3b2d881e18 100644 --- a/bindings/python/tests/test_datafusion_table_provider.py +++ b/bindings/python/tests/test_datafusion_table_provider.py @@ -106,7 +106,7 @@ def test_register_iceberg_table_provider( ) ctx = SessionContext() - ctx.register_table_provider("test", iceberg_table_provider) + ctx.register_table("test", iceberg_table_provider) datafusion_table = ctx.table("test") assert datafusion_table is not None @@ -154,7 +154,7 @@ def __datafusion_table_provider__(self): ) ctx = SessionContext() - ctx.register_table_provider("test", iceberg_table) + ctx.register_table("test", iceberg_table) datafusion_table = ctx.table("test") assert datafusion_table is not None