Skip to content

Commit

Permalink
fix(deps): allow protobuf 3.19.5 (#188)
Browse files Browse the repository at this point in the history
* fix(deps): allow protobuf 3.19.5

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
parthea and gcf-owl-bot[bot] committed Oct 7, 2022
1 parent 2130558 commit 0d596b6
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 7 deletions.
52 changes: 48 additions & 4 deletions google/cloud/orgpolicy/v1/orgpolicy_pb2.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/cloud/orgpolicy/v1/orgpolicy.proto
"""Generated protocol buffer code."""
from google.protobuf.internal import builder as _builder
from google.protobuf import descriptor as _descriptor
from google.protobuf import descriptor_pool as _descriptor_pool
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database

# @@protoc_insertion_point(imports)
Expand All @@ -36,10 +37,53 @@
b'\n)google/cloud/orgpolicy/v1/orgpolicy.proto\x12\x19google.cloud.orgpolicy.v1\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1cgoogle/api/annotations.proto"\x8b\x05\n\x06Policy\x12\x0f\n\x07version\x18\x01 \x01(\x05\x12\x12\n\nconstraint\x18\x02 \x01(\t\x12\x0c\n\x04\x65tag\x18\x03 \x01(\x0c\x12/\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x43\n\x0blist_policy\x18\x05 \x01(\x0b\x32,.google.cloud.orgpolicy.v1.Policy.ListPolicyH\x00\x12I\n\x0e\x62oolean_policy\x18\x06 \x01(\x0b\x32/.google.cloud.orgpolicy.v1.Policy.BooleanPolicyH\x00\x12K\n\x0frestore_default\x18\x07 \x01(\x0b\x32\x30.google.cloud.orgpolicy.v1.Policy.RestoreDefaultH\x00\x1a\xfb\x01\n\nListPolicy\x12\x16\n\x0e\x61llowed_values\x18\x01 \x03(\t\x12\x15\n\rdenied_values\x18\x02 \x03(\t\x12J\n\nall_values\x18\x03 \x01(\x0e\x32\x36.google.cloud.orgpolicy.v1.Policy.ListPolicy.AllValues\x12\x17\n\x0fsuggested_value\x18\x04 \x01(\t\x12\x1b\n\x13inherit_from_parent\x18\x05 \x01(\x08"<\n\tAllValues\x12\x1a\n\x16\x41LL_VALUES_UNSPECIFIED\x10\x00\x12\t\n\x05\x41LLOW\x10\x01\x12\x08\n\x04\x44\x45NY\x10\x02\x1a!\n\rBooleanPolicy\x12\x10\n\x08\x65nforced\x18\x01 \x01(\x08\x1a\x10\n\x0eRestoreDefaultB\r\n\x0bpolicy_typeB\xcc\x01\n\x1d\x63om.google.cloud.orgpolicy.v1B\x0eOrgPolicyProtoP\x01ZBgoogle.golang.org/genproto/googleapis/cloud/orgpolicy/v1;orgpolicy\xaa\x02\x19Google.Cloud.OrgPolicy.V1\xca\x02\x19Google\\Cloud\\OrgPolicy\\V1\xea\x02\x1cGoogle::Cloud::OrgPolicy::V1b\x06proto3'
)

_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals())
_builder.BuildTopDescriptorsAndMessages(
DESCRIPTOR, "google.cloud.orgpolicy.v1.orgpolicy_pb2", globals()

_POLICY = DESCRIPTOR.message_types_by_name["Policy"]
_POLICY_LISTPOLICY = _POLICY.nested_types_by_name["ListPolicy"]
_POLICY_BOOLEANPOLICY = _POLICY.nested_types_by_name["BooleanPolicy"]
_POLICY_RESTOREDEFAULT = _POLICY.nested_types_by_name["RestoreDefault"]
_POLICY_LISTPOLICY_ALLVALUES = _POLICY_LISTPOLICY.enum_types_by_name["AllValues"]
Policy = _reflection.GeneratedProtocolMessageType(
"Policy",
(_message.Message,),
{
"ListPolicy": _reflection.GeneratedProtocolMessageType(
"ListPolicy",
(_message.Message,),
{
"DESCRIPTOR": _POLICY_LISTPOLICY,
"__module__": "google.cloud.orgpolicy.v1.orgpolicy_pb2"
# @@protoc_insertion_point(class_scope:google.cloud.orgpolicy.v1.Policy.ListPolicy)
},
),
"BooleanPolicy": _reflection.GeneratedProtocolMessageType(
"BooleanPolicy",
(_message.Message,),
{
"DESCRIPTOR": _POLICY_BOOLEANPOLICY,
"__module__": "google.cloud.orgpolicy.v1.orgpolicy_pb2"
# @@protoc_insertion_point(class_scope:google.cloud.orgpolicy.v1.Policy.BooleanPolicy)
},
),
"RestoreDefault": _reflection.GeneratedProtocolMessageType(
"RestoreDefault",
(_message.Message,),
{
"DESCRIPTOR": _POLICY_RESTOREDEFAULT,
"__module__": "google.cloud.orgpolicy.v1.orgpolicy_pb2"
# @@protoc_insertion_point(class_scope:google.cloud.orgpolicy.v1.Policy.RestoreDefault)
},
),
"DESCRIPTOR": _POLICY,
"__module__": "google.cloud.orgpolicy.v1.orgpolicy_pb2"
# @@protoc_insertion_point(class_scope:google.cloud.orgpolicy.v1.Policy)
},
)
_sym_db.RegisterMessage(Policy)
_sym_db.RegisterMessage(Policy.ListPolicy)
_sym_db.RegisterMessage(Policy.BooleanPolicy)
_sym_db.RegisterMessage(Policy.RestoreDefault)

if _descriptor._USE_C_DESCRIPTORS == False:

DESCRIPTOR._options = None
Expand Down
9 changes: 8 additions & 1 deletion noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,13 @@

BLACK_VERSION = "black==22.3.0"
ISORT_VERSION = "isort==5.10.1"

# NOTE: Pin the version of grpcio-tools to 1.48.2 for compatibility with
# Protobuf 3.19.5. Please ensure that the minimum required version of
# protobuf in setup.py is compatible with the pb2 files generated
# by grpcio-tools before changing the pinned version below.
GRPCIO_TOOLS_VERSION = "grpcio-tools==1.48.2"

LINT_PATHS = ["docs", "google", "tests", "noxfile.py", "setup.py"]

DEFAULT_PYTHON_VERSION = "3.8"
Expand Down Expand Up @@ -88,7 +95,7 @@ def generate_protos(session):
NOTE: This should be migrated to use bazel in the future.
"""
session.install("grpcio-tools")
session.install(GRPCIO_TOOLS_VERSION)
protos = [str(p) for p in (pathlib.Path(".").glob("google/**/*.proto"))]

session.run(
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
install_requires=(
"google-api-core[grpc] >= 1.32.0, <3.0.0dev,!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.*,!=2.4.*,!=2.5.*,!=2.6.*,!=2.7.*",
"proto-plus >= 1.22.0, <2.0.0dev",
"protobuf >= 3.20.2, <5.0.0dev",
"protobuf>=3.19.5,<5.0.0dev,!=3.20.0,!=3.20.1,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5",
),
python_requires=">=3.7",
classifiers=[
Expand Down
2 changes: 1 addition & 1 deletion testing/constraints-3.7.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@
# Then this file should have foo==1.14.0
google-api-core==1.32.0
proto-plus==1.22.0
protobuf==3.20.2
protobuf==3.19.5

0 comments on commit 0d596b6

Please sign in to comment.