Skip to content

Commit e5f88ee

Browse files
feat: Add support for python 3.11 (#10812)
* feat: Add support for python 3.11 chore: Update gapic-generator-python to v1.8.0 PiperOrigin-RevId: 500768693 Source-Link: googleapis/googleapis@190b612 Source-Link: googleapis/googleapis-gen@7bf29a4 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWFwcHMtc2NyaXB0LXR5cGUvLk93bEJvdC55YW1sIiwiaCI6IjdiZjI5YTQxNGI5ZWNhYzMxNzBmMGI2NWJkYzJhOTU3MDVjMGVmMWEifQ== Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWNvbnRlbnR3YXJlaG91c2UvLk93bEJvdC55YW1sIiwiaCI6IjdiZjI5YTQxNGI5ZWNhYzMxNzBmMGI2NWJkYzJhOTU3MDVjMGVmMWEifQ== Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWRpc2NvdmVyeWVuZ2luZS8uT3dsQm90LnlhbWwiLCJoIjoiN2JmMjlhNDE0YjllY2FjMzE3MGYwYjY1YmRjMmE5NTcwNWMwZWYxYSJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWVudGVycHJpc2Vrbm93bGVkZ2VncmFwaC8uT3dsQm90LnlhbWwiLCJoIjoiN2JmMjlhNDE0YjllY2FjMzE3MGYwYjY1YmRjMmE5NTcwNWMwZWYxYSJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXZtd2FyZWVuZ2luZS8uT3dsQm90LnlhbWwiLCJoIjoiN2JmMjlhNDE0YjllY2FjMzE3MGYwYjY1YmRjMmE5NTcwNWMwZWYxYSJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWdlby10eXBlLy5Pd2xCb3QueWFtbCIsImgiOiI3YmYyOWE0MTRiOWVjYWMzMTcwZjBiNjViZGMyYTk1NzA1YzBlZjFhIn0= Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLW1hcHMtYWRkcmVzc3ZhbGlkYXRpb24vLk93bEJvdC55YW1sIiwiaCI6IjdiZjI5YTQxNGI5ZWNhYzMxNzBmMGI2NWJkYzJhOTU3MDVjMGVmMWEifQ== Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLW1hcHMtcm91dGluZy8uT3dsQm90LnlhbWwiLCJoIjoiN2JmMjlhNDE0YjllY2FjMzE3MGYwYjY1YmRjMmE5NTcwNWMwZWYxYSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * work around bugs in gapic generator * revert * revert * update prerelease test to use python 3.11 * update prerelease test to use python 3.11 Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Anthonios Partheniou <partheniou@google.com>
1 parent eb58f8c commit e5f88ee

File tree

67 files changed

+173
-69
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+173
-69
lines changed

.github/workflows/unittest.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
runs-on: ubuntu-latest
4444
strategy:
4545
matrix:
46-
python: ['3.10']
46+
python: ['3.11']
4747
steps:
4848
- name: Checkout
4949
uses: actions/checkout@v3

ci/run_single_test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ case ${TEST_TYPE} in
5757
retval=$?
5858
;;
5959
prerelease)
60-
nox -s prerelease_deps-3.10
60+
nox -s prerelease_deps-3.11
6161
retval=$?
6262
;;
6363
unit)

packages/google-apps-script-type/CONTRIBUTING.rst

Lines changed: 4 additions & 2 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::
@@ -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`_.

packages/google-apps-script-type/noxfile.py

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

3333
DEFAULT_PYTHON_VERSION = "3.9"
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",
@@ -337,7 +337,7 @@ def docfx(session):
337337
)
338338

339339

340-
@nox.session(python="3.10")
340+
@nox.session(python="3.11")
341341
def prerelease_deps(session):
342342
"""Run all tests with prerelease versions of dependencies installed."""
343343

packages/google-apps-script-type/setup.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,10 @@
3838
dependencies = [
3939
"google-api-core[grpc] >= 1.34.0, <3.0.0dev,!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.*,!=2.4.*,!=2.5.*,!=2.6.*,!=2.7.*,!=2.8.*,!=2.9.*,!=2.10.*",
4040
"proto-plus >= 1.22.0, <2.0.0dev",
41+
"proto-plus >= 1.22.2, <2.0.0dev; python_version>='3.11'",
4142
"protobuf>=3.19.5,<5.0.0dev,!=3.20.0,!=3.20.1,!=4.21.0,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5",
4243
]
43-
url = "https://github.com/googleapis/python-apps-script-type"
44+
url = "https://github.com/googleapis/google-cloud-python"
4445

4546
package_root = os.path.abspath(os.path.dirname(__file__))
4647

@@ -77,6 +78,7 @@
7778
"Programming Language :: Python :: 3.8",
7879
"Programming Language :: Python :: 3.9",
7980
"Programming Language :: Python :: 3.10",
81+
"Programming Language :: Python :: 3.11",
8082
"Operating System :: OS Independent",
8183
"Topic :: Internet",
8284
],
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# -*- coding: utf-8 -*-
2+
# This constraints file is required for unit tests.
3+
# List all library dependencies and extras in this file.
4+
google-api-core
5+
proto-plus
6+
protobuf

packages/google-cloud-contentwarehouse/CONTRIBUTING.rst

Lines changed: 4 additions & 2 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::
@@ -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`_.

packages/google-cloud-contentwarehouse/google/cloud/contentwarehouse_v1/services/document_link_service/async_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ def get_mtls_endpoint_and_cert_source(
144144
The API endpoint is determined in the following order:
145145
(1) if `client_options.api_endpoint` if provided, use the provided one.
146146
(2) if `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is "always", use the
147-
default mTLS endpoint; if the environment variabel is "never", use the default API
147+
default mTLS endpoint; if the environment variable is "never", use the default API
148148
endpoint; otherwise if client cert source exists, use the default mTLS endpoint, otherwise
149149
use the default API endpoint.
150150

packages/google-cloud-contentwarehouse/google/cloud/contentwarehouse_v1/services/document_link_service/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ def get_mtls_endpoint_and_cert_source(
320320
The API endpoint is determined in the following order:
321321
(1) if `client_options.api_endpoint` if provided, use the provided one.
322322
(2) if `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is "always", use the
323-
default mTLS endpoint; if the environment variabel is "never", use the default API
323+
default mTLS endpoint; if the environment variable is "never", use the default API
324324
endpoint; otherwise if client cert source exists, use the default mTLS endpoint, otherwise
325325
use the default API endpoint.
326326

packages/google-cloud-contentwarehouse/google/cloud/contentwarehouse_v1/services/document_schema_service/async_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ def get_mtls_endpoint_and_cert_source(
149149
The API endpoint is determined in the following order:
150150
(1) if `client_options.api_endpoint` if provided, use the provided one.
151151
(2) if `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is "always", use the
152-
default mTLS endpoint; if the environment variabel is "never", use the default API
152+
default mTLS endpoint; if the environment variable is "never", use the default API
153153
endpoint; otherwise if client cert source exists, use the default mTLS endpoint, otherwise
154154
use the default API endpoint.
155155

0 commit comments

Comments
 (0)