Skip to content

Commit 22478ac

Browse files
noahdietzparthea
authored andcommitted
chore: update librarian & regenerate (#17705)
Updates librarian version to v0.26.0. This includes a gapic-generator update to v1.36.0 resulting in the attached changes, which can be found in the [second commit](e20a32e). Changes to the bigquery and datastore postprocessing scripts were necessary due to the removal of mypy.ini. These can be found in the [first commit](8f7111a). Fixes #17672 --------- Co-authored-by: Anthonios Partheniou <partheniou@google.com>
1 parent 36d0b46 commit 22478ac

1,654 files changed

Lines changed: 19972 additions & 5123 deletions

File tree

Some content is hidden

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

.librarian/generator-input/client-post-processing/bigtable-integration.yaml

Lines changed: 0 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -357,52 +357,6 @@ replacements:
357357
358358
Quick Start
359359
count: 1
360-
- paths: [
361-
packages/google-cloud-bigtable/mypy.ini
362-
]
363-
before: |
364-
\[mypy\]
365-
[\s\S]*?incremental = True
366-
after: |
367-
[mypy]
368-
python_version = 3.13
369-
namespace_packages = True
370-
check_untyped_defs = True
371-
warn_unreachable = True
372-
disallow_any_generics = True
373-
exclude = tests/unit/gapic/
374-
375-
[mypy-grpc.*]
376-
ignore_missing_imports = True
377-
378-
[mypy-google.auth.*]
379-
ignore_missing_imports = True
380-
381-
[mypy-google.iam.*]
382-
ignore_missing_imports = True
383-
384-
[mypy-google.longrunning.*]
385-
ignore_missing_imports = True
386-
387-
[mypy-google.oauth2.*]
388-
ignore_missing_imports = True
389-
390-
[mypy-google.rpc.*]
391-
ignore_missing_imports = True
392-
393-
[mypy-proto.*]
394-
ignore_missing_imports = True
395-
396-
[mypy-pytest]
397-
ignore_missing_imports = True
398-
399-
[mypy-google.cloud.*]
400-
ignore_errors = True
401-
402-
# only verify data client
403-
[mypy-google.cloud.bigtable.data.*]
404-
ignore_errors = False
405-
count: 1
406360
# Note: noxfile.py is heavily customized so we clobber the whole file.
407361
- paths: [
408362
packages/google-cloud-bigtable/noxfile.py

.librarian/generator-input/client-post-processing/datastore-integration.yaml

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -39,42 +39,6 @@ replacements:
3939
"google-cloud-core >= 2.0.0, <3.0.0",
4040
"grpcio >= 1.59.0, < 2.0.0",
4141
count: 1
42-
- paths: [
43-
"packages/google-cloud-datastore/mypy.ini",
44-
]
45-
before: |-
46-
# Performance: reuse results from previous runs to speed up 'nox'
47-
incremental = True
48-
after: |-
49-
# Performance: reuse results from previous runs to speed up "nox"
50-
incremental = True
51-
52-
[mypy-google.cloud.datastore._app_engine_key_pb2]
53-
ignore_errors = True
54-
55-
# TODO(https://github.com/googleapis/gapic-generator-python/issues/2410):
56-
# Remove once this generator bug is fixed
57-
[mypy-google.cloud.datastore_v1.services.datastore.async_client]
58-
ignore_errors = True
59-
60-
# TODO(https://github.com/googleapis/gapic-generator-python/issues/2410):
61-
# Remove once this generator bug is fixed
62-
[mypy-google.cloud.datastore_v1.services.datastore.client]
63-
ignore_errors = True
64-
count: 1
65-
- paths: [
66-
"packages/google-cloud-datastore/mypy.ini",
67-
]
68-
before: |
69-
ignore_missing_imports = False
70-
71-
# TODO\(https://github.com/googleapis/gapic-generator-python/issues/2563\):
72-
# Dependencies that historically lacks py.typed markers
73-
\[mypy-google\.iam\.\*\]
74-
ignore_missing_imports = True
75-
after: |
76-
ignore_missing_imports = True
77-
count: 1
7842
- paths: [
7943
"packages/google-cloud-datastore/docs/index.rst",
8044
]

librarian.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414
language: python
15-
version: v0.22.0
15+
version: v0.26.0
1616
repo: googleapis/google-cloud-python
1717
sources:
1818
googleapis:
@@ -635,6 +635,7 @@ libraries:
635635
apis:
636636
- path: google/bigtable/v2
637637
- path: google/bigtable/admin/v2
638+
skip_generate: true
638639
python:
639640
library_type: GAPIC_COMBO
640641
opt_args_by_api:
@@ -1685,6 +1686,7 @@ libraries:
16851686
version: 2.39.0
16861687
apis:
16871688
- path: google/pubsub/v1
1689+
skip_generate: true
16881690
python:
16891691
library_type: GAPIC_COMBO
16901692
opt_args_by_api:
@@ -1931,6 +1933,7 @@ libraries:
19311933
- docs/spanner_v1/table.rst
19321934
- docs/spanner_v1/transaction.rst
19331935
- tests/unit/gapic/conftest.py
1936+
skip_generate: true
19341937
python:
19351938
library_type: GAPIC_COMBO
19361939
opt_args_by_api:

packages/google-ads-admanager/mypy.ini

Lines changed: 0 additions & 15 deletions
This file was deleted.

packages/google-ads-admanager/noxfile.py

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,16 +36,24 @@
3636
"3.12",
3737
"3.13",
3838
"3.14",
39+
"3.15",
3940
]
4041

4142
DEFAULT_PYTHON_VERSION = "3.14"
4243

43-
# TODO(https://github.com/googleapis/gapic-generator-python/issues/2450):
44-
# Switch this to Python 3.15 alpha1
45-
# https://peps.python.org/pep-0790/
46-
PREVIEW_PYTHON_VERSION = "3.14"
44+
PREVIEW_PYTHON_VERSION = "3.15"
4745

4846
CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute()
47+
# Path to the centralized mypy configuration file at the repository root.
48+
# Search upwards to support running nox from both monorepo packages and integration test goldens.
49+
MYPY_CONFIG_FILE = next(
50+
(
51+
str(p / "mypy.ini")
52+
for p in CURRENT_DIRECTORY.parents
53+
if (p / "mypy.ini").exists()
54+
),
55+
str(CURRENT_DIRECTORY.parent.parent / "mypy.ini"),
56+
)
4957

5058
if (CURRENT_DIRECTORY / "testing").exists():
5159
LOWER_BOUND_CONSTRAINTS_FILE = (
@@ -107,6 +115,7 @@ def mypy(session):
107115
session.install(".")
108116
session.run(
109117
"mypy",
118+
f"--config-file={MYPY_CONFIG_FILE}",
110119
"-p",
111120
"google",
112121
"--check-untyped-defs",
@@ -566,7 +575,7 @@ def prerelease_deps(session, protobuf_implementation):
566575
)
567576

568577

569-
@nox.session(python=DEFAULT_PYTHON_VERSION)
578+
@nox.session(python=PREVIEW_PYTHON_VERSION)
570579
@nox.parametrize(
571580
"protobuf_implementation",
572581
["python", "upb"],
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# We use the constraints file for the latest Python version
2+
# (currently this file) to check that the latest
3+
# major versions of dependencies are supported in setup.py.
4+
# List all library dependencies and extras in this file.
5+
# Require the latest major version be installed for each dependency.
6+
# e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0",
7+
# Then this file should have google-cloud-foo>=1
8+
google-api-core>=2
9+
google-auth>=2
10+
grpcio>=1
11+
proto-plus>=1
12+
protobuf>=7

packages/google-ads-admanager/tests/unit/gapic/admanager_v1/test_ad_break_service.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1607,6 +1607,9 @@ def test_list_ad_breaks_rest_pager(transport: str = "rest"):
16071607

16081608
pager = client.list_ad_breaks(request=sample_request)
16091609

1610+
assert pager.next_page_token == "abc"
1611+
assert str(pager).startswith(f"{pager.__class__.__name__}<")
1612+
16101613
results = list(pager)
16111614
assert len(results) == 6
16121615
assert all(isinstance(i, ad_break_messages.AdBreak) for i in results)

packages/google-ads-admanager/tests/unit/gapic/admanager_v1/test_ad_review_center_ad_service.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1488,6 +1488,9 @@ def test_search_ad_review_center_ads_rest_pager(transport: str = "rest"):
14881488

14891489
pager = client.search_ad_review_center_ads(request=sample_request)
14901490

1491+
assert pager.next_page_token == "abc"
1492+
assert str(pager).startswith(f"{pager.__class__.__name__}<")
1493+
14911494
results = list(pager)
14921495
assert len(results) == 6
14931496
assert all(

packages/google-ads-admanager/tests/unit/gapic/admanager_v1/test_ad_unit_service.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1595,6 +1595,9 @@ def test_list_ad_units_rest_pager(transport: str = "rest"):
15951595

15961596
pager = client.list_ad_units(request=sample_request)
15971597

1598+
assert pager.next_page_token == "abc"
1599+
assert str(pager).startswith(f"{pager.__class__.__name__}<")
1600+
15981601
results = list(pager)
15991602
assert len(results) == 6
16001603
assert all(isinstance(i, ad_unit_messages.AdUnit) for i in results)
@@ -1859,6 +1862,9 @@ def test_list_ad_unit_sizes_rest_pager(transport: str = "rest"):
18591862

18601863
pager = client.list_ad_unit_sizes(request=sample_request)
18611864

1865+
assert pager.next_page_token == "abc"
1866+
assert str(pager).startswith(f"{pager.__class__.__name__}<")
1867+
18621868
results = list(pager)
18631869
assert len(results) == 6
18641870
assert all(isinstance(i, ad_unit_messages.AdUnitSize) for i in results)

packages/google-ads-admanager/tests/unit/gapic/admanager_v1/test_application_service.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1625,6 +1625,9 @@ def test_list_applications_rest_pager(transport: str = "rest"):
16251625

16261626
pager = client.list_applications(request=sample_request)
16271627

1628+
assert pager.next_page_token == "abc"
1629+
assert str(pager).startswith(f"{pager.__class__.__name__}<")
1630+
16281631
results = list(pager)
16291632
assert len(results) == 6
16301633
assert all(isinstance(i, application_messages.Application) for i in results)

0 commit comments

Comments
 (0)