diff options
Diffstat (limited to 'dev-python/protobuf-python/files')
3 files changed, 34 insertions, 58 deletions
diff --git a/dev-python/protobuf-python/files/editions.patch b/dev-python/protobuf-python/files/editions.patch deleted file mode 100644 index bd81416897a9..000000000000 --- a/dev-python/protobuf-python/files/editions.patch +++ /dev/null @@ -1,58 +0,0 @@ -From 2eee41224e2eac1aa4e8e8f4a28ff11748e49a41 Mon Sep 17 00:00:00 2001 -From: Mike Kruskal <mkruskal@google.com> -Date: Thu, 10 Aug 2023 15:35:41 -0700 -Subject: [PATCH] Remove editions test proto from setup.py. - -This proto is only used in C++ tests, and doesn't need to be built in python. Python doesn't support editions yet, so we should just remove it for now. This also fixes some other issues with setup.py where tests fail. - -Closes #13501 - -PiperOrigin-RevId: 555681295 ---- - python/google/protobuf/internal/descriptor_test.py | 5 ++--- - python/setup.py | 2 +- - 2 files changed, 3 insertions(+), 4 deletions(-) - -diff --git a/python/google/protobuf/internal/descriptor_test.py b/python/google/protobuf/internal/descriptor_test.py -index b070bca87dc..b7e8d71f4d6 100755 ---- a/python/google/protobuf/internal/descriptor_test.py -+++ b/python/google/protobuf/internal/descriptor_test.py -@@ -67,7 +67,7 @@ - message ResponseMessage { - } - --service Service { -+service DescriptorTestService { - rpc CallMethod(.protobuf_unittest.NestedMessage) returns (.protobuf_unittest.ResponseMessage); - } - -@@ -97,8 +97,7 @@ def setUp(self): - enum_proto.value.add(name='FOREIGN_BAZ', number=6) - - file_proto.message_type.add(name='ResponseMessage') -- service_proto = file_proto.service.add( -- name='Service') -+ service_proto = file_proto.service.add(name='DescriptorTestService') - method_proto = service_proto.method.add( - name='CallMethod', - input_type='.protobuf_unittest.NestedMessage', -diff --git a/python/setup.py b/python/setup.py -index e65631013eb..c686ddc25a7 100755 ---- a/python/setup.py -+++ b/python/setup.py -@@ -131,7 +131,6 @@ def GenerateUnittestProtos(): - GenProto('../src/google/protobuf/map_unittest.proto', False) - GenProto('../src/google/protobuf/test_messages_proto3.proto', False) - GenProto('../src/google/protobuf/test_messages_proto2.proto', False) -- GenProto('../src/google/protobuf/unittest_arena.proto', False) - GenProto('../src/google/protobuf/unittest.proto', False) - GenProto('../src/google/protobuf/unittest_custom_options.proto', False) - GenProto('../src/google/protobuf/unittest_import.proto', False) -@@ -140,6 +139,7 @@ def GenerateUnittestProtos(): - GenProto('../src/google/protobuf/unittest_mset_wire_format.proto', False) - GenProto('../src/google/protobuf/unittest_no_generic_services.proto', False) - GenProto('../src/google/protobuf/unittest_proto3_arena.proto', False) -+ GenProto('../src/google/protobuf/unittest_retention.proto', False) - GenProto('../src/google/protobuf/util/json_format.proto', False) - GenProto('../src/google/protobuf/util/json_format_proto3.proto', False) - GenProto('google/protobuf/internal/any_test.proto', False) diff --git a/dev-python/protobuf-python/files/protobuf-python-4.22.5-c++-17.patch b/dev-python/protobuf-python/files/protobuf-python-4.22.5-c++-17.patch new file mode 100644 index 000000000000..3ca6a5776d04 --- /dev/null +++ b/dev-python/protobuf-python/files/protobuf-python-4.22.5-c++-17.patch @@ -0,0 +1,13 @@ +diff --git a/python/setup.py b/python/setup.py +index e65631013..8a6cbe59a 100755 +--- a/python/setup.py ++++ b/python/setup.py +@@ -370,7 +370,7 @@ if __name__ == '__main__': + extra_compile_args.append('-Wno-invalid-offsetof') + extra_compile_args.append('-Wno-sign-compare') + extra_compile_args.append('-Wno-unused-variable') +- extra_compile_args.append('-std=c++14') ++ extra_compile_args.append('-std=c++17') + + if sys.platform == 'darwin': + extra_compile_args.append('-Wno-shorten-64-to-32') diff --git a/dev-python/protobuf-python/files/protobuf-python-4.22.5-python.patch b/dev-python/protobuf-python/files/protobuf-python-4.22.5-python.patch new file mode 100644 index 000000000000..65cb22d5f653 --- /dev/null +++ b/dev-python/protobuf-python/files/protobuf-python-4.22.5-python.patch @@ -0,0 +1,21 @@ +See also https://github.com/protocolbuffers/protobuf/pull/9098 +--- a/google/protobuf/internal/json_format_test.py ++++ b/google/protobuf/internal/json_format_test.py +@@ -1060,7 +1060,7 @@ class JsonFormatTest(JsonFormatBase): + def testInvalidTimestamp(self): + message = json_format_proto3_pb2.TestTimestamp() + text = '{"value": "10000-01-01T00:00:00.00Z"}' +- self.assertRaisesRegexp( ++ self.assertRaisesRegex( + json_format.ParseError, 'Failed to parse value field: ' + 'time data \'10000-01-01T00:00:00\' does not match' + ' format \'%Y-%m-%dT%H:%M:%S\' at TestTimestamp.value.', +@@ -1097,7 +1097,7 @@ class JsonFormatTest(JsonFormatBase): + def testInvalidOneof(self): + message = json_format_proto3_pb2.TestOneof() + text = '{"oneofInt32Value": 1, "oneofStringValue": "2"}' +- self.assertRaisesRegexp( ++ self.assertRaisesRegex( + json_format.ParseError, 'Message type "proto3.TestOneof"' + ' should not have multiple "oneof_value" oneof fields at "TestOneof".', + json_format.Parse, text, message) |
