Skip to content

Commit a81ea85

Browse files
authored
chore: complete migration of googleapis-common-protos to librarian (#16688)
- Adds a string replacement to avoid double copyright notices while we're (still) not generating google/gapic and google/longrunning - Removes the skip_generate from librarian.yaml - Reformats with nox - Regenerates Fixes googleapis/librarian#5334
1 parent d033789 commit a81ea85

File tree

20 files changed

+118
-39
lines changed

20 files changed

+118
-39
lines changed
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# Copyright 2026 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
description: Mitigate synthtool adding a second copyright notice when one already exists
15+
url: https://github.com/googleapis/librarian/issues/4322
16+
replacements:
17+
- paths: [
18+
packages/googleapis-common-protos/google/gapic/metadata/gapic_metadata_pb2.pyi,
19+
packages/googleapis-common-protos/google/longrunning/operations_proto_pb2.pyi
20+
]
21+
before: |
22+
# Copyright 2025 Google LLC
23+
#
24+
# Licensed under the Apache License, Version 2.0 \(the "License"\);
25+
# you may not use this file except in compliance with the License.
26+
# You may obtain a copy of the License at
27+
#
28+
# http://www.apache.org/licenses/LICENSE-2.0
29+
#
30+
# Unless required by applicable law or agreed to in writing, software
31+
# distributed under the License is distributed on an "AS IS" BASIS,
32+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
33+
# See the License for the specific language governing permissions and
34+
# limitations under the License.\n
35+
# Copyright 2025 Google LLC
36+
#
37+
# Licensed under the Apache License, Version 2.0 \(the "License"\);
38+
# you may not use this file except in compliance with the License.
39+
# You may obtain a copy of the License at
40+
#
41+
# http://www.apache.org/licenses/LICENSE-2.0
42+
#
43+
# Unless required by applicable law or agreed to in writing, software
44+
# distributed under the License is distributed on an "AS IS" BASIS,
45+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
46+
# See the License for the specific language governing permissions and
47+
# limitations under the License.
48+
after: |
49+
# Copyright 2025 Google LLC
50+
#
51+
# Licensed under the Apache License, Version 2.0 (the "License");
52+
# you may not use this file except in compliance with the License.
53+
# You may obtain a copy of the License at
54+
#
55+
# http://www.apache.org/licenses/LICENSE-2.0
56+
#
57+
# Unless required by applicable law or agreed to in writing, software
58+
# distributed under the License is distributed on an "AS IS" BASIS,
59+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
60+
# See the License for the specific language governing permissions and
61+
# limitations under the License.
62+
count: 2

librarian.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4574,7 +4574,6 @@ libraries:
45744574
- path: google/cloud/location
45754575
- path: google/logging/type
45764576
- path: google/rpc/context
4577-
skip_generate: true
45784577
python:
45794578
library_type: CORE
45804579
proto_only_apis:
Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
{
2-
"client_documentation": "https://github.com/googleapis/google-cloud-python/tree/main/packages/googleapis-common-protos",
3-
"default_version": "apiVersion",
4-
"distribution_name": "googleapis-common-protos",
5-
"issue_tracker": "https://github.com/googleapis/google-cloud-python/issues",
6-
"language": "python",
7-
"library_type": "CORE",
8-
"name": "googleapis-common-protos",
9-
"name_pretty": "Google APIs Common Protos",
10-
"product_documentation": "https://github.com/googleapis/googleapis/tree/master/google",
11-
"release_level": "stable",
12-
"repo": "googleapis/google-cloud-python"
2+
"api_description": "Lets you define and config your API service.",
3+
"api_id": "serviceconfig.googleapis.com",
4+
"api_shortname": "serviceconfig",
5+
"client_documentation": "https://github.com/googleapis/google-cloud-python/tree/main/packages/googleapis-common-protos",
6+
"default_version": "apiVersion",
7+
"distribution_name": "googleapis-common-protos",
8+
"issue_tracker": "https://github.com/googleapis/google-cloud-python/issues",
9+
"language": "python",
10+
"library_type": "CORE",
11+
"name": "googleapis-common-protos",
12+
"name_pretty": "Google APIs Common Protos",
13+
"product_documentation": "https://github.com/googleapis/googleapis/tree/master/google",
14+
"release_level": "stable",
15+
"repo": "googleapis/google-cloud-python"
1316
}

packages/googleapis-common-protos/README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Python Client for Google APIs Common Protos
33

44
|stable| |pypi| |versions|
55

6-
`Google APIs Common Protos`_:
6+
`Google APIs Common Protos`_: Lets you define and config your API service.
77

88
- `Client Library Documentation`_
99
- `Product Documentation`_

packages/googleapis-common-protos/docs/README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Python Client for Google APIs Common Protos
33

44
|stable| |pypi| |versions|
55

6-
`Google APIs Common Protos`_:
6+
`Google APIs Common Protos`_: Lets you define and config your API service.
77

88
- `Client Library Documentation`_
99
- `Product Documentation`_

packages/googleapis-common-protos/google/api/annotations_pb2.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,10 @@
2929
_sym_db = _symbol_database.Default()
3030

3131

32-
from google.api import http_pb2 as google_dot_api_dot_http__pb2
3332
from google.protobuf import descriptor_pb2 as google_dot_protobuf_dot_descriptor__pb2
3433

34+
from google.api import http_pb2 as google_dot_api_dot_http__pb2
35+
3536
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(
3637
b'\n\x1cgoogle/api/annotations.proto\x12\ngoogle.api\x1a\x15google/api/http.proto\x1a google/protobuf/descriptor.proto:E\n\x04http\x12\x1e.google.protobuf.MethodOptions\x18\xb0\xca\xbc" \x01(\x0b\x32\x14.google.api.HttpRuleBn\n\x0e\x63om.google.apiB\x10\x41nnotationsProtoP\x01ZAgoogle.golang.org/genproto/googleapis/api/annotations;annotations\xa2\x02\x04GAPIb\x06proto3'
3738
)

packages/googleapis-common-protos/google/api/annotations_pb2.pyi

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,11 @@
1414

1515
from typing import ClassVar as _ClassVar
1616

17-
from google.api import http_pb2 as _http_pb2
1817
from google.protobuf import descriptor as _descriptor
1918
from google.protobuf import descriptor_pb2 as _descriptor_pb2
2019

20+
from google.api import http_pb2 as _http_pb2
21+
2122
DESCRIPTOR: _descriptor.FileDescriptor
2223
HTTP_FIELD_NUMBER: _ClassVar[int]
2324
http: _descriptor.FieldDescriptor

packages/googleapis-common-protos/google/api/client_pb2.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,11 @@
2929
_sym_db = _symbol_database.Default()
3030

3131

32-
from google.api import launch_stage_pb2 as google_dot_api_dot_launch__stage__pb2
3332
from google.protobuf import descriptor_pb2 as google_dot_protobuf_dot_descriptor__pb2
3433
from google.protobuf import duration_pb2 as google_dot_protobuf_dot_duration__pb2
3534

35+
from google.api import launch_stage_pb2 as google_dot_api_dot_launch__stage__pb2
36+
3637
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(
3738
b'\n\x17google/api/client.proto\x12\ngoogle.api\x1a\x1dgoogle/api/launch_stage.proto\x1a google/protobuf/descriptor.proto\x1a\x1egoogle/protobuf/duration.proto"\xbe\x01\n\x16\x43ommonLanguageSettings\x12\x1e\n\x12reference_docs_uri\x18\x01 \x01(\tB\x02\x18\x01\x12:\n\x0c\x64\x65stinations\x18\x02 \x03(\x0e\x32$.google.api.ClientLibraryDestination\x12H\n\x1aselective_gapic_generation\x18\x03 \x01(\x0b\x32$.google.api.SelectiveGapicGeneration"\xfb\x03\n\x15\x43lientLibrarySettings\x12\x0f\n\x07version\x18\x01 \x01(\t\x12-\n\x0claunch_stage\x18\x02 \x01(\x0e\x32\x17.google.api.LaunchStage\x12\x1a\n\x12rest_numeric_enums\x18\x03 \x01(\x08\x12/\n\rjava_settings\x18\x15 \x01(\x0b\x32\x18.google.api.JavaSettings\x12-\n\x0c\x63pp_settings\x18\x16 \x01(\x0b\x32\x17.google.api.CppSettings\x12-\n\x0cphp_settings\x18\x17 \x01(\x0b\x32\x17.google.api.PhpSettings\x12\x33\n\x0fpython_settings\x18\x18 \x01(\x0b\x32\x1a.google.api.PythonSettings\x12/\n\rnode_settings\x18\x19 \x01(\x0b\x32\x18.google.api.NodeSettings\x12\x33\n\x0f\x64otnet_settings\x18\x1a \x01(\x0b\x32\x1a.google.api.DotnetSettings\x12/\n\rruby_settings\x18\x1b \x01(\x0b\x32\x18.google.api.RubySettings\x12+\n\x0bgo_settings\x18\x1c \x01(\x0b\x32\x16.google.api.GoSettings"\xa8\x03\n\nPublishing\x12\x33\n\x0fmethod_settings\x18\x02 \x03(\x0b\x32\x1a.google.api.MethodSettings\x12\x15\n\rnew_issue_uri\x18\x65 \x01(\t\x12\x19\n\x11\x64ocumentation_uri\x18\x66 \x01(\t\x12\x16\n\x0e\x61pi_short_name\x18g \x01(\t\x12\x14\n\x0cgithub_label\x18h \x01(\t\x12\x1e\n\x16\x63odeowner_github_teams\x18i \x03(\t\x12\x16\n\x0e\x64oc_tag_prefix\x18j \x01(\t\x12;\n\x0corganization\x18k \x01(\x0e\x32%.google.api.ClientLibraryOrganization\x12;\n\x10library_settings\x18m \x03(\x0b\x32!.google.api.ClientLibrarySettings\x12)\n!proto_reference_documentation_uri\x18n \x01(\t\x12(\n rest_reference_documentation_uri\x18o \x01(\t"\xe3\x01\n\x0cJavaSettings\x12\x17\n\x0flibrary_package\x18\x01 \x01(\t\x12L\n\x13service_class_names\x18\x02 \x03(\x0b\x32/.google.api.JavaSettings.ServiceClassNamesEntry\x12\x32\n\x06\x63ommon\x18\x03 \x01(\x0b\x32".google.api.CommonLanguageSettings\x1a\x38\n\x16ServiceClassNamesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01"A\n\x0b\x43ppSettings\x12\x32\n\x06\x63ommon\x18\x01 \x01(\x0b\x32".google.api.CommonLanguageSettings"Z\n\x0bPhpSettings\x12\x32\n\x06\x63ommon\x18\x01 \x01(\x0b\x32".google.api.CommonLanguageSettings\x12\x17\n\x0flibrary_package\x18\x02 \x01(\t"\x9b\x02\n\x0ePythonSettings\x12\x32\n\x06\x63ommon\x18\x01 \x01(\x0b\x32".google.api.CommonLanguageSettings\x12N\n\x15\x65xperimental_features\x18\x02 \x01(\x0b\x32/.google.api.PythonSettings.ExperimentalFeatures\x1a\x84\x01\n\x14\x45xperimentalFeatures\x12\x1d\n\x15rest_async_io_enabled\x18\x01 \x01(\x08\x12\'\n\x1fprotobuf_pythonic_types_enabled\x18\x02 \x01(\x08\x12$\n\x1cunversioned_package_disabled\x18\x03 \x01(\x08"B\n\x0cNodeSettings\x12\x32\n\x06\x63ommon\x18\x01 \x01(\x0b\x32".google.api.CommonLanguageSettings"\xaa\x03\n\x0e\x44otnetSettings\x12\x32\n\x06\x63ommon\x18\x01 \x01(\x0b\x32".google.api.CommonLanguageSettings\x12I\n\x10renamed_services\x18\x02 \x03(\x0b\x32/.google.api.DotnetSettings.RenamedServicesEntry\x12K\n\x11renamed_resources\x18\x03 \x03(\x0b\x32\x30.google.api.DotnetSettings.RenamedResourcesEntry\x12\x19\n\x11ignored_resources\x18\x04 \x03(\t\x12 \n\x18\x66orced_namespace_aliases\x18\x05 \x03(\t\x12\x1e\n\x16handwritten_signatures\x18\x06 \x03(\t\x1a\x36\n\x14RenamedServicesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x37\n\x15RenamedResourcesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01"B\n\x0cRubySettings\x12\x32\n\x06\x63ommon\x18\x01 \x01(\x0b\x32".google.api.CommonLanguageSettings"\xbf\x01\n\nGoSettings\x12\x32\n\x06\x63ommon\x18\x01 \x01(\x0b\x32".google.api.CommonLanguageSettings\x12\x45\n\x10renamed_services\x18\x02 \x03(\x0b\x32+.google.api.GoSettings.RenamedServicesEntry\x1a\x36\n\x14RenamedServicesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01"\x82\x03\n\x0eMethodSettings\x12\x10\n\x08selector\x18\x01 \x01(\t\x12<\n\x0clong_running\x18\x02 \x01(\x0b\x32&.google.api.MethodSettings.LongRunning\x12\x1d\n\x15\x61uto_populated_fields\x18\x03 \x03(\t\x12\x31\n\x08\x62\x61tching\x18\x04 \x01(\x0b\x32\x1f.google.api.BatchingConfigProto\x1a\xcd\x01\n\x0bLongRunning\x12\x35\n\x12initial_poll_delay\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x1d\n\x15poll_delay_multiplier\x18\x02 \x01(\x02\x12\x31\n\x0emax_poll_delay\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x35\n\x12total_poll_timeout\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration"Q\n\x18SelectiveGapicGeneration\x12\x0f\n\x07methods\x18\x01 \x03(\t\x12$\n\x1cgenerate_omitted_as_internal\x18\x02 \x01(\x08"\x8b\x01\n\x13\x42\x61tchingConfigProto\x12\x35\n\nthresholds\x18\x01 \x01(\x0b\x32!.google.api.BatchingSettingsProto\x12=\n\x10\x62\x61tch_descriptor\x18\x02 \x01(\x0b\x32#.google.api.BatchingDescriptorProto"\xeb\x02\n\x15\x42\x61tchingSettingsProto\x12\x1f\n\x17\x65lement_count_threshold\x18\x01 \x01(\x05\x12\x1e\n\x16request_byte_threshold\x18\x02 \x01(\x03\x12\x32\n\x0f\x64\x65lay_threshold\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x1b\n\x13\x65lement_count_limit\x18\x04 \x01(\x05\x12\x1a\n\x12request_byte_limit\x18\x05 \x01(\x05\x12"\n\x1a\x66low_control_element_limit\x18\x06 \x01(\x05\x12\x1f\n\x17\x66low_control_byte_limit\x18\x07 \x01(\x05\x12_\n$flow_control_limit_exceeded_behavior\x18\x08 \x01(\x0e\x32\x31.google.api.FlowControlLimitExceededBehaviorProto"i\n\x17\x42\x61tchingDescriptorProto\x12\x15\n\rbatched_field\x18\x01 \x01(\t\x12\x1c\n\x14\x64iscriminator_fields\x18\x02 \x03(\t\x12\x19\n\x11subresponse_field\x18\x03 \x01(\t*\xa3\x01\n\x19\x43lientLibraryOrganization\x12+\n\'CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED\x10\x00\x12\t\n\x05\x43LOUD\x10\x01\x12\x07\n\x03\x41\x44S\x10\x02\x12\n\n\x06PHOTOS\x10\x03\x12\x0f\n\x0bSTREET_VIEW\x10\x04\x12\x0c\n\x08SHOPPING\x10\x05\x12\x07\n\x03GEO\x10\x06\x12\x11\n\rGENERATIVE_AI\x10\x07*g\n\x18\x43lientLibraryDestination\x12*\n&CLIENT_LIBRARY_DESTINATION_UNSPECIFIED\x10\x00\x12\n\n\x06GITHUB\x10\n\x12\x13\n\x0fPACKAGE_MANAGER\x10\x14*g\n%FlowControlLimitExceededBehaviorProto\x12\x12\n\x0eUNSET_BEHAVIOR\x10\x00\x12\x13\n\x0fTHROW_EXCEPTION\x10\x01\x12\t\n\x05\x42LOCK\x10\x02\x12\n\n\x06IGNORE\x10\x03:9\n\x10method_signature\x12\x1e.google.protobuf.MethodOptions\x18\x9b\x08 \x03(\t:6\n\x0c\x64\x65\x66\x61ult_host\x12\x1f.google.protobuf.ServiceOptions\x18\x99\x08 \x01(\t:6\n\x0coauth_scopes\x12\x1f.google.protobuf.ServiceOptions\x18\x9a\x08 \x01(\t:8\n\x0b\x61pi_version\x12\x1f.google.protobuf.ServiceOptions\x18\xc1\xba\xab\xfa\x01 \x01(\tBi\n\x0e\x63om.google.apiB\x0b\x43lientProtoP\x01ZAgoogle.golang.org/genproto/googleapis/api/annotations;annotations\xa2\x02\x04GAPIb\x06proto3'
3839
)

packages/googleapis-common-protos/google/api/client_pb2.pyi

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,15 @@ from typing import Mapping as _Mapping
1818
from typing import Optional as _Optional
1919
from typing import Union as _Union
2020

21-
from google.api import launch_stage_pb2 as _launch_stage_pb2
2221
from google.protobuf import descriptor as _descriptor
2322
from google.protobuf import descriptor_pb2 as _descriptor_pb2
2423
from google.protobuf import duration_pb2 as _duration_pb2
2524
from google.protobuf import message as _message
2625
from google.protobuf.internal import containers as _containers
2726
from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper
2827

28+
from google.api import launch_stage_pb2 as _launch_stage_pb2
29+
2930
DESCRIPTOR: _descriptor.FileDescriptor
3031

3132
class ClientLibraryOrganization(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):

packages/googleapis-common-protos/google/api/control_pb2.pyi

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,12 @@ from typing import Mapping as _Mapping
1818
from typing import Optional as _Optional
1919
from typing import Union as _Union
2020

21-
from google.api import policy_pb2 as _policy_pb2
2221
from google.protobuf import descriptor as _descriptor
2322
from google.protobuf import message as _message
2423
from google.protobuf.internal import containers as _containers
2524

25+
from google.api import policy_pb2 as _policy_pb2
26+
2627
DESCRIPTOR: _descriptor.FileDescriptor
2728

2829
class Control(_message.Message):

0 commit comments

Comments
 (0)