Skip to content

Commit

Permalink
Removed ensure_ascii to prevent version compatibility errors
Browse files Browse the repository at this point in the history
  • Loading branch information
holtskinner committed Aug 4, 2023
1 parent a81ee7c commit 4b54464
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
5 changes: 0 additions & 5 deletions proto/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.
"""
Expand All @@ -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":
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 4b54464

Please sign in to comment.