Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add support for Python 3.11 #466

Merged
merged 9 commits into from Nov 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/sync-repo-settings.yaml
Expand Up @@ -15,11 +15,14 @@ branchProtectionRules:
- 'unit_grpc_gcp-3.8'
- 'unit_grpc_gcp-3.9'
- 'unit_grpc_gcp-3.10'
- 'unit_grpc_gcp-3.11'
- 'unit-3.7'
- 'unit-3.8'
- 'unit-3.9'
- 'unit-3.10'
- 'unit-3.11'
- 'unit_wo_grpc-3.10'
- 'unit_wo_grpc-3.11'
- 'cover'
- 'docs'
- 'docfx'
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/unittest.yml
Expand Up @@ -17,6 +17,7 @@ jobs:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
exclude:
- option: "_wo_grpc"
python: 3.7
Expand Down
6 changes: 4 additions & 2 deletions CONTRIBUTING.rst
Expand Up @@ -21,7 +21,7 @@ In order to add a feature:
documentation.

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

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

- To run a single unit test::

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


.. note::
Expand Down Expand Up @@ -201,11 +201,13 @@ We support:
- `Python 3.8`_
- `Python 3.9`_
- `Python 3.10`_
- `Python 3.11`_

.. _Python 3.7: https://docs.python.org/3.7/
.. _Python 3.8: https://docs.python.org/3.8/
.. _Python 3.9: https://docs.python.org/3.9/
.. _Python 3.10: https://docs.python.org/3.10/
.. _Python 3.11: https://docs.python.org/3.11/


Supported versions can be found in our ``noxfile.py`` `config`_.
Expand Down
8 changes: 4 additions & 4 deletions noxfile.py
Expand Up @@ -113,7 +113,7 @@ def default(session, install_grpc=True):
pytest_args = [
"python",
"-m",
"py.test",
"pytest",
*(
# Helpful for running a single test or testfile.
session.posargs
Expand Down Expand Up @@ -146,13 +146,13 @@ def default(session, install_grpc=True):
session.run(*pytest_args)


@nox.session(python=["3.7", "3.8", "3.9", "3.10"])
@nox.session(python=["3.7", "3.8", "3.9", "3.10", "3.11"])
def unit(session):
"""Run the unit test suite."""
default(session)


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


@nox.session(python=["3.8", "3.10"])
@nox.session(python=["3.8", "3.10", "3.11"])
def unit_wo_grpc(session):
"""Run the unit test suite w/o grpcio installed"""
default(session, install_grpc=False)
Expand Down
8 changes: 7 additions & 1 deletion setup.py
Expand Up @@ -35,7 +35,12 @@
"requests >= 2.18.0, < 3.0.0dev",
]
extras = {
"grpc": ["grpcio >= 1.33.2, < 2.0dev", "grpcio-status >= 1.33.2, < 2.0dev"],
"grpc": [
"grpcio >= 1.33.2, < 2.0dev",
"grpcio >= 1.49.1, < 2.0dev; python_version>='3.11'",
"grpcio-status >= 1.33.2, < 2.0dev",
"grpcio-status >= 1.49.1, < 2.0dev; python_version>='3.11'",
],
"grpcgcp": "grpcio-gcp >= 0.2.2, < 1.0dev",
"grpcio-gcp": "grpcio-gcp >= 0.2.2, < 1.0dev",
}
Expand Down Expand Up @@ -86,6 +91,7 @@
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Operating System :: OS Independent",
"Topic :: Internet",
],
Expand Down