dep-protobuf/python/google/protobuf/internal
Anton Grbin 86abf35ef5 Python JSON parser: Ignore invalid enum string values if ignore_unknown_fields is set (#15887)
# Motivation

This PR fixes failing conformance tests for python with name `IgnoreUnknownEnumStringValue`.

The JSON parsing spec was discussed in https://github.com/protocolbuffers/protobuf/issues/7392.

Recent equivalent changes for other languages:
* Swift: https://github.com/apple/swift-protobuf/pull/1345
* C#: https://github.com/protocolbuffers/protobuf/pull/15758

# Changes

- 1st commit is a noop  refactoring to make relevant _ConvertScalarFieldValue invocations localized
- 2nd commit introduces the child exception of `ParseError` named `EnumStringValueParseError` which is suppressed if `ignore_unknown_fields` is set
- 3rd commit updates the conformance test failure lists

Closes #15887

COPYBARA_INTEGRATE_REVIEW=https://github.com/protocolbuffers/protobuf/pull/15887 from noom:anton/7392/fix-python-test fbcc93a232
PiperOrigin-RevId: 619288323
2024-03-26 13:22:12 -07:00
..
import_test_package Shorten our license headers into an abbreviated form that references LICENSE instead of including it in full. 2023-09-08 17:49:49 -07:00
numpy Reorganize upb file structure 2023-09-26 14:38:35 -07:00
__init__.py Shorten our license headers into an abbreviated form that references LICENSE instead of including it in full. 2023-09-08 18:50:27 -07:00
_parameterized.py Shorten our license headers into an abbreviated form that references LICENSE instead of including it in full. 2023-09-08 18:50:27 -07:00
any_test.proto Shorten our license headers into an abbreviated form that references LICENSE instead of including it in full. 2023-09-08 18:50:27 -07:00
api_implementation.cc Shorten our license headers into an abbreviated form that references LICENSE instead of including it in full. 2023-09-08 18:50:27 -07:00
api_implementation.py internal chnge 2024-03-26 13:17:46 -07:00
builder.py Internal change 2023-09-18 15:17:56 -07:00
containers.py BREAKING CHANGE in v26: Reject extend repeated field with none iterable (Raise TypeError) 2024-01-04 17:14:41 -08:00
decoder.py internal change 2024-03-08 10:55:53 -08:00
descriptor_database_test.py Shorten our license headers into an abbreviated form that references LICENSE instead of including it in full. 2023-09-08 18:50:27 -07:00
descriptor_pool_test.py Disallow all feature types except enum and boolean. 2024-03-21 12:51:15 -07:00
descriptor_pool_test1.proto Fixed a bug where FileDescriptor maps like message_types_by_name could return descriptors from other files. 2023-12-01 15:12:41 -08:00
descriptor_pool_test2.proto Shorten our license headers into an abbreviated form that references LICENSE instead of including it in full. 2023-09-08 18:50:27 -07:00
descriptor_test.py Disallow all feature types except enum and boolean. 2024-03-21 12:51:15 -07:00
encoder.py Shorten our license headers into an abbreviated form that references LICENSE instead of including it in full. 2023-09-08 18:50:27 -07:00
enum_type_wrapper.py Shorten our license headers into an abbreviated form that references LICENSE instead of including it in full. 2023-09-08 18:50:27 -07:00
extension_dict.py Internal change 2023-09-18 15:17:56 -07:00
factory_test1.proto On demand create message meta class for upb python 2023-09-15 11:34:38 -07:00
factory_test2.proto Shorten our license headers into an abbreviated form that references LICENSE instead of including it in full. 2023-09-08 18:50:27 -07:00
field_mask.py Shorten our license headers into an abbreviated form that references LICENSE instead of including it in full. 2023-09-08 18:50:27 -07:00
field_mask_test.py Add ABSL_ATTRIBUTE_LIFETIME_BOUND attribute on generated oneof accessors. 2023-09-29 09:01:46 -07:00
file_options_test.proto Shorten our license headers into an abbreviated form that references LICENSE instead of including it in full. 2023-09-08 18:50:27 -07:00
generator_test.py Add ABSL_ATTRIBUTE_LIFETIME_BOUND attribute on generated oneof accessors. 2023-09-29 09:01:46 -07:00
import_test.py Shorten our license headers into an abbreviated form that references LICENSE instead of including it in full. 2023-09-08 18:50:27 -07:00
json_format_test.py Python JSON parser: Ignore invalid enum string values if ignore_unknown_fields is set (#15887) 2024-03-26 13:22:12 -07:00
keywords_test.py Shorten our license headers into an abbreviated form that references LICENSE instead of including it in full. 2023-09-08 18:50:27 -07:00
message_factory_test.py On demand create message meta class for upb python 2023-09-15 11:34:38 -07:00
message_listener.py Shorten our license headers into an abbreviated form that references LICENSE instead of including it in full. 2023-09-08 18:50:27 -07:00
message_set_extensions.proto Shorten our license headers into an abbreviated form that references LICENSE instead of including it in full. 2023-09-08 18:50:27 -07:00
message_test.py fix upb python: DO NOT create empty optional field after sorting empty repeated field 2024-03-22 20:00:05 -07:00
missing_enum_values.proto Shorten our license headers into an abbreviated form that references LICENSE instead of including it in full. 2023-09-08 18:50:27 -07:00
more_extensions.proto Shorten our license headers into an abbreviated form that references LICENSE instead of including it in full. 2023-09-08 18:50:27 -07:00
more_extensions_dynamic.proto Shorten our license headers into an abbreviated form that references LICENSE instead of including it in full. 2023-09-08 18:50:27 -07:00
more_messages.proto loosen upb for json name conflict check in proto2 between json name and field 2023-10-09 14:31:17 -07:00
no_package.proto Shorten our license headers into an abbreviated form that references LICENSE instead of including it in full. 2023-09-08 18:50:27 -07:00
packed_field_test.proto Shorten our license headers into an abbreviated form that references LICENSE instead of including it in full. 2023-09-08 18:50:27 -07:00
proto_builder_test.py Shorten our license headers into an abbreviated form that references LICENSE instead of including it in full. 2023-09-08 18:50:27 -07:00
python_edition_defaults.py.template Implement Editions in Pure Python. 2023-11-07 14:40:26 -08:00
python_message.py internal change 2024-03-08 10:55:53 -08:00
python_protobuf.cc Shorten our license headers into an abbreviated form that references LICENSE instead of including it in full. 2023-09-08 18:50:27 -07:00
reflection_test.py Fixed a SEGV when deep copying a non-reified sub-message. 2024-01-23 17:13:47 -08:00
runtime_version_test.py Introduce Python Protobuf runtime version. 2024-03-06 08:26:18 -08:00
service_reflection_test.py Shorten our license headers into an abbreviated form that references LICENSE instead of including it in full. 2023-09-08 18:50:27 -07:00
symbol_database_test.py Shorten our license headers into an abbreviated form that references LICENSE instead of including it in full. 2023-09-08 18:50:27 -07:00
test_bad_identifiers.proto Shorten our license headers into an abbreviated form that references LICENSE instead of including it in full. 2023-09-08 18:50:27 -07:00
test_proto2.proto Add new including_default_value_without_presence_fields to Python JSON serializer. 2024-01-31 14:16:54 -08:00
test_proto3_optional.proto Add new including_default_value_without_presence_fields to Python JSON serializer. 2024-01-31 14:16:54 -08:00
test_util.py Add CI runs for testing upb Python wheels 2023-09-21 11:33:23 -07:00
testing_refleaks.py Shorten our license headers into an abbreviated form that references LICENSE instead of including it in full. 2023-09-08 18:50:27 -07:00
text_encoding_test.py Breaking Change: Made text_format output default to UTF-8. 2024-01-23 20:34:54 -08:00
text_format_test.py upb: fix textformat encoder to print group name instead of field name 2024-03-22 10:59:29 -07:00
thread_safe_test.py Shorten our license headers into an abbreviated form that references LICENSE instead of including it in full. 2023-09-08 18:50:27 -07:00
type_checkers.py Shorten our license headers into an abbreviated form that references LICENSE instead of including it in full. 2023-09-08 18:50:27 -07:00
unknown_fields_test.py Shorten our license headers into an abbreviated form that references LICENSE instead of including it in full. 2023-09-08 18:50:27 -07:00
well_known_types.py Add a go/pytype annotation on Duration.toTimedelta. 2024-03-18 14:03:02 -07:00
well_known_types_test.py BREAKING CHANGE in v26: check if Timestamp is valid. 2023-12-27 16:38:51 -08:00
wire_format.py Shorten our license headers into an abbreviated form that references LICENSE instead of including it in full. 2023-09-08 18:50:27 -07:00
wire_format_test.py Shorten our license headers into an abbreviated form that references LICENSE instead of including it in full. 2023-09-08 18:50:27 -07:00