| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 042dc5c commit 01d3127
11 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -382,7 +382,7 @@ replacements: | |||
| 382 | 382 | - "packages/google-cloud-pubsub/setup.py" | |
| 383 | 383 | before: '([ \t]+)("grpc-google-iam-v1.*",\n)\]\nextras = \{\}' | |
| 384 | 384 | after: |- | |
| 385 | - \g<1>\g<2>\g<1>"grpcio-status >= 1.44.0", | ||
| 385 | + \g<1>\g<2>\g<1>"grpcio-status >= 1.51.3", | ||
| 386 | 386 | \g<1>"opentelemetry-api >= 1.27.0", | |
| 387 | 387 | \g<1>"opentelemetry-sdk >= 1.27.0", | |
| 388 | 388 | ] | |
@@ -511,3 +511,27 @@ replacements: | |||
| 511 | 511 | \g<1>"pubsub_v1/**", | |
| 512 | 512 | \g<1>"_build", | |
| 513 | 513 | count: 1 | |
| 514 | + | ||
| 515 | + - paths: | ||
| 516 | + - "packages/google-cloud-pubsub/testing/constraints-3.10.txt" | ||
| 517 | + before: 'grpc-google-iam-v1==0\.14\.0\n(?!grpcio-status)' | ||
| 518 | + after: |- | ||
| 519 | + grpc-google-iam-v1==0.14.0 | ||
| 520 | + grpcio-status==1.51.3 | ||
| 521 | + opentelemetry-api==1.27.0 | ||
| 522 | + opentelemetry-sdk==1.27.0 | ||
| 523 | + count: 1 | ||
| 524 | + | ||
| 525 | + - paths: | ||
| 526 | + - "packages/google-cloud-pubsub/testing/constraints-3.10.txt" | ||
| 527 | + before: 'grpcio==1.44.0' | ||
| 528 | + after: 'grpcio==1.51.3' | ||
| 529 | + count: 1 | ||
| 530 | + | ||
| 531 | + - paths: | ||
| 532 | + - "packages/google-cloud-pubsub/setup.py" | ||
| 533 | + before: '"grpcio-status >= 1\.44\.0",' | ||
| 534 | + after: '"grpcio-status >= 1.51.3",' | ||
| 535 | + count: 1 | ||
| 536 | + | ||
| 537 | + | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1661,7 +1661,6 @@ libraries: | |||
| 1661 | 1661 | version: 2.38.0 | |
| 1662 | 1662 | apis: | |
| 1663 | 1663 | - path: google/pubsub/v1 | |
| 1664 | - skip_generate: true | ||
| 1665 | 1664 | python: | |
| 1666 | 1665 | library_type: GAPIC_COMBO | |
| 1667 | 1666 | opt_args_by_api: | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,5 +1,5 @@ | |||
| 1 | 1 | # -*- coding: utf-8 -*- | |
| 2 | - # Copyright 2025 Google LLC | ||
| 2 | + # Copyright 2026 Google LLC | ||
| 3 | 3 | # | |
| 4 | 4 | # Licensed under the Apache License, Version 2.0 (the "License"); | |
| 5 | 5 | # you may not use this file except in compliance with the License. | |
@@ -83,7 +83,7 @@ | |||
| 83 | 83 | ||
| 84 | 84 | # General information about the project. | |
| 85 | 85 | project = "google-cloud-pubsub" | |
| 86 | - copyright = "2025, Google, LLC" | ||
| 86 | + copyright = "2026, Google, LLC" | ||
| 87 | 87 | author = "Google APIs" | |
| 88 | 88 | ||
| 89 | 89 | # The version info for the project you're documenting, acts as replacement for | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,5 +1,5 @@ | |||
| 1 | 1 | # -*- coding: utf-8 -*- | |
| 2 | - # Copyright 2025 Google LLC | ||
| 2 | + # Copyright 2026 Google LLC | ||
| 3 | 3 | # | |
| 4 | 4 | # Licensed under the Apache License, Version 2.0 (the "License"); | |
| 5 | 5 | # you may not use this file except in compliance with the License. | |
@@ -21,13 +21,7 @@ | |||
| 21 | 21 | ||
| 22 | 22 | __version__ = package_version.__version__ | |
| 23 | 23 | ||
| 24 | - if sys.version_info >= (3, 8): # pragma: NO COVER | ||
| 25 | - from importlib import metadata | ||
| 26 | - else: # pragma: NO COVER | ||
| 27 | - # TODO(https://github.com/googleapis/python-api-core/issues/835): Remove | ||
| 28 | - # this code path once we drop support for Python 3.7 | ||
| 29 | - import importlib_metadata as metadata | ||
| 30 | - | ||
| 24 | + from importlib import metadata | ||
| 31 | 25 | ||
| 32 | 26 | from .services.publisher import PublisherAsyncClient, PublisherClient | |
| 33 | 27 | from .services.schema_service import SchemaServiceAsyncClient, SchemaServiceClient | |
@@ -116,28 +110,17 @@ | |||
| 116 | 110 | # An older version of api_core is installed which does not define the | |
| 117 | 111 | # functions above. We do equivalent checks manually. | |
| 118 | 112 | try: | |
| 119 | - import sys | ||
| 120 | 113 | import warnings | |
| 121 | 114 | ||
| 122 | 115 | _py_version_str = sys.version.split()[0] | |
| 123 | 116 | _package_label = "google.pubsub_v1" | |
| 124 | - if sys.version_info < (3, 9): | ||
| 117 | + if sys.version_info < (3, 10): | ||
| 125 | 118 | warnings.warn( | |
| 126 | 119 | "You are using a non-supported Python version " | |
| 127 | 120 | + f"({_py_version_str}). Google will not post any further " | |
| 128 | 121 | + f"updates to {_package_label} supporting this Python version. " | |
| 129 | 122 | + "Please upgrade to the latest Python version, or at " | |
| 130 | - + f"least to Python 3.9, and then update {_package_label}.", | ||
| 131 | - FutureWarning, | ||
| 132 | - ) | ||
| 133 | - if sys.version_info[:2] == (3, 9): | ||
| 134 | - warnings.warn( | ||
| 135 | - f"You are using a Python version ({_py_version_str}) " | ||
| 136 | - + f"which Google will stop supporting in {_package_label} in " | ||
| 137 | - + "January 2026. Please " | ||
| 138 | - + "upgrade to the latest Python version, or at " | ||
| 139 | - + "least to Python 3.10, before then, and " | ||
| 140 | - + f"then update {_package_label}.", | ||
| 123 | + + f"least to Python 3.10, and then update {_package_label}.", | ||
| 141 | 124 | FutureWarning, | |
| 142 | 125 | ) | |
| 143 | 126 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,5 +1,5 @@ | |||
| 1 | 1 | # -*- coding: utf-8 -*- | |
| 2 | - # Copyright 2025 Google LLC | ||
| 2 | + # Copyright 2026 Google LLC | ||
| 3 | 3 | # | |
| 4 | 4 | # Licensed under the Apache License, Version 2.0 (the "License"); | |
| 5 | 5 | # you may not use this file except in compliance with the License. | |
@@ -31,7 +31,6 @@ | |||
| 31 | 31 | LINT_PATHS.append("samples") | |
| 32 | 32 | ||
| 33 | 33 | ALL_PYTHON = [ | |
| 34 | - "3.9", | ||
| 35 | 34 | "3.10", | |
| 36 | 35 | "3.11", | |
| 37 | 36 | "3.12", | |
@@ -439,7 +438,6 @@ def docs(session): | |||
| 439 | 438 | shutil.rmtree(os.path.join("docs", "_build"), ignore_errors=True) | |
| 440 | 439 | session.run( | |
| 441 | 440 | "sphinx-build", | |
| 442 | - "-W", # warnings as errors | ||
| 443 | 441 | "-T", # show full traceback on exception | |
| 444 | 442 | "-N", # no colors | |
| 445 | 443 | "-b", | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,5 +1,5 @@ | |||
| 1 | 1 | # -*- coding: utf-8 -*- | |
| 2 | - # Copyright 2025 Google LLC | ||
| 2 | + # Copyright 2026 Google LLC | ||
| 3 | 3 | # | |
| 4 | 4 | # Licensed under the Apache License, Version 2.0 (the "License"); | |
| 5 | 5 | # you may not use this file except in compliance with the License. | |
@@ -39,7 +39,7 @@ | |||
| 39 | 39 | release_status = "Development Status :: 5 - Production/Stable" | |
| 40 | 40 | ||
| 41 | 41 | dependencies = [ | |
| 42 | - "google-api-core[grpc] >= 2.11.0, <3.0.0", | ||
| 42 | + "google-api-core[grpc] >= 2.17.1, <3.0.0", | ||
| 43 | 43 | # Exclude incompatible versions of `google-auth` | |
| 44 | 44 | # See https://github.com/googleapis/google-cloud-python/issues/12364 | |
| 45 | 45 | "google-auth >= 2.14.1, <3.0.0,!=2.24.0,!=2.25.0", | |
@@ -48,7 +48,7 @@ | |||
| 48 | 48 | "proto-plus >= 1.25.0, <2.0.0; python_version >= '3.13'", | |
| 49 | 49 | "protobuf >= 4.25.8, < 8.0.0", | |
| 50 | 50 | "grpc-google-iam-v1 >= 0.14.0, <1.0.0", | |
| 51 | - "grpcio-status >= 1.33.2", | ||
| 51 | + "grpcio-status >= 1.51.3", | ||
| 52 | 52 | "opentelemetry-api >= 1.27.0", | |
| 53 | 53 | "opentelemetry-sdk >= 1.27.0", | |
| 54 | 54 | ] | |
@@ -74,15 +74,14 @@ | |||
| 74 | 74 | long_description=readme, | |
| 75 | 75 | author="Google LLC", | |
| 76 | 76 | author_email="googleapis-packages@google.com", | |
| 77 | - license="Apache 2.0", | ||
| 77 | + license="Apache-2.0", | ||
| 78 | 78 | url=url, | |
| 79 | 79 | classifiers=[ | |
| 80 | 80 | release_status, | |
| 81 | 81 | "Intended Audience :: Developers", | |
| 82 | 82 | "License :: OSI Approved :: Apache Software License", | |
| 83 | 83 | "Programming Language :: Python", | |
| 84 | 84 | "Programming Language :: Python :: 3", | |
| 85 | - "Programming Language :: Python :: 3.9", | ||
| 86 | 85 | "Programming Language :: Python :: 3.10", | |
| 87 | 86 | "Programming Language :: Python :: 3.11", | |
| 88 | 87 | "Programming Language :: Python :: 3.12", | |
@@ -93,7 +92,7 @@ | |||
| 93 | 92 | ], | |
| 94 | 93 | platforms="Posix; MacOS X; Windows", | |
| 95 | 94 | packages=packages, | |
| 96 | - python_requires=">=3.9", | ||
| 95 | + python_requires=">=3.10", | ||
| 97 | 96 | install_requires=dependencies, | |
| 98 | 97 | extras_require=extras, | |
| 99 | 98 | include_package_data=True, | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,11 +1,15 @@ | |||
| 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 | - google-auth | ||
| 6 | - grpcio | ||
| 7 | - proto-plus | ||
| 8 | - protobuf | ||
| 9 | - # cryptography is a direct dependency of google-auth | ||
| 10 | - cryptography | ||
| 11 | - grpc-google-iam-v1 | ||
| 1 | + # This constraints file is used to check that lower bounds | ||
| 2 | + # are correct in setup.py | ||
| 3 | + # List all library dependencies and extras in this file, | ||
| 4 | + # pinning their versions to their lower bounds. | ||
| 5 | + # For example, if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", | ||
| 6 | + # then this file should have google-cloud-foo==1.14.0 | ||
| 7 | + google-api-core==2.17.1 | ||
| 8 | + google-auth==2.14.1 | ||
| 9 | + grpcio==1.51.3 | ||
| 10 | + proto-plus==1.22.3 | ||
| 11 | + protobuf==4.25.8 | ||
| 12 | + grpc-google-iam-v1==0.14.0 | ||
| 13 | + grpcio-status==1.51.3 | ||
| 14 | + opentelemetry-api==1.27.0 | ||
| 15 | + opentelemetry-sdk==1.27.0 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,5 +1,5 @@ | |||
| 1 | 1 | # -*- coding: utf-8 -*- | |
| 2 | - # Copyright 2025 Google LLC | ||
| 2 | + # Copyright 2026 Google LLC | ||
| 3 | 3 | # | |
| 4 | 4 | # Licensed under the Apache License, Version 2.0 (the "License"); | |
| 5 | 5 | # you may not use this file except in compliance with the License. | |
@@ -13,18 +13,12 @@ | |||
| 13 | 13 | # See the License for the specific language governing permissions and | |
| 14 | 14 | # limitations under the License. | |
| 15 | 15 | # | |
| 16 | - import os | ||
| 17 | - | ||
| 18 | - # try/except added for compatibility with python < 3.8 | ||
| 19 | - try: | ||
| 20 | - from unittest import mock | ||
| 21 | - from unittest.mock import AsyncMock # pragma: NO COVER | ||
| 22 | - except ImportError: # pragma: NO COVER | ||
| 23 | - import mock | ||
| 24 | - | ||
| 25 | 16 | import json | |
| 26 | 17 | import math | |
| 18 | + import os | ||
| 27 | 19 | from collections.abc import AsyncIterable, Iterable, Mapping, Sequence | |
| 20 | + from unittest import mock | ||
| 21 | + from unittest.mock import AsyncMock | ||
| 28 | 22 | ||
| 29 | 23 | import grpc | |
| 30 | 24 | import pytest | |
@@ -3120,11 +3114,7 @@ async def test_list_topics_async_pages(): | |||
| 3120 | 3114 | RuntimeError, | |
| 3121 | 3115 | ) | |
| 3122 | 3116 | pages = [] | |
| 3123 | - # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` | ||
| 3124 | - # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 | ||
| 3125 | - async for page_ in ( # pragma: no branch | ||
| 3126 | - await client.list_topics(request={}) | ||
| 3127 | - ).pages: | ||
| 3117 | + async for page_ in (await client.list_topics(request={})).pages: | ||
| 3128 | 3118 | pages.append(page_) | |
| 3129 | 3119 | for page_, token in zip(pages, ["abc", "def", "ghi", ""]): | |
| 3130 | 3120 | assert page_.raw_page.next_page_token == token | |
@@ -3672,11 +3662,7 @@ async def test_list_topic_subscriptions_async_pages(): | |||
| 3672 | 3662 | RuntimeError, | |
| 3673 | 3663 | ) | |
| 3674 | 3664 | pages = [] | |
| 3675 | - # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` | ||
| 3676 | - # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 | ||
| 3677 | - async for page_ in ( # pragma: no branch | ||
| 3678 | - await client.list_topic_subscriptions(request={}) | ||
| 3679 | - ).pages: | ||
| 3665 | + async for page_ in (await client.list_topic_subscriptions(request={})).pages: | ||
| 3680 | 3666 | pages.append(page_) | |
| 3681 | 3667 | for page_, token in zip(pages, ["abc", "def", "ghi", ""]): | |
| 3682 | 3668 | assert page_.raw_page.next_page_token == token | |
@@ -4221,11 +4207,7 @@ async def test_list_topic_snapshots_async_pages(): | |||
| 4221 | 4207 | RuntimeError, | |
| 4222 | 4208 | ) | |
| 4223 | 4209 | pages = [] | |
| 4224 | - # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` | ||
| 4225 | - # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 | ||
| 4226 | - async for page_ in ( # pragma: no branch | ||
| 4227 | - await client.list_topic_snapshots(request={}) | ||
| 4228 | - ).pages: | ||
| 4210 | + async for page_ in (await client.list_topic_snapshots(request={})).pages: | ||
| 4229 | 4211 | pages.append(page_) | |
| 4230 | 4212 | for page_, token in zip(pages, ["abc", "def", "ghi", ""]): | |
| 4231 | 4213 | assert page_.raw_page.next_page_token == token | |
@@ -4898,7 +4880,7 @@ def test_create_topic_rest_required_fields(request_type=pubsub.Topic): | |||
| 4898 | 4880 | ||
| 4899 | 4881 | expected_params = [("$alt", "json;enum-encoding=int")] | |
| 4900 | 4882 | actual_params = req.call_args.kwargs["params"] | |
| 4901 | - assert expected_params == actual_params | ||
| 4883 | + assert sorted(expected_params) == sorted(actual_params) | ||
| 4902 | 4884 | ||
| 4903 | 4885 | ||
| 4904 | 4886 | def test_create_topic_rest_unset_required_fields(): | |
@@ -5068,7 +5050,7 @@ def test_update_topic_rest_required_fields(request_type=pubsub.UpdateTopicReques | |||
| 5068 | 5050 | ||
| 5069 | 5051 | expected_params = [("$alt", "json;enum-encoding=int")] | |
| 5070 | 5052 | actual_params = req.call_args.kwargs["params"] | |
| 5071 | - assert expected_params == actual_params | ||
| 5053 | + assert sorted(expected_params) == sorted(actual_params) | ||
| 5072 | 5054 | ||
| 5073 | 5055 | ||
| 5074 | 5056 | def test_update_topic_rest_unset_required_fields(): | |
@@ -5253,7 +5235,7 @@ def test_publish_rest_required_fields(request_type=pubsub.PublishRequest): | |||
| 5253 | 5235 | ||
| 5254 | 5236 | expected_params = [("$alt", "json;enum-encoding=int")] | |
| 5255 | 5237 | actual_params = req.call_args.kwargs["params"] | |
| 5256 | - assert expected_params == actual_params | ||
| 5238 | + assert sorted(expected_params) == sorted(actual_params) | ||
| 5257 | 5239 | ||
| 5258 | 5240 | ||
| 5259 | 5241 | def test_publish_rest_unset_required_fields(): | |
@@ -5438,7 +5420,7 @@ def test_get_topic_rest_required_fields(request_type=pubsub.GetTopicRequest): | |||
| 5438 | 5420 | ||
| 5439 | 5421 | expected_params = [("$alt", "json;enum-encoding=int")] | |
| 5440 | 5422 | actual_params = req.call_args.kwargs["params"] | |
| 5441 | - assert expected_params == actual_params | ||
| 5423 | + assert sorted(expected_params) == sorted(actual_params) | ||
| 5442 | 5424 | ||
| 5443 | 5425 | ||
| 5444 | 5426 | def test_get_topic_rest_unset_required_fields(): | |
@@ -5619,7 +5601,7 @@ def test_list_topics_rest_required_fields(request_type=pubsub.ListTopicsRequest) | |||
| 5619 | 5601 | ||
| 5620 | 5602 | expected_params = [("$alt", "json;enum-encoding=int")] | |
| 5621 | 5603 | actual_params = req.call_args.kwargs["params"] | |
| 5622 | - assert expected_params == actual_params | ||
| 5604 | + assert sorted(expected_params) == sorted(actual_params) | ||
| 5623 | 5605 | ||
| 5624 | 5606 | ||
| 5625 | 5607 | def test_list_topics_rest_unset_required_fields(): | |
@@ -5876,7 +5858,7 @@ def test_list_topic_subscriptions_rest_required_fields( | |||
| 5876 | 5858 | ||
| 5877 | 5859 | expected_params = [("$alt", "json;enum-encoding=int")] | |
| 5878 | 5860 | actual_params = req.call_args.kwargs["params"] | |
| 5879 | - assert expected_params == actual_params | ||
| 5861 | + assert sorted(expected_params) == sorted(actual_params) | ||
| 5880 | 5862 | ||
| 5881 | 5863 | ||
| 5882 | 5864 | def test_list_topic_subscriptions_rest_unset_required_fields(): | |
@@ -6135,7 +6117,7 @@ def test_list_topic_snapshots_rest_required_fields( | |||
| 6135 | 6117 | ||
| 6136 | 6118 | expected_params = [("$alt", "json;enum-encoding=int")] | |
| 6137 | 6119 | actual_params = req.call_args.kwargs["params"] | |
| 6138 | - assert expected_params == actual_params | ||
| 6120 | + assert sorted(expected_params) == sorted(actual_params) | ||
| 6139 | 6121 | ||
| 6140 | 6122 | ||
| 6141 | 6123 | def test_list_topic_snapshots_rest_unset_required_fields(): | |
@@ -6376,7 +6358,7 @@ def test_delete_topic_rest_required_fields(request_type=pubsub.DeleteTopicReques | |||
| 6376 | 6358 | ||
| 6377 | 6359 | expected_params = [("$alt", "json;enum-encoding=int")] | |
| 6378 | 6360 | actual_params = req.call_args.kwargs["params"] | |
| 6379 | - assert expected_params == actual_params | ||
| 6361 | + assert sorted(expected_params) == sorted(actual_params) | ||
| 6380 | 6362 | ||
| 6381 | 6363 | ||
| 6382 | 6364 | def test_delete_topic_rest_unset_required_fields(): | |
@@ -6554,7 +6536,7 @@ def test_detach_subscription_rest_required_fields( | |||
| 6554 | 6536 | ||
| 6555 | 6537 | expected_params = [("$alt", "json;enum-encoding=int")] | |
| 6556 | 6538 | actual_params = req.call_args.kwargs["params"] | |
| 6557 | - assert expected_params == actual_params | ||
| 6539 | + assert sorted(expected_params) == sorted(actual_params) | ||
| 6558 | 6540 | ||
| 6559 | 6541 | ||
| 6560 | 6542 | def test_detach_subscription_rest_unset_required_fields(): | |
| Back | FazBrowse Home | New Git URL |
0 commit comments