From 4b544642c340cb080339d5f236377b0918fbc927 Mon Sep 17 00:00:00 2001 From: Holt Skinner Date: Fri, 4 Aug 2023 11:59:18 -0500 Subject: [PATCH] Removed `ensure_ascii` to prevent version compatibility errors --- proto/message.py | 5 ----- setup.py | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/proto/message.py b/proto/message.py index 4133b062..413e8d1c 100644 --- a/proto/message.py +++ b/proto/message.py @@ -379,7 +379,6 @@ def to_json( sort_keys=False, indent=2, float_precision=None, - ensure_ascii=False, ) -> str: """Given a message instance, serialize it to json @@ -399,9 +398,6 @@ def to_json( Pass None for the most compact representation without newlines. float_precision (Optional(int)): If set, use this to specify float field valid digits. Default is None. - ensure_ascii (Optional(bool)): If True, strings with non-ASCII characters are escaped. - If False, Unicode strings are returned unchanged. - Default is False. Returns: str: The json string representation of the protocol buffer. """ @@ -413,7 +409,6 @@ def to_json( sort_keys=sort_keys, indent=indent, float_precision=float_precision, - ensure_ascii=ensure_ascii, ) def from_json(cls, payload, *, ignore_unknown_fields=False) -> "Message": diff --git a/setup.py b/setup.py index b9e1acf2..670bca40 100644 --- a/setup.py +++ b/setup.py @@ -36,7 +36,7 @@ long_description=README, platforms="Posix; MacOS X", include_package_data=True, - install_requires=("protobuf >= 3.20.0, <5.0.0dev",), + install_requires=("protobuf >= 3.19.0, <5.0.0dev",), extras_require={ "testing": [ "google-api-core[grpc] >= 1.31.5",