Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 31d043d

Browse filesBrowse files
feat: [Many APIs] Add support for Python 3.12 (#12069)
- [ ] Regenerate this pull request now. PiperOrigin-RevId: 586460538 Source-Link: googleapis/googleapis@44582d0 Source-Link: googleapis/googleapis-gen@5e7073c Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXRlbGNvYXV0b21hdGlvbi8uT3dsQm90LnlhbWwiLCJoIjoiNWU3MDczYzlkZTg0NzkyOWM0YWU5N2Y4YTQ0NGMzZmNhMmQ0NWE2YiJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXRleHR0b3NwZWVjaC8uT3dsQm90LnlhbWwiLCJoIjoiNWU3MDczYzlkZTg0NzkyOWM0YWU5N2Y4YTQ0NGMzZmNhMmQ0NWE2YiJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXRwdS8uT3dsQm90LnlhbWwiLCJoIjoiNWU3MDczYzlkZTg0NzkyOWM0YWU5N2Y4YTQ0NGMzZmNhMmQ0NWE2YiJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXZpZGVvLWxpdmUtc3RyZWFtLy5Pd2xCb3QueWFtbCIsImgiOiI1ZTcwNzNjOWRlODQ3OTI5YzRhZTk3ZjhhNDQ0YzNmY2EyZDQ1YTZiIn0= Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXZpZGVvLXN0aXRjaGVyLy5Pd2xCb3QueWFtbCIsImgiOiI1ZTcwNzNjOWRlODQ3OTI5YzRhZTk3ZjhhNDQ0YzNmY2EyZDQ1YTZiIn0= Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXZpZGVvLXRyYW5zY29kZXIv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N2Y4YTQ0NGMzZmNhMmQ0NWE2YiJ9 BEGIN_COMMIT_OVERRIDE feat: Add support for python 3.12 feat: Introduce compatibility with native namespace packages fix: Use `retry_async` instead of `retry` in async client fix: Require proto-plus >= 1.22.3 END_COMMIT_OVERRIDE --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Anthonios Partheniou <partheniou@google.com>
1 parent ea6cfc2 commit 31d043d
Copy full SHA for 31d043d

File tree

Expand file treeCollapse file tree

80 files changed

+651
-582
lines changed
Filter options

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Dismiss banner
Expand file treeCollapse file tree

80 files changed

+651
-582
lines changed

‎packages/google-cloud-video-live-stream/CONTRIBUTING.rst

Copy file name to clipboardExpand all lines: packages/google-cloud-video-live-stream/CONTRIBUTING.rst
+6-4Lines 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, 3.10 and 3.11 on both UNIX and Windows.
25+
3.7, 3.8, 3.9, 3.10, 3.11 and 3.12 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.11 -- -k <name of test>
75+
$ nox -s unit-3.12 -- -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.11 -- -k <name of test>
146+
$ nox -s system-3.12 -- -k <name of test>
147147

148148

149149
.. note::
150150

151-
System tests are only configured to run under Python 3.8, 3.9, 3.10 and 3.11.
151+
System tests are only configured to run under Python 3.8, 3.9, 3.10, 3.11 and 3.12.
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
@@ -226,12 +226,14 @@ We support:
226226
- `Python 3.9`_
227227
- `Python 3.10`_
228228
- `Python 3.11`_
229+
- `Python 3.12`_
229230

230231
.. _Python 3.7: https://docs.python.org/3.7/
231232
.. _Python 3.8: https://docs.python.org/3.8/
232233
.. _Python 3.9: https://docs.python.org/3.9/
233234
.. _Python 3.10: https://docs.python.org/3.10/
234235
.. _Python 3.11: https://docs.python.org/3.11/
236+
.. _Python 3.12: https://docs.python.org/3.12/
235237

236238

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

‎packages/google-cloud-video-live-stream/google/cloud/video/live_stream_v1/services/livestream_service/async_client.py

Copy file name to clipboardExpand all lines: packages/google-cloud-video-live-stream/google/cloud/video/live_stream_v1/services/livestream_service/async_client.py
+43-43Lines changed: 43 additions & 43 deletions
Large diffs are not rendered by default.

‎packages/google-cloud-video-live-stream/noxfile.py

Copy file name to clipboardExpand all lines: packages/google-cloud-video-live-stream/noxfile.py
+6-3Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,13 @@
2929

3030
BLACK_VERSION = "black[jupyter]==23.7.0"
3131
ISORT_VERSION = "isort==5.11.0"
32+
3233
LINT_PATHS = ["docs", "google", "tests", "noxfile.py", "setup.py"]
3334

35+
3436
DEFAULT_PYTHON_VERSION = "3.10"
3537

36-
UNIT_TEST_PYTHON_VERSIONS: List[str] = ["3.7", "3.8", "3.9", "3.10", "3.11"]
38+
UNIT_TEST_PYTHON_VERSIONS: List[str] = ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
3739
UNIT_TEST_STANDARD_DEPENDENCIES = [
3840
"mock",
3941
"asyncmock",
@@ -47,7 +49,7 @@
4749
UNIT_TEST_EXTRAS: List[str] = []
4850
UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {}
4951

50-
SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.8", "3.9", "3.10", "3.11"]
52+
SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.8", "3.9", "3.10", "3.11", "3.12"]
5153
SYSTEM_TEST_STANDARD_DEPENDENCIES = [
5254
"mock",
5355
"pytest",
@@ -89,6 +91,7 @@ def lint(session):
8991
"--check",
9092
*LINT_PATHS,
9193
)
94+
9295
session.run("flake8", "google", "tests")
9396

9497

@@ -336,7 +339,7 @@ def docfx(session):
336339
)
337340

338341

339-
@nox.session(python="3.11")
342+
@nox.session(python="3.12")
340343
def prerelease_deps(session):
341344
"""Run all tests with prerelease versions of dependencies installed."""
342345

‎packages/google-cloud-video-live-stream/setup.py

Copy file name to clipboardExpand all lines: packages/google-cloud-video-live-stream/setup.py
+10-10Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#
1616
import io
1717
import os
18+
import re
1819

1920
import setuptools # type: ignore
2021

@@ -25,12 +26,14 @@
2526

2627
description = "Google Cloud Video Live Stream API client library"
2728

28-
version = {}
29+
version = None
30+
2931
with open(
3032
os.path.join(package_root, "google/cloud/video/live_stream/gapic_version.py")
3133
) as fp:
32-
exec(fp.read(), version)
33-
version = version["__version__"]
34+
version_candidates = re.findall(r"(?<=\")\d+.\d+.\d+(?=\")", fp.read())
35+
assert len(version_candidates) == 1
36+
version = version_candidates[0]
3437

3538
if version[0] == "0":
3639
release_status = "Development Status :: 4 - Beta"
@@ -39,11 +42,10 @@
3942

4043
dependencies = [
4144
"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.*",
42-
"proto-plus >= 1.22.0, <2.0.0dev",
43-
"proto-plus >= 1.22.2, <2.0.0dev; python_version>='3.11'",
45+
"proto-plus >= 1.22.3, <2.0.0dev",
4446
"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",
4547
]
46-
url = "https://github.com/googleapis/google-cloud-python"
48+
url = "https://github.com/googleapis/google-cloud-python/tree/main/packages/google-cloud-video-live-stream"
4749

4850
package_root = os.path.abspath(os.path.dirname(__file__))
4951

@@ -53,12 +55,10 @@
5355

5456
packages = [
5557
package
56-
for package in setuptools.PEP420PackageFinder.find()
58+
for package in setuptools.find_namespace_packages()
5759
if package.startswith("google")
5860
]
5961

60-
namespaces = ["google", "google.cloud", "google.cloud.video"]
61-
6262
setuptools.setup(
6363
name=name,
6464
version=version,
@@ -79,13 +79,13 @@
7979
"Programming Language :: Python :: 3.9",
8080
"Programming Language :: Python :: 3.10",
8181
"Programming Language :: Python :: 3.11",
82+
"Programming Language :: Python :: 3.12",
8283
"Operating System :: OS Independent",
8384
"Topic :: Internet",
8485
],
8586
platforms="Posix; MacOS X; Windows",
8687
packages=packages,
8788
python_requires=">=3.7",
88-
namespace_packages=namespaces,
8989
install_requires=dependencies,
9090
include_package_data=True,
9191
zip_safe=False,

‎packages/google-cloud-video-live-stream/testing/constraints-3.7.txt

Copy file name to clipboardExpand all lines: packages/google-cloud-video-live-stream/testing/constraints-3.7.txt
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@
55
# e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0dev",
66
# Then this file should have google-cloud-foo==1.14.0
77
google-api-core==1.34.0
8-
proto-plus==1.22.0
8+
proto-plus==1.22.3
99
protobuf==3.19.5

‎packages/google-cloud-video-live-stream/tests/unit/gapic/live_stream_v1/test_livestream_service.py

Copy file name to clipboardExpand all lines: packages/google-cloud-video-live-stream/tests/unit/gapic/live_stream_v1/test_livestream_service.py
+5-5Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15255,7 +15255,7 @@ def test_delete_operation(transport: str = "grpc"):
1525515255

1525615256

1525715257
@pytest.mark.asyncio
15258-
async def test_delete_operation_async(transport: str = "grpc"):
15258+
async def test_delete_operation_async(transport: str = "grpc_asyncio"):
1525915259
client = LivestreamServiceAsyncClient(
1526015260
credentials=ga_credentials.AnonymousCredentials(),
1526115261
transport=transport,
@@ -15394,7 +15394,7 @@ def test_cancel_operation(transport: str = "grpc"):
1539415394

1539515395

1539615396
@pytest.mark.asyncio
15397-
async def test_cancel_operation_async(transport: str = "grpc"):
15397+
async def test_cancel_operation_async(transport: str = "grpc_asyncio"):
1539815398
client = LivestreamServiceAsyncClient(
1539915399
credentials=ga_credentials.AnonymousCredentials(),
1540015400
transport=transport,
@@ -15533,7 +15533,7 @@ def test_get_operation(transport: str = "grpc"):
1553315533

1553415534

1553515535
@pytest.mark.asyncio
15536-
async def test_get_operation_async(transport: str = "grpc"):
15536+
async def test_get_operation_async(transport: str = "grpc_asyncio"):
1553715537
client = LivestreamServiceAsyncClient(
1553815538
credentials=ga_credentials.AnonymousCredentials(),
1553915539
transport=transport,
@@ -15678,7 +15678,7 @@ def test_list_operations(transport: str = "grpc"):
1567815678

1567915679

1568015680
@pytest.mark.asyncio
15681-
async def test_list_operations_async(transport: str = "grpc"):
15681+
async def test_list_operations_async(transport: str = "grpc_asyncio"):
1568215682
client = LivestreamServiceAsyncClient(
1568315683
credentials=ga_credentials.AnonymousCredentials(),
1568415684
transport=transport,
@@ -15823,7 +15823,7 @@ def test_list_locations(transport: str = "grpc"):
1582315823

1582415824

1582515825
@pytest.mark.asyncio
15826-
async def test_list_locations_async(transport: str = "grpc"):
15826+
async def test_list_locations_async(transport: str = "grpc_asyncio"):
1582715827
client = LivestreamServiceAsyncClient(
1582815828
credentials=ga_credentials.AnonymousCredentials(),
1582915829
transport=transport,

‎packages/google-cloud-video-stitcher/CONTRIBUTING.rst

Copy file name to clipboardExpand all lines: packages/google-cloud-video-stitcher/CONTRIBUTING.rst
+6-4Lines 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, 3.10 and 3.11 on both UNIX and Windows.
25+
3.7, 3.8, 3.9, 3.10, 3.11 and 3.12 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.11 -- -k <name of test>
75+
$ nox -s unit-3.12 -- -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.11 -- -k <name of test>
146+
$ nox -s system-3.12 -- -k <name of test>
147147

148148

149149
.. note::
150150

151-
System tests are only configured to run under Python 3.8, 3.9, 3.10 and 3.11.
151+
System tests are only configured to run under Python 3.8, 3.9, 3.10, 3.11 and 3.12.
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
@@ -226,12 +226,14 @@ We support:
226226
- `Python 3.9`_
227227
- `Python 3.10`_
228228
- `Python 3.11`_
229+
- `Python 3.12`_
229230

230231
.. _Python 3.7: https://docs.python.org/3.7/
231232
.. _Python 3.8: https://docs.python.org/3.8/
232233
.. _Python 3.9: https://docs.python.org/3.9/
233234
.. _Python 3.10: https://docs.python.org/3.10/
234235
.. _Python 3.11: https://docs.python.org/3.11/
236+
.. _Python 3.12: https://docs.python.org/3.12/
235237

236238

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

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.