| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent a5fb6cf commit 2904f05
218 files changed
| 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-shopping-css" | |
| 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.account_labels_service import ( | |
| 33 | 27 | AccountLabelsServiceAsyncClient, | |
@@ -97,28 +91,17 @@ | |||
| 97 | 91 | # An older version of api_core is installed which does not define the | |
| 98 | 92 | # functions above. We do equivalent checks manually. | |
| 99 | 93 | try: | |
| 100 | - import sys | ||
| 101 | 94 | import warnings | |
| 102 | 95 | ||
| 103 | 96 | _py_version_str = sys.version.split()[0] | |
| 104 | 97 | _package_label = "google.shopping.css_v1" | |
| 105 | - if sys.version_info < (3, 9): | ||
| 98 | + if sys.version_info < (3, 10): | ||
| 106 | 99 | warnings.warn( | |
| 107 | 100 | "You are using a non-supported Python version " | |
| 108 | 101 | + f"({_py_version_str}). Google will not post any further " | |
| 109 | 102 | + f"updates to {_package_label} supporting this Python version. " | |
| 110 | 103 | + "Please upgrade to the latest Python version, or at " | |
| 111 | - + f"least to Python 3.9, and then update {_package_label}.", | ||
| 112 | - FutureWarning, | ||
| 113 | - ) | ||
| 114 | - if sys.version_info[:2] == (3, 9): | ||
| 115 | - warnings.warn( | ||
| 116 | - f"You are using a Python version ({_py_version_str}) " | ||
| 117 | - + f"which Google will stop supporting in {_package_label} in " | ||
| 118 | - + "January 2026. Please " | ||
| 119 | - + "upgrade to the latest Python version, or at " | ||
| 120 | - + "least to Python 3.10, before then, and " | ||
| 121 | - + f"then update {_package_label}.", | ||
| 104 | + + f"least to Python 3.10, and then update {_package_label}.", | ||
| 122 | 105 | FutureWarning, | |
| 123 | 106 | ) | |
| 124 | 107 | ||
| 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", | |
@@ -390,7 +389,6 @@ def docs(session): | |||
| 390 | 389 | shutil.rmtree(os.path.join("docs", "_build"), ignore_errors=True) | |
| 391 | 390 | session.run( | |
| 392 | 391 | "sphinx-build", | |
| 393 | - "-W", # warnings as errors | ||
| 394 | 392 | "-T", # show full traceback on exception | |
| 395 | 393 | "-N", # no colors | |
| 396 | 394 | "-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,11 +39,11 @@ | |||
| 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", | |
| 46 | - "grpcio >= 1.33.2, < 2.0.0", | ||
| 46 | + "grpcio >= 1.44.0, < 2.0.0", | ||
| 47 | 47 | "grpcio >= 1.75.1, < 2.0.0; python_version >= '3.14'", | |
| 48 | 48 | "proto-plus >= 1.22.3, <2.0.0", | |
| 49 | 49 | "proto-plus >= 1.25.0, <2.0.0; python_version >= '3.13'", | |
@@ -72,15 +72,14 @@ | |||
| 72 | 72 | long_description=readme, | |
| 73 | 73 | author="Google LLC", | |
| 74 | 74 | author_email="googleapis-packages@google.com", | |
| 75 | - license="Apache 2.0", | ||
| 75 | + license="Apache-2.0", | ||
| 76 | 76 | url=url, | |
| 77 | 77 | classifiers=[ | |
| 78 | 78 | release_status, | |
| 79 | 79 | "Intended Audience :: Developers", | |
| 80 | 80 | "License :: OSI Approved :: Apache Software License", | |
| 81 | 81 | "Programming Language :: Python", | |
| 82 | 82 | "Programming Language :: Python :: 3", | |
| 83 | - "Programming Language :: Python :: 3.9", | ||
| 84 | 83 | "Programming Language :: Python :: 3.10", | |
| 85 | 84 | "Programming Language :: Python :: 3.11", | |
| 86 | 85 | "Programming Language :: Python :: 3.12", | |
@@ -91,7 +90,7 @@ | |||
| 91 | 90 | ], | |
| 92 | 91 | platforms="Posix; MacOS X; Windows", | |
| 93 | 92 | packages=packages, | |
| 94 | - python_requires=">=3.9", | ||
| 93 | + python_requires=">=3.10", | ||
| 95 | 94 | install_requires=dependencies, | |
| 96 | 95 | extras_require=extras, | |
| 97 | 96 | include_package_data=True, | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,11 +1,12 @@ | |||
| 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 | - google-shopping-type | ||
| 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.44.0 | ||
| 10 | + proto-plus==1.22.3 | ||
| 11 | + protobuf==4.25.8 | ||
| 12 | + google-shopping-type==1.0.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 | |
@@ -1909,11 +1903,7 @@ async def test_list_account_labels_async_pages(): | |||
| 1909 | 1903 | RuntimeError, | |
| 1910 | 1904 | ) | |
| 1911 | 1905 | pages = [] | |
| 1912 | - # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` | ||
| 1913 | - # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 | ||
| 1914 | - async for page_ in ( # pragma: no branch | ||
| 1915 | - await client.list_account_labels(request={}) | ||
| 1916 | - ).pages: | ||
| 1906 | + async for page_ in (await client.list_account_labels(request={})).pages: | ||
| 1917 | 1907 | pages.append(page_) | |
| 1918 | 1908 | for page_, token in zip(pages, ["abc", "def", "ghi", ""]): | |
| 1919 | 1909 | assert page_.raw_page.next_page_token == token | |
@@ -3098,7 +3088,7 @@ def test_list_account_labels_rest_required_fields( | |||
| 3098 | 3088 | ||
| 3099 | 3089 | expected_params = [("$alt", "json;enum-encoding=int")] | |
| 3100 | 3090 | actual_params = req.call_args.kwargs["params"] | |
| 3101 | - assert expected_params == actual_params | ||
| 3091 | + assert sorted(expected_params) == sorted(actual_params) | ||
| 3102 | 3092 | ||
| 3103 | 3093 | ||
| 3104 | 3094 | def test_list_account_labels_rest_unset_required_fields(): | |
@@ -3350,7 +3340,7 @@ def test_create_account_label_rest_required_fields( | |||
| 3350 | 3340 | ||
| 3351 | 3341 | expected_params = [("$alt", "json;enum-encoding=int")] | |
| 3352 | 3342 | actual_params = req.call_args.kwargs["params"] | |
| 3353 | - assert expected_params == actual_params | ||
| 3343 | + assert sorted(expected_params) == sorted(actual_params) | ||
| 3354 | 3344 | ||
| 3355 | 3345 | ||
| 3356 | 3346 | def test_create_account_label_rest_unset_required_fields(): | |
@@ -3536,7 +3526,7 @@ def test_update_account_label_rest_required_fields( | |||
| 3536 | 3526 | ||
| 3537 | 3527 | expected_params = [("$alt", "json;enum-encoding=int")] | |
| 3538 | 3528 | actual_params = req.call_args.kwargs["params"] | |
| 3539 | - assert expected_params == actual_params | ||
| 3529 | + assert sorted(expected_params) == sorted(actual_params) | ||
| 3540 | 3530 | ||
| 3541 | 3531 | ||
| 3542 | 3532 | def test_update_account_label_rest_unset_required_fields(): | |
@@ -3714,7 +3704,7 @@ def test_delete_account_label_rest_required_fields( | |||
| 3714 | 3704 | ||
| 3715 | 3705 | expected_params = [("$alt", "json;enum-encoding=int")] | |
| 3716 | 3706 | actual_params = req.call_args.kwargs["params"] | |
| 3717 | - assert expected_params == actual_params | ||
| 3707 | + assert sorted(expected_params) == sorted(actual_params) | ||
| 3718 | 3708 | ||
| 3719 | 3709 | ||
| 3720 | 3710 | def test_delete_account_label_rest_unset_required_fields(): | |
| 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 | |
@@ -1874,11 +1868,7 @@ async def test_list_child_accounts_async_pages(): | |||
| 1874 | 1868 | RuntimeError, | |
| 1875 | 1869 | ) | |
| 1876 | 1870 | pages = [] | |
| 1877 | - # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` | ||
| 1878 | - # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 | ||
| 1879 | - async for page_ in ( # pragma: no branch | ||
| 1880 | - await client.list_child_accounts(request={}) | ||
| 1881 | - ).pages: | ||
| 1871 | + async for page_ in (await client.list_child_accounts(request={})).pages: | ||
| 1882 | 1872 | pages.append(page_) | |
| 1883 | 1873 | for page_, token in zip(pages, ["abc", "def", "ghi", ""]): | |
| 1884 | 1874 | assert page_.raw_page.next_page_token == token | |
@@ -2703,7 +2693,7 @@ def test_list_child_accounts_rest_required_fields( | |||
| 2703 | 2693 | ||
| 2704 | 2694 | expected_params = [("$alt", "json;enum-encoding=int")] | |
| 2705 | 2695 | actual_params = req.call_args.kwargs["params"] | |
| 2706 | - assert expected_params == actual_params | ||
| 2696 | + assert sorted(expected_params) == sorted(actual_params) | ||
| 2707 | 2697 | ||
| 2708 | 2698 | ||
| 2709 | 2699 | def test_list_child_accounts_rest_unset_required_fields(): | |
@@ -2953,7 +2943,7 @@ def test_get_account_rest_required_fields(request_type=accounts.GetAccountReques | |||
| 2953 | 2943 | ||
| 2954 | 2944 | expected_params = [("$alt", "json;enum-encoding=int")] | |
| 2955 | 2945 | actual_params = req.call_args.kwargs["params"] | |
| 2956 | - assert expected_params == actual_params | ||
| 2946 | + assert sorted(expected_params) == sorted(actual_params) | ||
| 2957 | 2947 | ||
| 2958 | 2948 | ||
| 2959 | 2949 | def test_get_account_rest_unset_required_fields(): | |
@@ -3130,7 +3120,7 @@ def test_update_labels_rest_required_fields( | |||
| 3130 | 3120 | ||
| 3131 | 3121 | expected_params = [("$alt", "json;enum-encoding=int")] | |
| 3132 | 3122 | actual_params = req.call_args.kwargs["params"] | |
| 3133 | - assert expected_params == actual_params | ||
| 3123 | + assert sorted(expected_params) == sorted(actual_params) | ||
| 3134 | 3124 | ||
| 3135 | 3125 | ||
| 3136 | 3126 | def test_update_labels_rest_unset_required_fields(): | |
| 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 | |
@@ -2466,7 +2460,7 @@ def test_insert_css_product_input_rest_required_fields( | |||
| 2466 | 2460 | ||
| 2467 | 2461 | expected_params = [("$alt", "json;enum-encoding=int")] | |
| 2468 | 2462 | actual_params = req.call_args.kwargs["params"] | |
| 2469 | - assert expected_params == actual_params | ||
| 2463 | + assert sorted(expected_params) == sorted(actual_params) | ||
| 2470 | 2464 | ||
| 2471 | 2465 | ||
| 2472 | 2466 | def test_insert_css_product_input_rest_unset_required_fields(): | |
@@ -2597,7 +2591,7 @@ def test_update_css_product_input_rest_required_fields( | |||
| 2597 | 2591 | ||
| 2598 | 2592 | expected_params = [("$alt", "json;enum-encoding=int")] | |
| 2599 | 2593 | actual_params = req.call_args.kwargs["params"] | |
| 2600 | - assert expected_params == actual_params | ||
| 2594 | + assert sorted(expected_params) == sorted(actual_params) | ||
| 2601 | 2595 | ||
| 2602 | 2596 | ||
| 2603 | 2597 | def test_update_css_product_input_rest_unset_required_fields(): | |
@@ -2783,7 +2777,7 @@ def test_delete_css_product_input_rest_required_fields( | |||
| 2783 | 2777 | ||
| 2784 | 2778 | expected_params = [("$alt", "json;enum-encoding=int")] | |
| 2785 | 2779 | actual_params = req.call_args.kwargs["params"] | |
| 2786 | - assert expected_params == actual_params | ||
| 2780 | + assert sorted(expected_params) == sorted(actual_params) | ||
| 2787 | 2781 | ||
| 2788 | 2782 | ||
| 2789 | 2783 | def test_delete_css_product_input_rest_unset_required_fields(): | |
| Back | FazBrowse Home | New Git URL |
0 commit comments