From eef246efd8365e65b7b2b7f5dc222d671a8deee0 Mon Sep 17 00:00:00 2001 From: Tony Liao Date: Fri, 3 Jan 2025 08:46:36 -0800 Subject: [PATCH] Clean up stale if-guards for Python nonconformance that no longer applies. I just tried removing a bunch of if api_implementation.Type() guards in message_test.py, and a bunch of them just pass without specialization! The bugs that used to cause trouble seem to be now fixed. PiperOrigin-RevId: 711764185 --- python/google/protobuf/internal/message_test.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/python/google/protobuf/internal/message_test.py b/python/google/protobuf/internal/message_test.py index 244631112d..ebb51552c0 100755 --- a/python/google/protobuf/internal/message_test.py +++ b/python/google/protobuf/internal/message_test.py @@ -2583,10 +2583,6 @@ class Proto3Test(unittest.TestCase): msg = map_unittest_pb2.TestMap() msg.map_int32_all_types[2].optional_string = 'bar' - if api_implementation.Type() == 'cpp': - # Need to keep the map reference because of b/27942626. - # TODO: Remove it. - unused_map = msg.map_int32_all_types # pylint: disable=unused-variable msg_value = msg.map_int32_all_types[2] msg.Clear()