Skip to content

Commit f826d83

Browse files
mr-mcoxgcf-owl-bot[bot]parthea
authored
feat: Enable support and testing for python 3.11 (#512)
* Enable support and testing for python 3.11 * feat: Enable support and testing for python 3.11 * build: Add kokoro configuration for python 3.11 * build: Remove kokoro configuration for python 3.11 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * add unit_test_python_versions arg * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Anthonios Partheniou <partheniou@google.com>
1 parent 57794c3 commit f826d83

File tree

5 files changed

+18
-13
lines changed

5 files changed

+18
-13
lines changed

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.7, 3.8, 3.9 and 3.10 on both UNIX and Windows.
25+
3.7, 3.8, 3.9, 3.10 and 3.11 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.10 -- -k <name of test>
75+
$ nox -s unit-3.11 -- -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.10 -- -k <name of test>
146+
$ nox -s system-3.11 -- -k <name of test>
147147

148148

149149
.. note::
150150

151-
System tests are only configured to run under Python 3.8 and 3.10.
151+
System tests are only configured to run under Python 3.8 and 3.11.
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
@@ -225,11 +225,13 @@ We support:
225225
- `Python 3.8`_
226226
- `Python 3.9`_
227227
- `Python 3.10`_
228+
- `Python 3.11`_
228229

229230
.. _Python 3.7: https://docs.python.org/3.7/
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/
234+
.. _Python 3.11: https://docs.python.org/3.11/
233235

234236

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

noxfile.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232

3333
DEFAULT_PYTHON_VERSION = "3.8"
3434

35-
UNIT_TEST_PYTHON_VERSIONS = ["3.7", "3.8", "3.9", "3.10"]
35+
UNIT_TEST_PYTHON_VERSIONS = ["3.7", "3.8", "3.9", "3.10", "3.11"]
3636
UNIT_TEST_STANDARD_DEPENDENCIES = [
3737
"mock",
3838
"asyncmock",
@@ -51,13 +51,13 @@
5151
"tests",
5252
"alembic",
5353
],
54-
"3.10": [
54+
"3.11": [
5555
"tests",
5656
"geography",
5757
],
5858
}
5959

60-
SYSTEM_TEST_PYTHON_VERSIONS = ["3.8", "3.10"]
60+
SYSTEM_TEST_PYTHON_VERSIONS = ["3.8", "3.11"]
6161
SYSTEM_TEST_STANDARD_DEPENDENCIES = [
6262
"mock",
6363
"pytest",
@@ -74,7 +74,7 @@
7474
"tests",
7575
"alembic",
7676
],
77-
"3.10": [
77+
"3.11": [
7878
"tests",
7979
"geography",
8080
],
@@ -382,7 +382,7 @@ def compliance(session):
382382
)
383383
if session.python == "3.8":
384384
extras = "[tests,alembic]"
385-
elif session.python == "3.10":
385+
elif session.python == "3.11":
386386
extras = "[tests,geography]"
387387
else:
388388
extras = "[tests]"

owlbot.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,11 @@
3030
extras = ["tests"]
3131
extras_by_python = {
3232
"3.8": ["tests", "alembic"],
33-
"3.10": ["tests", "geography"],
33+
"3.11": ["tests", "geography"],
3434
}
3535
templated_files = common.py_library(
36-
system_test_python_versions=["3.8", "3.10"],
36+
unit_test_python_versions=["3.7", "3.8", "3.9", "3.10", "3.11"],
37+
system_test_python_versions=["3.8", "3.11"],
3738
cov_level=100,
3839
unit_test_extras=extras,
3940
unit_test_extras_by_python=extras_by_python,
@@ -201,7 +202,7 @@ def compliance(session):
201202
)
202203
if session.python == "3.8":
203204
extras = "[tests,alembic]"
204-
elif session.python == "3.10":
205+
elif session.python == "3.11":
205206
extras = "[tests,geography]"
206207
else:
207208
extras = "[tests]"

setup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ def readme():
7373
"Programming Language :: Python :: 3.8",
7474
"Programming Language :: Python :: 3.9",
7575
"Programming Language :: Python :: 3.10",
76+
"Programming Language :: Python :: 3.11",
7677
"Operating System :: OS Independent",
7778
"Topic :: Database :: Front-Ends",
7879
],
@@ -91,7 +92,7 @@ def readme():
9192
"future",
9293
],
9394
extras_require=extras,
94-
python_requires=">=3.7, <3.11",
95+
python_requires=">=3.7, <3.12",
9596
tests_require=["packaging", "pytz"],
9697
entry_points={
9798
"sqlalchemy.dialects": ["bigquery = sqlalchemy_bigquery:BigQueryDialect"]

testing/constraints-3.11.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
numpy>=1.23

0 commit comments

Comments
 (0)