Skip to content

Commit 55336f3

Browse files
feat: Add Python 3.13 runtime support (#1211)
* feat: Add Python 3.13 runtime support This commit introduces support for Python 3.13 as a runtime dependency. The following changes were made: - Updated `noxfile.py` to include Python 3.13 in unit and system test configurations, including necessary extras and confirming skip conditions for cpp protobuf implementation. - Modified `setup.py` to update `python_requires` to include Python 3.13 (i.e., `<3.14`) and added the corresponding classifier. - Updated `owlbot.py` to include Python 3.13 in the `unit_test_python_versions`, `system_test_python_versions`, and `extras_by_python` configurations. - Created `testing/constraints-3.13.txt` by copying constraints from the 3.12 version. - Updated `README.rst` and `docs/README.rst` to list Python 3.13 as a supported version. * additional updates to add 3.13 --------- Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
1 parent f363b87 commit 55336f3

File tree

7 files changed

+27
-28
lines changed

7 files changed

+27
-28
lines changed

.github/sync-repo-settings.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ branchProtectionRules:
1616
- 'Samples - Python 3.10'
1717
- 'Samples - Python 3.11'
1818
- 'Samples - Python 3.12'
19+
- 'Samples - Python 3.13'
20+
1921
permissionRules:
2022
- team: actools-python
2123
permission: admin

CONTRIBUTING.rst

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ In order to add a feature:
2222
documentation.
2323

2424
- The feature must work fully on the following CPython versions:
25-
3.8, 3.9, 3.10, 3.11 and 3.12 on both UNIX and Windows.
25+
3.8, 3.9, 3.10, 3.11, 3.12, and 3.13 on both UNIX and Windows.
2626

2727
- The feature must not add unnecessary dependencies (where
2828
"unnecessary" is of course subjective, but new dependencies should
@@ -72,7 +72,7 @@ We use `nox <https://nox.readthedocs.io/en/latest/>`__ to instrument our tests.
7272

7373
- To run a single unit test::
7474

75-
$ nox -s unit-3.12 -- -k <name of test>
75+
$ nox -s unit-3.13 -- -k <name of test>
7676

7777

7878
.. note::
@@ -143,12 +143,12 @@ Running System Tests
143143
$ nox -s system
144144

145145
# Run a single system test
146-
$ nox -s system-3.12 -- -k <name of test>
146+
$ nox -s system-3.13 -- -k <name of test>
147147

148148

149149
.. note::
150150

151-
System tests are only configured to run under Python 3.8, 3.11 and 3.12.
151+
System tests are only configured to run under Python 3.8, 3.12, and 3.13.
152152
For expediency, we do not run them in older versions of Python 3.
153153

154154
This alone will not run the tests. You'll need to change some local
@@ -226,12 +226,14 @@ We support:
226226
- `Python 3.10`_
227227
- `Python 3.11`_
228228
- `Python 3.12`_
229+
- `Python 3.13`_
229230

230231
.. _Python 3.8: https://docs.python.org/3.8/
231232
.. _Python 3.9: https://docs.python.org/3.9/
232233
.. _Python 3.10: https://docs.python.org/3.10/
233234
.. _Python 3.11: https://docs.python.org/3.11/
234235
.. _Python 3.12: https://docs.python.org/3.12/
236+
.. _Python 3.13: https://docs.python.org/3.13/
235237

236238

237239
Supported versions can be found in our ``noxfile.py`` `config`_.

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ dependencies.
5151

5252
Supported Python Versions
5353
^^^^^^^^^^^^^^^^^^^^^^^^^
54-
Python >= 3.8
54+
Python >= 3.8, <3.14
5555

5656
Unsupported Python Versions
5757
^^^^^^^^^^^^^^^^^^^^^^^^^^^

noxfile.py

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141

4242
DEFAULT_PYTHON_VERSION = "3.8"
4343

44-
UNIT_TEST_PYTHON_VERSIONS: List[str] = ["3.8", "3.9", "3.10", "3.11", "3.12"]
44+
UNIT_TEST_PYTHON_VERSIONS: List[str] = ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
4545
UNIT_TEST_STANDARD_DEPENDENCIES = [
4646
"mock",
4747
"asyncmock",
@@ -71,9 +71,14 @@
7171
"geography",
7272
"bqstorage",
7373
],
74+
"3.13": [
75+
"tests",
76+
"geography",
77+
"bqstorage",
78+
],
7479
}
7580

76-
SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.8", "3.11", "3.12"]
81+
SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.8", "3.12", "3.13"]
7782
SYSTEM_TEST_STANDARD_DEPENDENCIES: List[str] = [
7883
"mock",
7984
"pytest",
@@ -91,12 +96,12 @@
9196
"alembic",
9297
"bqstorage",
9398
],
94-
"3.11": [
99+
"3.12": [
95100
"tests",
96101
"geography",
97102
"bqstorage",
98103
],
99-
"3.12": [
104+
"3.13": [
100105
"tests",
101106
"geography",
102107
"bqstorage",
@@ -219,7 +224,7 @@ def unit(session, protobuf_implementation, install_extras=True):
219224
)
220225
install_unittest_dependencies(session, "-c", constraints_path)
221226

222-
if install_extras and session.python in ["3.11", "3.12"]:
227+
if install_extras and session.python in ["3.11", "3.12", "3.13"]:
223228
install_target = ".[geography,alembic,tests,bqstorage]"
224229
elif install_extras:
225230
install_target = ".[all]"
@@ -395,7 +400,7 @@ def compliance(session):
395400
)
396401
if session.python == "3.8":
397402
extras = "[tests,alembic]"
398-
elif session.python in ["3.11", "3.12"]:
403+
elif session.python in ["3.12", "3.13"]:
399404
extras = "[tests,geography]"
400405
else:
401406
extras = "[tests]"
@@ -522,7 +527,7 @@ def docfx(session):
522527
)
523528

524529

525-
@nox.session(python="3.12")
530+
@nox.session(python="3.13")
526531
@nox.parametrize(
527532
"protobuf_implementation",
528533
["python", "upb", "cpp"],

owlbot.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,11 @@
3333
"3.8": ["tests", "alembic", "bqstorage"],
3434
"3.11": ["tests", "geography", "bqstorage"],
3535
"3.12": ["tests", "geography", "bqstorage"],
36+
"3.13": ["tests", "geography", "bqstorage"],
3637
}
3738
templated_files = common.py_library(
38-
unit_test_python_versions=["3.8", "3.9", "3.10", "3.11", "3.12"],
39-
system_test_python_versions=["3.8", "3.11", "3.12"],
39+
unit_test_python_versions=["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"],
40+
system_test_python_versions=["3.8", "3.12", "3.13"],
4041
cov_level=100,
4142
unit_test_extras=extras,
4243
unit_test_extras_by_python=extras_by_python,

setup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ def readme():
104104
"Programming Language :: Python :: 3.10",
105105
"Programming Language :: Python :: 3.11",
106106
"Programming Language :: Python :: 3.12",
107+
"Programming Language :: Python :: 3.13",
107108
"Operating System :: OS Independent",
108109
"Topic :: Database :: Front-Ends",
109110
],
@@ -119,7 +120,7 @@ def readme():
119120
"sqlalchemy>=1.4.16,<3.0.0",
120121
],
121122
extras_require=extras,
122-
python_requires=">=3.8, <3.13",
123+
python_requires=">=3.8, <3.14",
123124
tests_require=["packaging", "pytz"],
124125
entry_points={
125126
"sqlalchemy.dialects": ["bigquery = sqlalchemy_bigquery:BigQueryDialect"]

testing/constraints-3.13.txt

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1 @@
1-
# This constraints file is used to check that lower bounds
2-
# are correct in setup.py
3-
# List all library dependencies and extras in this file.
4-
# Pin the version to the lower bound.
5-
# e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0dev",
6-
# Then this file should have google-cloud-foo==1.14.0
7-
google-api-core == 1.31.5
8-
google-auth==1.25.0
9-
google-cloud-bigquery==3.3.6
10-
google-cloud-bigquery-storage == 2.0.0
11-
grpcio == 1.47.0
12-
pyarrow == 3.0.0
13-
sqlalchemy==1.4.16
1+
numpy>=1.23

0 commit comments

Comments
 (0)