Skip to content

Commit acf4dfe

Browse files
committed
Add python 3.13 support
- Add Python 3.13 to Github Actions workflow matrices - Update CIBW_PROJECT_REQUIRES - Add classifier to pyproject.toml - Update ray dependency with python 3.13 constraint - Fix InMemoryCatalog to close connections - Add pytest filter to ignore rest of 3.13 SQLite Resource Warnings
1 parent 1bef2a4 commit acf4dfe

File tree

5 files changed

+17
-7
lines changed

5 files changed

+17
-7
lines changed

.github/workflows/pypi-build-artifacts.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ jobs:
4545
3.10
4646
3.11
4747
3.12
48+
3.13
4849
4950
- name: Install poetry
5051
run: make install-poetry
@@ -68,7 +69,7 @@ jobs:
6869
env:
6970
# Ignore 32 bit architectures
7071
CIBW_ARCHS: "auto64"
71-
CIBW_PROJECT_REQUIRES_PYTHON: ">=3.10"
72+
CIBW_PROJECT_REQUIRES_PYTHON: ">=3.10,<=3.13"
7273
CIBW_TEST_REQUIRES: "pytest==7.4.2 moto==5.0.1"
7374
CIBW_TEST_COMMAND: "pytest {project}/tests/avro/test_decoder.py"
7475
# Ignore tests for pypy since not all dependencies are compiled for it

.github/workflows/python-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
runs-on: ubuntu-latest
4848
strategy:
4949
matrix:
50-
python: ['3.10', '3.11', '3.12']
50+
python: ['3.10', '3.11', '3.12', '3.13']
5151

5252
steps:
5353
- uses: actions/checkout@v5

.github/workflows/svn-build-artifacts.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ jobs:
4545
3.10
4646
3.11
4747
3.12
48+
3.13
4849
4950
- name: Install poetry
5051
run: make install-poetry
@@ -63,7 +64,7 @@ jobs:
6364
env:
6465
# Ignore 32 bit architectures
6566
CIBW_ARCHS: "auto64"
66-
CIBW_PROJECT_REQUIRES_PYTHON: ">=3.10"
67+
CIBW_PROJECT_REQUIRES_PYTHON: ">=3.10,<=3.13"
6768
CIBW_TEST_REQUIRES: "pytest==7.4.2 moto==5.0.1"
6869
CIBW_TEST_COMMAND: "pytest {project}/tests/avro/test_decoder.py"
6970
# Ignore tests for pypy since not all dependencies are compiled for it

pyproject.toml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ classifiers = [
2929
"Programming Language :: Python :: 3.10",
3030
"Programming Language :: Python :: 3.11",
3131
"Programming Language :: Python :: 3.12",
32+
"Programming Language :: Python :: 3.13",
3233
]
3334
packages = [
3435
{ include = "pyiceberg" },
@@ -66,7 +67,10 @@ pyarrow = { version = ">=17.0.0", optional = true }
6667
google-auth = { version = ">=2.4.0", optional = true }
6768
pandas = { version = ">=1.0.0,<3.0.0", optional = true }
6869
duckdb = { version = ">=0.5.0,<2.0.0", optional = true }
69-
ray = { version = ">=2.10.0,<=2.44.0", optional = true }
70+
ray = [
71+
{ version = ">=2.10.0,<3.0.0", python = ">=3.10", optional = true },
72+
{ version = ">=2.45.0", python = ">=3.13", optional = true }
73+
]
7074
python-snappy = { version = ">=0.6.0,<1.0.0", optional = true }
7175
thrift = { version = ">=0.13.0,<1.0.0", optional = true }
7276
boto3 = { version = ">=1.24.59", optional = true }
@@ -343,6 +347,8 @@ markers = [
343347
# Turns a warning into an error
344348
filterwarnings = [
345349
"error",
350+
# Python 3.13 sqlite3 module ResourceWarnings for unclosed database connections
351+
"ignore:unclosed database in <sqlite3.Connection object*:ResourceWarning",
346352
]
347353

348354
[tool.black]

tests/catalog/test_base.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919

2020
from pathlib import PosixPath
21-
from typing import Union
21+
from typing import Generator, Union
2222

2323
import pyarrow as pa
2424
import pytest
@@ -52,8 +52,10 @@
5252

5353

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

5860

5961
TEST_TABLE_IDENTIFIER = ("com", "organization", "department", "my_table")

0 commit comments

Comments
 (0)