diff --git a/.github/workflows/python-release.yml b/.github/workflows/python-release.yml index 52f523da93..2d51aa3d17 100644 --- a/.github/workflows/python-release.yml +++ b/.github/workflows/python-release.yml @@ -68,7 +68,7 @@ jobs: CIBW_ARCHS: "auto64" CIBW_PROJECT_REQUIRES_PYTHON: ">=3.8,<3.12" CIBW_TEST_REQUIRES: "pytest==7.4.2 moto==4.2.2" - CIBW_TEST_EXTRAS: "s3fs,glue,pyarrow" + CIBW_TEST_EXTRAS: "s3fs,glue" CIBW_TEST_COMMAND: "pytest {project}/tests/avro/test_decoder.py" # There is an upstream issue with installing on MacOSX # https://github.com/pypa/cibuildwheel/issues/1603 diff --git a/tests/conftest.py b/tests/conftest.py index 86c7f1cd33..063c0646fd 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -44,7 +44,6 @@ from urllib.parse import urlparse import boto3 -import pyarrow as pa import pytest from moto import mock_dynamodb, mock_glue @@ -85,6 +84,7 @@ from pyiceberg.utils.datetime import datetime_to_millis if TYPE_CHECKING: + import pyarrow as pa from moto.server import ThreadedMotoServer # type: ignore from pyiceberg.io.pyarrow import PyArrowFile, PyArrowFileIO @@ -267,7 +267,9 @@ def table_schema_nested_with_struct_key_map() -> Schema: @pytest.fixture(scope="session") -def pyarrow_schema_simple_without_ids() -> pa.Schema: +def pyarrow_schema_simple_without_ids() -> "pa.Schema": + import pyarrow as pa + return pa.schema([ pa.field('foo', pa.string(), nullable=True), pa.field('bar', pa.int32(), nullable=False), @@ -276,7 +278,9 @@ def pyarrow_schema_simple_without_ids() -> pa.Schema: @pytest.fixture(scope="session") -def pyarrow_schema_nested_without_ids() -> pa.Schema: +def pyarrow_schema_nested_without_ids() -> "pa.Schema": + import pyarrow as pa + return pa.schema([ pa.field('foo', pa.string(), nullable=False), pa.field('bar', pa.int32(), nullable=False),