Skip to content

Commit ff379e3

Browse files
ziegenbergparthea
andauthored
feat: add support for Python 3.11 (#466)
* feat: add support for Python 3.11 Signed-off-by: Daniel Ziegenberg <daniel@ziegenberg.at> * restore check for unit-3.10_wo_grpc * restore check for unit_wo_grpc-3.10 * restore 3.10 test * require grpcio 1.49.1 with python 3.11 * lint Signed-off-by: Daniel Ziegenberg <daniel@ziegenberg.at> Co-authored-by: Anthonios Partheniou <partheniou@google.com>
1 parent 83ce2d7 commit ff379e3

File tree

5 files changed

+19
-7
lines changed

5 files changed

+19
-7
lines changed

.github/sync-repo-settings.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,14 @@ branchProtectionRules:
1515
- 'unit_grpc_gcp-3.8'
1616
- 'unit_grpc_gcp-3.9'
1717
- 'unit_grpc_gcp-3.10'
18+
- 'unit_grpc_gcp-3.11'
1819
- 'unit-3.7'
1920
- 'unit-3.8'
2021
- 'unit-3.9'
2122
- 'unit-3.10'
23+
- 'unit-3.11'
2224
- 'unit_wo_grpc-3.10'
25+
- 'unit_wo_grpc-3.11'
2326
- 'cover'
2427
- 'docs'
2528
- 'docfx'

.github/workflows/unittest.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ jobs:
1717
- "3.8"
1818
- "3.9"
1919
- "3.10"
20+
- "3.11"
2021
exclude:
2122
- option: "_wo_grpc"
2223
python: 3.7

CONTRIBUTING.rst

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

2323
- The feature must work fully on the following CPython versions:
24-
3.7, 3.8, 3.9, and 3.10 on both UNIX and Windows.
24+
3.7, 3.8, 3.9, 3.10, and 3.11 on both UNIX and Windows.
2525

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

7272
- To run a single unit test::
7373

74-
$ nox -s unit-3.10 -- -k <name of test>
74+
$ nox -s unit-3.11 -- -k <name of test>
7575

7676

7777
.. note::
@@ -201,11 +201,13 @@ We support:
201201
- `Python 3.8`_
202202
- `Python 3.9`_
203203
- `Python 3.10`_
204+
- `Python 3.11`_
204205

205206
.. _Python 3.7: https://docs.python.org/3.7/
206207
.. _Python 3.8: https://docs.python.org/3.8/
207208
.. _Python 3.9: https://docs.python.org/3.9/
208209
.. _Python 3.10: https://docs.python.org/3.10/
210+
.. _Python 3.11: https://docs.python.org/3.11/
209211

210212

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

noxfile.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ def default(session, install_grpc=True):
113113
pytest_args = [
114114
"python",
115115
"-m",
116-
"py.test",
116+
"pytest",
117117
*(
118118
# Helpful for running a single test or testfile.
119119
session.posargs
@@ -146,13 +146,13 @@ def default(session, install_grpc=True):
146146
session.run(*pytest_args)
147147

148148

149-
@nox.session(python=["3.7", "3.8", "3.9", "3.10"])
149+
@nox.session(python=["3.7", "3.8", "3.9", "3.10", "3.11"])
150150
def unit(session):
151151
"""Run the unit test suite."""
152152
default(session)
153153

154154

155-
@nox.session(python=["3.6", "3.7", "3.8", "3.9", "3.10"])
155+
@nox.session(python=["3.7", "3.8", "3.9", "3.10", "3.11"])
156156
def unit_grpc_gcp(session):
157157
"""Run the unit test suite with grpcio-gcp installed."""
158158
constraints_path = str(
@@ -166,7 +166,7 @@ def unit_grpc_gcp(session):
166166
default(session)
167167

168168

169-
@nox.session(python=["3.8", "3.10"])
169+
@nox.session(python=["3.8", "3.10", "3.11"])
170170
def unit_wo_grpc(session):
171171
"""Run the unit test suite w/o grpcio installed"""
172172
default(session, install_grpc=False)

setup.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,12 @@
3535
"requests >= 2.18.0, < 3.0.0dev",
3636
]
3737
extras = {
38-
"grpc": ["grpcio >= 1.33.2, < 2.0dev", "grpcio-status >= 1.33.2, < 2.0dev"],
38+
"grpc": [
39+
"grpcio >= 1.33.2, < 2.0dev",
40+
"grpcio >= 1.49.1, < 2.0dev; python_version>='3.11'",
41+
"grpcio-status >= 1.33.2, < 2.0dev",
42+
"grpcio-status >= 1.49.1, < 2.0dev; python_version>='3.11'",
43+
],
3944
"grpcgcp": "grpcio-gcp >= 0.2.2, < 1.0dev",
4045
"grpcio-gcp": "grpcio-gcp >= 0.2.2, < 1.0dev",
4146
}
@@ -86,6 +91,7 @@
8691
"Programming Language :: Python :: 3.8",
8792
"Programming Language :: Python :: 3.9",
8893
"Programming Language :: Python :: 3.10",
94+
"Programming Language :: Python :: 3.11",
8995
"Operating System :: OS Independent",
9096
"Topic :: Internet",
9197
],

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy