From 7abb67a3f5b6da49c3cacef9401a0babea44d080 Mon Sep 17 00:00:00 2001 From: Kevin Liu Date: Sun, 22 Feb 2026 12:31:27 -0800 Subject: [PATCH 1/7] remove direct import in conftest --- tests/conftest.py | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/tests/conftest.py b/tests/conftest.py index 5c85f49a77..499095d3e6 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -49,10 +49,8 @@ from pytest_lazy_fixtures import lf from pyiceberg.catalog import Catalog, load_catalog -from pyiceberg.catalog.bigquery_metastore import BigQueryMetastoreCatalog from pyiceberg.catalog.dynamodb import DynamoDbCatalog from pyiceberg.catalog.glue import GlueCatalog -from pyiceberg.catalog.hive import HiveCatalog from pyiceberg.catalog.memory import InMemoryCatalog from pyiceberg.catalog.noop import NoopCatalog from pyiceberg.catalog.rest import RestCatalog @@ -3154,7 +3152,7 @@ def test_table_properties() -> dict[str, str]: def does_support_purge_table(catalog: Catalog) -> bool: if isinstance(catalog, RestCatalog): return property_as_bool(catalog.properties, "supports_purge_table", True) - if isinstance(catalog, (HiveCatalog, NoopCatalog)): + if _has_catalog_class_name(catalog, "HiveCatalog") or isinstance(catalog, NoopCatalog): return False return True @@ -3162,7 +3160,7 @@ def does_support_purge_table(catalog: Catalog) -> bool: def does_support_atomic_concurrent_updates(catalog: Catalog) -> bool: if isinstance(catalog, RestCatalog): return property_as_bool(catalog.properties, "supports_atomic_concurrent_updates", True) - if isinstance(catalog, (HiveCatalog, NoopCatalog)): + if _has_catalog_class_name(catalog, "HiveCatalog") or isinstance(catalog, NoopCatalog): return False return True @@ -3170,7 +3168,9 @@ def does_support_atomic_concurrent_updates(catalog: Catalog) -> bool: def does_support_nested_namespaces(catalog: Catalog) -> bool: if isinstance(catalog, RestCatalog): return property_as_bool(catalog.properties, "supports_nested_namespaces", True) - if isinstance(catalog, (HiveCatalog, NoopCatalog, GlueCatalog, BigQueryMetastoreCatalog, DynamoDbCatalog)): + if _has_catalog_class_name(catalog, "HiveCatalog", "BigQueryMetastoreCatalog") or isinstance( + catalog, (NoopCatalog, GlueCatalog, DynamoDbCatalog) + ): return False return True @@ -3178,7 +3178,7 @@ def does_support_nested_namespaces(catalog: Catalog) -> bool: def does_support_schema_evolution(catalog: Catalog) -> bool: if isinstance(catalog, RestCatalog): return property_as_bool(catalog.properties, "supports_schema_evolution", True) - if isinstance(catalog, (HiveCatalog, NoopCatalog)): + if _has_catalog_class_name(catalog, "HiveCatalog") or isinstance(catalog, NoopCatalog): return False return True @@ -3186,7 +3186,7 @@ def does_support_schema_evolution(catalog: Catalog) -> bool: def does_support_slash_in_identifier(catalog: Catalog) -> bool: if isinstance(catalog, RestCatalog): return property_as_bool(catalog.properties, "supports_slash_in_identifier", True) - if isinstance(catalog, (HiveCatalog, NoopCatalog, SqlCatalog)): + if _has_catalog_class_name(catalog, "HiveCatalog") or isinstance(catalog, (NoopCatalog, SqlCatalog)): return False return True @@ -3194,6 +3194,10 @@ def does_support_slash_in_identifier(catalog: Catalog) -> bool: def does_support_dot_in_identifier(catalog: Catalog) -> bool: if isinstance(catalog, RestCatalog): return property_as_bool(catalog.properties, "supports_dot_in_identifier", True) - if isinstance(catalog, (HiveCatalog, NoopCatalog, SqlCatalog)): + if _has_catalog_class_name(catalog, "HiveCatalog") or isinstance(catalog, (NoopCatalog, SqlCatalog)): return False return True + + +def _has_catalog_class_name(catalog: Catalog, *class_names: str) -> bool: + return any(base.__name__ in class_names for base in type(catalog).__mro__) From 223b1c7621d24f5ab1e66d86bb4f6ebf99fbd1cd Mon Sep 17 00:00:00 2001 From: Kevin Liu Date: Sun, 22 Feb 2026 12:32:10 -0800 Subject: [PATCH 2/7] add ci smoke test --- .github/workflows/pypi-build-artifacts.yml | 2 ++ .github/workflows/python-ci.yml | 23 ++++++++++++++++++++++ 2 files changed, 25 insertions(+) diff --git a/.github/workflows/pypi-build-artifacts.yml b/.github/workflows/pypi-build-artifacts.yml index da282c6b46..230209a988 100644 --- a/.github/workflows/pypi-build-artifacts.yml +++ b/.github/workflows/pypi-build-artifacts.yml @@ -71,6 +71,8 @@ jobs: # Ignore 32 bit architectures CIBW_ARCHS: "auto64" CIBW_PROJECT_REQUIRES_PYTHON: ">=3.10,<3.14" + # Keep these in sync with Python CI job `cibw-dev-env-smoke-test` + # in .github/workflows/python-ci.yml to catch import-time regressions early. CIBW_BEFORE_TEST: "uv sync --directory {project} --only-group dev --no-install-project" CIBW_TEST_COMMAND: "uv run --directory {project} pytest tests/avro/test_decoder.py" # Skip free-threaded (PEP 703) builds until we evaluate decoder_fast support diff --git a/.github/workflows/python-ci.yml b/.github/workflows/python-ci.yml index ddc71d174b..fd25c2aeed 100644 --- a/.github/workflows/python-ci.yml +++ b/.github/workflows/python-ci.yml @@ -200,3 +200,26 @@ jobs: merge-multiple: true - name: Generate coverage report (75%) # Coverage threshold should only increase over time — never decrease it! run: COVERAGE_FAIL_UNDER=75 make coverage-report + + cibw-dev-env-smoke-test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + - uses: actions/setup-python@v6 + with: + python-version: '3.12' + - name: Install UV + uses: astral-sh/setup-uv@v7 + with: + enable-cache: true + # Why this exists: + # Catch import-time regressions (e.g., global conftest optional deps) + # in the same dev-only environment used by cibuildwheel wheel tests. + # Keep this in sync with wheel build test setup in + # .github/workflows/pypi-build-artifacts.yml: + # CIBW_BEFORE_TEST: uv sync --directory {project} --only-group dev --no-install-project + # CIBW_TEST_COMMAND: uv run --directory {project} pytest tests/avro/test_decoder.py + - name: Mirror wheel CIBW_BEFORE_TEST + run: uv sync --directory . --only-group dev --no-install-project + - name: Mirror wheel CIBW_TEST_COMMAND (collection only) + run: uv run --directory . pytest --collect-only tests/avro/test_decoder.py -q From ed2a46583ac577336b7154bbdf3efb3690fc304e Mon Sep 17 00:00:00 2001 From: Kevin Liu Date: Sun, 22 Feb 2026 12:39:34 -0800 Subject: [PATCH 3/7] revert --- tests/conftest.py | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/tests/conftest.py b/tests/conftest.py index 499095d3e6..5c85f49a77 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -49,8 +49,10 @@ from pytest_lazy_fixtures import lf from pyiceberg.catalog import Catalog, load_catalog +from pyiceberg.catalog.bigquery_metastore import BigQueryMetastoreCatalog from pyiceberg.catalog.dynamodb import DynamoDbCatalog from pyiceberg.catalog.glue import GlueCatalog +from pyiceberg.catalog.hive import HiveCatalog from pyiceberg.catalog.memory import InMemoryCatalog from pyiceberg.catalog.noop import NoopCatalog from pyiceberg.catalog.rest import RestCatalog @@ -3152,7 +3154,7 @@ def test_table_properties() -> dict[str, str]: def does_support_purge_table(catalog: Catalog) -> bool: if isinstance(catalog, RestCatalog): return property_as_bool(catalog.properties, "supports_purge_table", True) - if _has_catalog_class_name(catalog, "HiveCatalog") or isinstance(catalog, NoopCatalog): + if isinstance(catalog, (HiveCatalog, NoopCatalog)): return False return True @@ -3160,7 +3162,7 @@ def does_support_purge_table(catalog: Catalog) -> bool: def does_support_atomic_concurrent_updates(catalog: Catalog) -> bool: if isinstance(catalog, RestCatalog): return property_as_bool(catalog.properties, "supports_atomic_concurrent_updates", True) - if _has_catalog_class_name(catalog, "HiveCatalog") or isinstance(catalog, NoopCatalog): + if isinstance(catalog, (HiveCatalog, NoopCatalog)): return False return True @@ -3168,9 +3170,7 @@ def does_support_atomic_concurrent_updates(catalog: Catalog) -> bool: def does_support_nested_namespaces(catalog: Catalog) -> bool: if isinstance(catalog, RestCatalog): return property_as_bool(catalog.properties, "supports_nested_namespaces", True) - if _has_catalog_class_name(catalog, "HiveCatalog", "BigQueryMetastoreCatalog") or isinstance( - catalog, (NoopCatalog, GlueCatalog, DynamoDbCatalog) - ): + if isinstance(catalog, (HiveCatalog, NoopCatalog, GlueCatalog, BigQueryMetastoreCatalog, DynamoDbCatalog)): return False return True @@ -3178,7 +3178,7 @@ def does_support_nested_namespaces(catalog: Catalog) -> bool: def does_support_schema_evolution(catalog: Catalog) -> bool: if isinstance(catalog, RestCatalog): return property_as_bool(catalog.properties, "supports_schema_evolution", True) - if _has_catalog_class_name(catalog, "HiveCatalog") or isinstance(catalog, NoopCatalog): + if isinstance(catalog, (HiveCatalog, NoopCatalog)): return False return True @@ -3186,7 +3186,7 @@ def does_support_schema_evolution(catalog: Catalog) -> bool: def does_support_slash_in_identifier(catalog: Catalog) -> bool: if isinstance(catalog, RestCatalog): return property_as_bool(catalog.properties, "supports_slash_in_identifier", True) - if _has_catalog_class_name(catalog, "HiveCatalog") or isinstance(catalog, (NoopCatalog, SqlCatalog)): + if isinstance(catalog, (HiveCatalog, NoopCatalog, SqlCatalog)): return False return True @@ -3194,10 +3194,6 @@ def does_support_slash_in_identifier(catalog: Catalog) -> bool: def does_support_dot_in_identifier(catalog: Catalog) -> bool: if isinstance(catalog, RestCatalog): return property_as_bool(catalog.properties, "supports_dot_in_identifier", True) - if _has_catalog_class_name(catalog, "HiveCatalog") or isinstance(catalog, (NoopCatalog, SqlCatalog)): + if isinstance(catalog, (HiveCatalog, NoopCatalog, SqlCatalog)): return False return True - - -def _has_catalog_class_name(catalog: Catalog, *class_names: str) -> bool: - return any(base.__name__ in class_names for base in type(catalog).__mro__) From fe98f8418a3a8141dd3868bcdb8a670934d1e0ec Mon Sep 17 00:00:00 2001 From: Kevin Liu Date: Sun, 22 Feb 2026 12:40:54 -0800 Subject: [PATCH 4/7] include google-cloud-bigquery in dev dep --- pyproject.toml | 1 + uv.lock | 2 ++ 2 files changed, 3 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 00d4a9c56e..3c6624dc7d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -118,6 +118,7 @@ dev = [ "docutils!=0.21.post1", "mypy-boto3-glue>=1.28.18", "mypy-boto3-dynamodb>=1.28.18", + "google-cloud-bigquery>=3.33.0,<4", "pyarrow-stubs>=20.0.0.20251107", # Remove when pyarrow >= 23.0.0 https://github.com/apache/arrow/pull/47609 "sqlalchemy>=2.0.18,<3", ] diff --git a/uv.lock b/uv.lock index 46fbc8002d..01da16cfff 100644 --- a/uv.lock +++ b/uv.lock @@ -4539,6 +4539,7 @@ dev = [ { name = "deptry" }, { name = "docutils" }, { name = "fastavro" }, + { name = "google-cloud-bigquery" }, { name = "moto", extra = ["server"] }, { name = "mypy-boto3-dynamodb" }, { name = "mypy-boto3-glue" }, @@ -4628,6 +4629,7 @@ dev = [ { name = "deptry", specifier = ">=0.14,<0.25" }, { name = "docutils", specifier = "!=0.21.post1" }, { name = "fastavro", specifier = "==1.12.1" }, + { name = "google-cloud-bigquery", specifier = ">=3.33.0,<4" }, { name = "moto", extras = ["server"], specifier = ">=5.0.2,<6" }, { name = "mypy-boto3-dynamodb", specifier = ">=1.28.18" }, { name = "mypy-boto3-glue", specifier = ">=1.28.18" }, From b49282a066130d26a7f5e90ce874d619cf01ea66 Mon Sep 17 00:00:00 2001 From: Kevin Liu Date: Sun, 22 Feb 2026 12:51:34 -0800 Subject: [PATCH 5/7] run the same command --- .github/workflows/python-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python-ci.yml b/.github/workflows/python-ci.yml index fd25c2aeed..fadce41b11 100644 --- a/.github/workflows/python-ci.yml +++ b/.github/workflows/python-ci.yml @@ -221,5 +221,5 @@ jobs: # CIBW_TEST_COMMAND: uv run --directory {project} pytest tests/avro/test_decoder.py - name: Mirror wheel CIBW_BEFORE_TEST run: uv sync --directory . --only-group dev --no-install-project - - name: Mirror wheel CIBW_TEST_COMMAND (collection only) - run: uv run --directory . pytest --collect-only tests/avro/test_decoder.py -q + - name: Mirror wheel CIBW_TEST_COMMAND + run: uv run --directory . pytest tests/avro/test_decoder.py From de212885ff3c757ad96ece671269b8bc7de75519 Mon Sep 17 00:00:00 2001 From: Kevin Liu Date: Sun, 22 Feb 2026 12:52:55 -0800 Subject: [PATCH 6/7] inline imports --- tests/conftest.py | 95 ++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 78 insertions(+), 17 deletions(-) diff --git a/tests/conftest.py b/tests/conftest.py index 5c85f49a77..106dc06913 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -49,14 +49,6 @@ from pytest_lazy_fixtures import lf from pyiceberg.catalog import Catalog, load_catalog -from pyiceberg.catalog.bigquery_metastore import BigQueryMetastoreCatalog -from pyiceberg.catalog.dynamodb import DynamoDbCatalog -from pyiceberg.catalog.glue import GlueCatalog -from pyiceberg.catalog.hive import HiveCatalog -from pyiceberg.catalog.memory import InMemoryCatalog -from pyiceberg.catalog.noop import NoopCatalog -from pyiceberg.catalog.rest import RestCatalog -from pyiceberg.catalog.sql import SqlCatalog from pyiceberg.expressions import BoundReference from pyiceberg.io import ( ADLS_ACCOUNT_KEY, @@ -2497,6 +2489,8 @@ def warehouse(tmp_path_factory: pytest.TempPathFactory) -> Path: @pytest.fixture def table_v1(example_table_metadata_v1: dict[str, Any]) -> Table: + from pyiceberg.catalog.noop import NoopCatalog + table_metadata = TableMetadataV1(**example_table_metadata_v1) return Table( identifier=("database", "table"), @@ -2509,6 +2503,8 @@ def table_v1(example_table_metadata_v1: dict[str, Any]) -> Table: @pytest.fixture def table_v2(example_table_metadata_v2: dict[str, Any]) -> Table: + from pyiceberg.catalog.noop import NoopCatalog + table_metadata = TableMetadataV2(**example_table_metadata_v2) return Table( identifier=("database", "table"), @@ -2521,6 +2517,8 @@ def table_v2(example_table_metadata_v2: dict[str, Any]) -> Table: @pytest.fixture def table_v3(example_table_metadata_v3: dict[str, Any]) -> Table: + from pyiceberg.catalog.noop import NoopCatalog + table_metadata = TableMetadataV3(**example_table_metadata_v3) return Table( identifier=("database", "table"), @@ -2535,6 +2533,8 @@ def table_v3(example_table_metadata_v3: dict[str, Any]) -> Table: def table_v2_orc(example_table_metadata_v2: dict[str, Any]) -> Table: import copy + from pyiceberg.catalog.noop import NoopCatalog + metadata_dict = copy.deepcopy(example_table_metadata_v2) if not metadata_dict["properties"]: metadata_dict["properties"] = {} @@ -2553,6 +2553,8 @@ def table_v2_orc(example_table_metadata_v2: dict[str, Any]) -> Table: def table_v2_with_fixed_and_decimal_types( table_metadata_v2_with_fixed_and_decimal_types: dict[str, Any], ) -> Table: + from pyiceberg.catalog.noop import NoopCatalog + table_metadata = TableMetadataV2( **table_metadata_v2_with_fixed_and_decimal_types, ) @@ -2567,6 +2569,8 @@ def table_v2_with_fixed_and_decimal_types( @pytest.fixture def table_v2_with_extensive_snapshots(example_table_metadata_v2_with_extensive_snapshots: dict[str, Any]) -> Table: + from pyiceberg.catalog.noop import NoopCatalog + table_metadata = TableMetadataV2(**example_table_metadata_v2_with_extensive_snapshots) return Table( identifier=("database", "table"), @@ -2579,6 +2583,8 @@ def table_v2_with_extensive_snapshots(example_table_metadata_v2_with_extensive_s @pytest.fixture def table_v2_with_statistics(table_metadata_v2_with_statistics: dict[str, Any]) -> Table: + from pyiceberg.catalog.noop import NoopCatalog + table_metadata = TableMetadataV2(**table_metadata_v2_with_statistics) return Table( identifier=("database", "table"), @@ -3000,11 +3006,15 @@ def ray_session() -> Generator[Any, None, None]: # Catalog fixtures -def _create_memory_catalog(name: str, warehouse: Path) -> InMemoryCatalog: +def _create_memory_catalog(name: str, warehouse: Path) -> Catalog: + from pyiceberg.catalog.memory import InMemoryCatalog + return InMemoryCatalog(name, warehouse=f"file://{warehouse}") -def _create_sql_catalog(name: str, warehouse: Path) -> SqlCatalog: +def _create_sql_catalog(name: str, warehouse: Path) -> Catalog: + from pyiceberg.catalog.sql import SqlCatalog + catalog = SqlCatalog( name, uri="sqlite:///:memory:", @@ -3014,7 +3024,9 @@ def _create_sql_catalog(name: str, warehouse: Path) -> SqlCatalog: return catalog -def _create_sql_without_rowcount_catalog(name: str, warehouse: Path) -> SqlCatalog: +def _create_sql_without_rowcount_catalog(name: str, warehouse: Path) -> Catalog: + from pyiceberg.catalog.sql import SqlCatalog + props = { "uri": f"sqlite:////{warehouse}/sql-catalog", "warehouse": f"file://{warehouse}", @@ -3152,48 +3164,97 @@ def test_table_properties() -> dict[str, str]: def does_support_purge_table(catalog: Catalog) -> bool: + from pyiceberg.catalog.noop import NoopCatalog + from pyiceberg.catalog.rest import RestCatalog + if isinstance(catalog, RestCatalog): return property_as_bool(catalog.properties, "supports_purge_table", True) - if isinstance(catalog, (HiveCatalog, NoopCatalog)): + from pyiceberg.catalog.hive import HiveCatalog + + if isinstance(catalog, HiveCatalog): + return False + if isinstance(catalog, NoopCatalog): return False return True def does_support_atomic_concurrent_updates(catalog: Catalog) -> bool: + from pyiceberg.catalog.noop import NoopCatalog + from pyiceberg.catalog.rest import RestCatalog + if isinstance(catalog, RestCatalog): return property_as_bool(catalog.properties, "supports_atomic_concurrent_updates", True) - if isinstance(catalog, (HiveCatalog, NoopCatalog)): + from pyiceberg.catalog.hive import HiveCatalog + + if isinstance(catalog, HiveCatalog): + return False + if isinstance(catalog, NoopCatalog): return False return True def does_support_nested_namespaces(catalog: Catalog) -> bool: + from pyiceberg.catalog.dynamodb import DynamoDbCatalog + from pyiceberg.catalog.glue import GlueCatalog + from pyiceberg.catalog.noop import NoopCatalog + from pyiceberg.catalog.rest import RestCatalog + if isinstance(catalog, RestCatalog): return property_as_bool(catalog.properties, "supports_nested_namespaces", True) - if isinstance(catalog, (HiveCatalog, NoopCatalog, GlueCatalog, BigQueryMetastoreCatalog, DynamoDbCatalog)): + from pyiceberg.catalog.bigquery_metastore import BigQueryMetastoreCatalog + from pyiceberg.catalog.hive import HiveCatalog + + if isinstance(catalog, HiveCatalog): + return False + if isinstance(catalog, BigQueryMetastoreCatalog): + return False + if isinstance(catalog, (NoopCatalog, GlueCatalog, DynamoDbCatalog)): return False return True def does_support_schema_evolution(catalog: Catalog) -> bool: + from pyiceberg.catalog.noop import NoopCatalog + from pyiceberg.catalog.rest import RestCatalog + if isinstance(catalog, RestCatalog): return property_as_bool(catalog.properties, "supports_schema_evolution", True) - if isinstance(catalog, (HiveCatalog, NoopCatalog)): + from pyiceberg.catalog.hive import HiveCatalog + + if isinstance(catalog, HiveCatalog): + return False + if isinstance(catalog, NoopCatalog): return False return True def does_support_slash_in_identifier(catalog: Catalog) -> bool: + from pyiceberg.catalog.noop import NoopCatalog + from pyiceberg.catalog.rest import RestCatalog + from pyiceberg.catalog.sql import SqlCatalog + if isinstance(catalog, RestCatalog): return property_as_bool(catalog.properties, "supports_slash_in_identifier", True) - if isinstance(catalog, (HiveCatalog, NoopCatalog, SqlCatalog)): + from pyiceberg.catalog.hive import HiveCatalog + + if isinstance(catalog, HiveCatalog): + return False + if isinstance(catalog, (NoopCatalog, SqlCatalog)): return False return True def does_support_dot_in_identifier(catalog: Catalog) -> bool: + from pyiceberg.catalog.noop import NoopCatalog + from pyiceberg.catalog.rest import RestCatalog + from pyiceberg.catalog.sql import SqlCatalog + if isinstance(catalog, RestCatalog): return property_as_bool(catalog.properties, "supports_dot_in_identifier", True) - if isinstance(catalog, (HiveCatalog, NoopCatalog, SqlCatalog)): + from pyiceberg.catalog.hive import HiveCatalog + + if isinstance(catalog, HiveCatalog): + return False + if isinstance(catalog, (NoopCatalog, SqlCatalog)): return False return True From be1200f54eab345ecbd8337dd56f0a3c63f106f1 Mon Sep 17 00:00:00 2001 From: Kevin Liu Date: Sun, 22 Feb 2026 13:08:22 -0800 Subject: [PATCH 7/7] simplify logic --- tests/conftest.py | 26 ++++++-------------------- 1 file changed, 6 insertions(+), 20 deletions(-) diff --git a/tests/conftest.py b/tests/conftest.py index 106dc06913..cd839e5064 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -3171,9 +3171,7 @@ def does_support_purge_table(catalog: Catalog) -> bool: return property_as_bool(catalog.properties, "supports_purge_table", True) from pyiceberg.catalog.hive import HiveCatalog - if isinstance(catalog, HiveCatalog): - return False - if isinstance(catalog, NoopCatalog): + if isinstance(catalog, (HiveCatalog, NoopCatalog)): return False return True @@ -3186,9 +3184,7 @@ def does_support_atomic_concurrent_updates(catalog: Catalog) -> bool: return property_as_bool(catalog.properties, "supports_atomic_concurrent_updates", True) from pyiceberg.catalog.hive import HiveCatalog - if isinstance(catalog, HiveCatalog): - return False - if isinstance(catalog, NoopCatalog): + if isinstance(catalog, (HiveCatalog, NoopCatalog)): return False return True @@ -3204,11 +3200,7 @@ def does_support_nested_namespaces(catalog: Catalog) -> bool: from pyiceberg.catalog.bigquery_metastore import BigQueryMetastoreCatalog from pyiceberg.catalog.hive import HiveCatalog - if isinstance(catalog, HiveCatalog): - return False - if isinstance(catalog, BigQueryMetastoreCatalog): - return False - if isinstance(catalog, (NoopCatalog, GlueCatalog, DynamoDbCatalog)): + if isinstance(catalog, (HiveCatalog, BigQueryMetastoreCatalog, NoopCatalog, GlueCatalog, DynamoDbCatalog)): return False return True @@ -3221,9 +3213,7 @@ def does_support_schema_evolution(catalog: Catalog) -> bool: return property_as_bool(catalog.properties, "supports_schema_evolution", True) from pyiceberg.catalog.hive import HiveCatalog - if isinstance(catalog, HiveCatalog): - return False - if isinstance(catalog, NoopCatalog): + if isinstance(catalog, (HiveCatalog, NoopCatalog)): return False return True @@ -3237,9 +3227,7 @@ def does_support_slash_in_identifier(catalog: Catalog) -> bool: return property_as_bool(catalog.properties, "supports_slash_in_identifier", True) from pyiceberg.catalog.hive import HiveCatalog - if isinstance(catalog, HiveCatalog): - return False - if isinstance(catalog, (NoopCatalog, SqlCatalog)): + if isinstance(catalog, (HiveCatalog, NoopCatalog, SqlCatalog)): return False return True @@ -3253,8 +3241,6 @@ def does_support_dot_in_identifier(catalog: Catalog) -> bool: return property_as_bool(catalog.properties, "supports_dot_in_identifier", True) from pyiceberg.catalog.hive import HiveCatalog - if isinstance(catalog, HiveCatalog): - return False - if isinstance(catalog, (NoopCatalog, SqlCatalog)): + if isinstance(catalog, (HiveCatalog, NoopCatalog, SqlCatalog)): return False return True