Skip to content

Commit 2cd4df0

Browse files
authored
feat: officially support Python 3.13 (#83)
This commit adds support for Python 3.13 in the package metadata. There were no code changes required. As usual, we had to add some constraints to our dependencies directly. Namely: - `pyarrow` only supports Python 3.13 from v18.0.0 onwards - `typing-extensions ` only supports Python 3.13 from v4.12.0 onwards Direct dependencies are hard enforced by pip when installing the package, and users won't be able to install if their project requires an older version. Additionally, I had to add constraints to two transitive dependencies: - `frozenlist` only supports Python 3.13 from v1.5.0 onwards - `importlib-resources` only supports Python 3.13 from v6.0.0 onwards Transitive dependencies are NOT envorced by pip when installing the package, and users need to manually add constraints to them. This is not our problem: it's a problem with the dependency spec of downstream packages. This is why our `constraints/` folder exists. All unit/integration tests are passing.
1 parent 2d7dd86 commit 2cd4df0

File tree

4 files changed

+19
-5
lines changed

4 files changed

+19
-5
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
kind: Features
2+
body: Officially support Python 3.13
3+
time: 2025-04-16T14:28:48.910783+02:00

constraints/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22

33
All files in this directory specify transitive dependency constraints for usage in our test environments. The files in this directory are _not_ shipped with the package, and users should specify those constraints themselves, according to what works in their own system. Learn more about pip constraints [here](https://pip.pypa.io/en/stable/user_guide/#constraints-files).
44

5-
This is useful for specifying different minimum versions of a package for Python 3.12 and 3.9, since older versions might not support the newest Python and vice-versa.
5+
This is useful for specifying different minimum versions of a package for Python 3.13 and 3.9, since older versions might not support the newest Python and vice-versa.
66

77
For direct dependencies, we solve this by using the `python_version` [environment marker](https://peps.python.org/pep-0508/#environment-markers) in our dependencies.

constraints/py313.txt

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
numpy>=1.26.0,<2.0.0
2+
requests>=2.32.0
3+
urllib3>=1.26.8
4+
yarl>=1.9.3
5+
frozenlist>=1.5.0
6+
aiohttp>=3.9.0
7+
importlib-resources>=6.0

pyproject.toml

+8-4
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,17 @@ authors = [
99
{name = "dbt Labs"}
1010
]
1111
readme = "README.md"
12-
requires-python = ">=3.9,<3.13"
12+
requires-python = ">=3.9,<3.14"
1313
dynamic = ["version"]
1414

1515
dependencies = [
1616
"mashumaro>=3.11,<4.0",
1717
"typing-extensions>=4.4.0,<5.0.0; python_version<='3.11'",
18-
"typing-extensions>=4.7.0,<5.0.0; python_version>= '3.12'",
18+
"typing-extensions>=4.7.0,<5.0.0; python_version=='3.12'",
19+
"typing-extensions>=4.12.0,<5.0.0; python_version>='3.13'",
1920
"pyarrow>=12.0.0; python_version<='3.11'",
20-
"pyarrow>=14.0.0; python_version>='3.12'",
21+
"pyarrow>=14.0.0; python_version=='3.12'",
22+
"pyarrow>=18.0.0; python_version>='3.13'",
2123
"adbc-driver-flightsql>=0.11.0",
2224
"adbc-driver-manager>=0.11.0",
2325
]
@@ -92,7 +94,7 @@ integration = "pytest tests/integration/ --server-schema tests/server_schema.gql
9294
# - Dependency resolution strategy (see UV_RESOLUTION in uv's manual)
9395
# The SDK should work with a range of possible dependency versions
9496
[[tool.hatch.envs.test.matrix]]
95-
python = ["3.9", "3.10", "3.11", "3.12"]
97+
python = ["3.9", "3.10", "3.11", "3.12", "3.13"]
9698
deps-resolution = ["lowest", "lowest-direct", "highest"]
9799

98100
[tool.hatch.envs.test.overrides]
@@ -101,6 +103,8 @@ matrix.python.env-vars = [
101103
{ key = "UV_CONSTRAINT", value = "constraints/py310.txt", if = ["3.10"] },
102104
{ key = "UV_CONSTRAINT", value = "constraints/py311.txt", if = ["3.11"] },
103105
{ key = "UV_CONSTRAINT", value = "constraints/py312.txt", if = ["3.12"] },
106+
{ key = "UV_CONSTRAINT", value = "constraints/py313.txt", if = ["3.13"] },
107+
104108
]
105109
matrix.deps-resolution.env-vars = [
106110
{ key = "UV_RESOLUTION" },

0 commit comments

Comments
 (0)