Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/pypi-build-artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ jobs:
3.10
3.11
3.12
3.13
- name: Install UV
uses: astral-sh/setup-uv@v7
Expand All @@ -68,7 +69,7 @@ jobs:
env:
# Ignore 32 bit architectures
CIBW_ARCHS: "auto64"
CIBW_PROJECT_REQUIRES_PYTHON: ">=3.10"
CIBW_PROJECT_REQUIRES_PYTHON: ">=3.10,<=3.13"
CIBW_TEST_REQUIRES: "pytest==7.4.2 moto==5.0.1"
CIBW_TEST_COMMAND: "pytest {project}/tests/avro/test_decoder.py"
# Ignore tests for pypy since not all dependencies are compiled for it
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/python-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python: ['3.10', '3.11', '3.12']
python: ['3.10', '3.11', '3.12', '3.13']

steps:
- uses: actions/checkout@v6
Expand All @@ -71,7 +71,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python: ['3.10', '3.11', '3.12']
python: ['3.10', '3.11', '3.12', '3.13']

steps:
- uses: actions/checkout@v6
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/svn-build-artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ jobs:
3.10
3.11
3.12
3.13
- name: Install UV
uses: astral-sh/setup-uv@v7
Expand All @@ -63,7 +64,7 @@ jobs:
env:
# Ignore 32 bit architectures
CIBW_ARCHS: "auto64"
CIBW_PROJECT_REQUIRES_PYTHON: ">=3.10"
CIBW_PROJECT_REQUIRES_PYTHON: ">=3.10,<=3.13"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this exclude 3.13.1? If so we should probably make this <3.14

CIBW_TEST_REQUIRES: "pytest==7.4.2 moto==5.0.1"
CIBW_TEST_COMMAND: "pytest {project}/tests/avro/test_decoder.py"
# Ignore tests for pypy since not all dependencies are compiled for it
Expand Down
5 changes: 4 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ classifiers = [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
]
dependencies = [
"mmh3>=4.0.0,<6.0.0",
Expand Down Expand Up @@ -66,7 +67,7 @@ duckdb = [
"pyarrow>=17.0.0",
]
ray = [
"ray>=2.10.0,<=2.44.0",
"ray>=2.10.0,<3.0.0",
"pyarrow>=17.0.0",
"pandas>=1.0.0,<3.0.0",
]
Expand Down Expand Up @@ -160,6 +161,8 @@ filterwarnings = [
"error",
# Ignore Python version deprecation warning from google.api_core while we still support 3.10
"ignore:You are using a Python version.*which Google will stop supporting:FutureWarning:google.api_core",
# Python 3.13 sqlite3 module ResourceWarnings for unclosed database connections
"ignore:unclosed database in <sqlite3.Connection object*:ResourceWarning",
]

[tool.black]
Expand Down
7 changes: 5 additions & 2 deletions tests/catalog/test_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
# pylint:disable=redefined-outer-name


from collections.abc import Generator
from pathlib import PosixPath

import pyarrow as pa
Expand Down Expand Up @@ -51,8 +52,10 @@


@pytest.fixture
def catalog(tmp_path: PosixPath) -> InMemoryCatalog:
return InMemoryCatalog("test.in_memory.catalog", **{WAREHOUSE: tmp_path.absolute().as_posix(), "test.key": "test.value"})
def catalog(tmp_path: PosixPath) -> Generator[Catalog, None, None]:
catalog = InMemoryCatalog("test.in_memory.catalog", **{WAREHOUSE: tmp_path.absolute().as_posix(), "test.key": "test.value"})
yield catalog
catalog.close()


TEST_TABLE_IDENTIFIER = ("com", "organization", "department", "my_table")
Expand Down
13 changes: 13 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -2947,3 +2947,16 @@ def pyarrow_table_with_promoted_types(pyarrow_schema_with_promoted_types: "pa.Sc
},
schema=pyarrow_schema_with_promoted_types,
)


@pytest.fixture(scope="session")
def ray_session() -> Generator[Any, None, None]:
"""Fixture to manage Ray initialization and shutdown for tests."""
import ray

ray.init(
ignore_reinit_error=True,
runtime_env={"working_dir": None}, # Prevent Ray from serializing the working directory to workers
)
yield ray
ray.shutdown()
12 changes: 8 additions & 4 deletions tests/integration/test_reads.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import uuid
from datetime import datetime, timedelta
from pathlib import PosixPath
from typing import Any
from urllib.parse import urlparse

import pyarrow as pa
Expand Down Expand Up @@ -357,16 +358,17 @@ def test_bodo_nan(catalog: Catalog, monkeypatch: pytest.MonkeyPatch) -> None:
@pytest.mark.integration
@pytest.mark.filterwarnings("ignore")
@pytest.mark.parametrize("catalog", [pytest.lazy_fixture("session_catalog_hive"), pytest.lazy_fixture("session_catalog")])
def test_ray_nan(catalog: Catalog) -> None:
def test_ray_nan(catalog: Catalog, ray_session: Any) -> None:
table_test_null_nan_rewritten = catalog.load_table("default.test_null_nan_rewritten")
ray_dataset = table_test_null_nan_rewritten.scan().to_ray()
assert ray_dataset.count() == 3
assert math.isnan(ray_dataset.take()[0]["col_numeric"])


@pytest.mark.integration
@pytest.mark.filterwarnings("ignore")
@pytest.mark.parametrize("catalog", [pytest.lazy_fixture("session_catalog_hive"), pytest.lazy_fixture("session_catalog")])
def test_ray_nan_rewritten(catalog: Catalog) -> None:
def test_ray_nan_rewritten(catalog: Catalog, ray_session: Any) -> None:
table_test_null_nan_rewritten = catalog.load_table("default.test_null_nan_rewritten")
ray_dataset = table_test_null_nan_rewritten.scan(
row_filter=IsNaN("col_numeric"), selected_fields=("idx", "col_numeric")
Expand All @@ -377,17 +379,19 @@ def test_ray_nan_rewritten(catalog: Catalog) -> None:


@pytest.mark.integration
@pytest.mark.filterwarnings("ignore")
@pytest.mark.parametrize("catalog", [pytest.lazy_fixture("session_catalog_hive"), pytest.lazy_fixture("session_catalog")])
@pytest.mark.skip(reason="Fixing issues with NaN's: https://github.com/apache/arrow/issues/34162")
def test_ray_not_nan_count(catalog: Catalog) -> None:
def test_ray_not_nan_count(catalog: Catalog, ray_session: Any) -> None:
table_test_null_nan_rewritten = catalog.load_table("default.test_null_nan_rewritten")
ray_dataset = table_test_null_nan_rewritten.scan(row_filter=NotNaN("col_numeric"), selected_fields=("idx",)).to_ray()
assert ray_dataset.count() == 2


@pytest.mark.integration
@pytest.mark.filterwarnings("ignore")
@pytest.mark.parametrize("catalog", [pytest.lazy_fixture("session_catalog_hive"), pytest.lazy_fixture("session_catalog")])
def test_ray_all_types(catalog: Catalog) -> None:
def test_ray_all_types(catalog: Catalog, ray_session: Any) -> None:
table_test_all_types = catalog.load_table("default.test_all_types")
ray_dataset = table_test_all_types.scan().to_ray()
pandas_dataframe = table_test_all_types.scan().to_pandas()
Expand Down
36 changes: 17 additions & 19 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading