From 34b87dcf8f9d384368203cbaf787c0da5f40b9f5 Mon Sep 17 00:00:00 2001 From: Daniel Ziegenberg Date: Tue, 8 Nov 2022 23:46:14 +0100 Subject: [PATCH 1/6] feat: add support for Python 3.11 Signed-off-by: Daniel Ziegenberg --- .github/sync-repo-settings.yaml | 4 +++- .github/workflows/unittest.yml | 3 +++ CONTRIBUTING.rst | 6 ++++-- noxfile.py | 8 ++++---- setup.py | 1 + 5 files changed, 15 insertions(+), 7 deletions(-) diff --git a/.github/sync-repo-settings.yaml b/.github/sync-repo-settings.yaml index 6d2c2a0e..4db5c136 100644 --- a/.github/sync-repo-settings.yaml +++ b/.github/sync-repo-settings.yaml @@ -15,11 +15,13 @@ 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_wo_grpc-3.10' + - 'unit-3.11' + - 'unit_wo_grpc-3.11' - 'cover' - 'docs' - 'docfx' diff --git a/.github/workflows/unittest.yml b/.github/workflows/unittest.yml index cd1d4d60..9383f29f 100644 --- a/.github/workflows/unittest.yml +++ b/.github/workflows/unittest.yml @@ -17,6 +17,7 @@ jobs: - "3.8" - "3.9" - "3.10" + - "3.11" exclude: - option: "_wo_grpc" python: 3.7 @@ -24,6 +25,8 @@ jobs: python: 3.8 - option: "_wo_grpc" python: 3.9 + - option: "_wo_grpc" + python: 3.10 steps: - name: Checkout uses: actions/checkout@v3 diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index dddeddb9..13d7a516 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -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 @@ -71,7 +71,7 @@ We use `nox `__ to instrument our tests. - To run a single unit test:: - $ nox -s unit-3.10 -- -k + $ nox -s unit-3.11 -- -k .. note:: @@ -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`_. diff --git a/noxfile.py b/noxfile.py index 2d8f1e02..cec13932 100644 --- a/noxfile.py +++ b/noxfile.py @@ -104,7 +104,7 @@ def default(session, install_grpc=True): pytest_args = [ "python", "-m", - "py.test", + "pytest", *( # Helpful for running a single test or testfile. session.posargs @@ -137,13 +137,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( @@ -157,7 +157,7 @@ def unit_grpc_gcp(session): default(session) -@nox.session(python=["3.8", "3.10"]) +@nox.session(python=["3.8", "3.11"]) def unit_wo_grpc(session): """Run the unit test suite w/o grpcio installed""" default(session, install_grpc=False) diff --git a/setup.py b/setup.py index 1e746c8e..3346665f 100644 --- a/setup.py +++ b/setup.py @@ -86,6 +86,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", ], From 5ddd1091329aa04e4e19e289c955b5301f3f9926 Mon Sep 17 00:00:00 2001 From: Anthonios Partheniou Date: Thu, 10 Nov 2022 09:27:18 -0500 Subject: [PATCH 2/6] restore check for unit-3.10_wo_grpc --- .github/workflows/unittest.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/unittest.yml b/.github/workflows/unittest.yml index 9383f29f..0d7789b6 100644 --- a/.github/workflows/unittest.yml +++ b/.github/workflows/unittest.yml @@ -25,8 +25,6 @@ jobs: python: 3.8 - option: "_wo_grpc" python: 3.9 - - option: "_wo_grpc" - python: 3.10 steps: - name: Checkout uses: actions/checkout@v3 From 03f7054451764530db0caf66184bd022cbc10b31 Mon Sep 17 00:00:00 2001 From: Anthonios Partheniou Date: Thu, 10 Nov 2022 09:28:00 -0500 Subject: [PATCH 3/6] restore check for unit_wo_grpc-3.10 --- .github/sync-repo-settings.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/sync-repo-settings.yaml b/.github/sync-repo-settings.yaml index 4db5c136..cdec3e9b 100644 --- a/.github/sync-repo-settings.yaml +++ b/.github/sync-repo-settings.yaml @@ -21,6 +21,7 @@ branchProtectionRules: - 'unit-3.9' - 'unit-3.10' - 'unit-3.11' + - 'unit_wo_grpc-3.10' - 'unit_wo_grpc-3.11' - 'cover' - 'docs' From 3e608facd4a0cd61f2a44a6785dfc1ef431eb6e1 Mon Sep 17 00:00:00 2001 From: Anthonios Partheniou Date: Thu, 10 Nov 2022 09:42:22 -0500 Subject: [PATCH 4/6] restore 3.10 test --- noxfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/noxfile.py b/noxfile.py index 2b4253c6..9bc2d967 100644 --- a/noxfile.py +++ b/noxfile.py @@ -166,7 +166,7 @@ def unit_grpc_gcp(session): default(session) -@nox.session(python=["3.8", "3.11"]) +@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) From 90be1f8fc65e97581193f6b3af13a34fda127d2c Mon Sep 17 00:00:00 2001 From: Anthonios Partheniou Date: Thu, 10 Nov 2022 10:04:50 -0500 Subject: [PATCH 5/6] require grpcio 1.49.1 with python 3.11 --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index a62451eb..582d4c52 100644 --- a/setup.py +++ b/setup.py @@ -35,7 +35,7 @@ "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", } From 8872f25e64e1d890595449845c5efcda63d61bd3 Mon Sep 17 00:00:00 2001 From: Anthonios Partheniou Date: Thu, 10 Nov 2022 15:07:07 +0000 Subject: [PATCH 6/6] lint --- setup.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 582d4c52..6050e5c5 100644 --- a/setup.py +++ b/setup.py @@ -35,7 +35,12 @@ "requests >= 2.18.0, < 3.0.0dev", ] extras = { - "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'"], + "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", }