From 7be917a0a8108de3863f73d7776cc4406ca5c6cf Mon Sep 17 00:00:00 2001 From: Nipunn Koorapati Date: Mon, 10 Jan 2022 01:36:20 -0800 Subject: [PATCH] Bump types-protobuf to 3.19.0 (#334) --- CHANGELOG.md | 2 +- README.md | 4 ++-- setup.cfg | 2 +- test_negative/output.expected.3.8 | 2 +- test_negative/output.expected.3.8.omit_linenos | 2 +- test_requirements.txt | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 04bb846b..9c651665 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,7 @@ - Remove unnecessary `...` in generated files. - Reorder/reference enum classes to avoid forward references. - Support `*_FIELD_NUMBER` for extensions -- Bump types-protobuf dependency to 3.18 +- Bump types-protobuf dependency to 3.19 - Internal: Get tests to pass on pure-python protobuf impl (minor semantic differences) - Internal: Bump pyright in testing to 1.1.206 diff --git a/README.md b/README.md index 6ab37184..e5d8addd 100644 --- a/README.md +++ b/README.md @@ -18,8 +18,8 @@ Earlier releases might work, but aren't tested ## Requirements to run typecheckers on stubs generated by mypy-protobuf Earlier releases might work, but aren't tested -- [mypy >= v0.930](https://pypi.org/project/mypy) or [pyright >= 1.1.206](https://github.com/microsoft/pyright) -- [python-protobuf >= 3.19.1](https://pypi.org/project/protobuf/) - matching protoc release +- [mypy >= v0.931](https://pypi.org/project/mypy) or [pyright >= 1.1.206](https://github.com/microsoft/pyright) +- [python-protobuf >= 3.19.0](https://pypi.org/project/protobuf/) - matching protoc release - [types-protobuf==3.18.2](https://pypi.org/project/types-protobuf/) - for stubs from the google.protobuf library ### To run typecheckers on code generated with grpc plugin - you'll additionally need diff --git a/setup.cfg b/setup.cfg index 899e691a..9d0479b9 100644 --- a/setup.cfg +++ b/setup.cfg @@ -16,7 +16,7 @@ py_modules = mypy_protobuf.extensions_pb2 install_requires = protobuf>=3.19.1 - types-protobuf>=3.18.4 + types-protobuf>=3.19.0 python_requires = >=3.6 [options.entry_points] diff --git a/test_negative/output.expected.3.8 b/test_negative/output.expected.3.8 index ad16f94b..ed0b5209 100644 --- a/test_negative/output.expected.3.8 +++ b/test_negative/output.expected.3.8 @@ -21,7 +21,7 @@ test_negative/negative_3.8.py:104: note: This violates the Liskov substitution p test_negative/negative_3.8.py:104: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#incompatible-overrides test_negative/negative_3.8.py:104: error: Return type "Iterator[DummyReply]" of "StreamUnary" incompatible with return type "DummyReply" in supertype "DummyServiceServicer" [override] test_negative/negative.py:28: error: "Simple1" has no attribute "SerializeToStringg" [attr-defined] -test_negative/negative.py:31: error: Argument 1 to "ParseFromString" of "Message" has incompatible type "Simple1"; expected "ByteString" [arg-type] +test_negative/negative.py:31: error: Argument 1 to "ParseFromString" of "Message" has incompatible type "Simple1"; expected "bytes" [arg-type] test_negative/negative.py:34: error: Argument 1 to "CopyFrom" of "Message" has incompatible type "bytes"; expected "Simple1" [arg-type] test_negative/negative.py:38: error: Argument 1 to "extend" of "list" has incompatible type "RepeatedScalarFieldContainer[str]"; expected "Iterable[int]" [arg-type] test_negative/negative.py:40: error: Argument "foo" to "TestMessage" has incompatible type "int"; expected "str" [arg-type] diff --git a/test_negative/output.expected.3.8.omit_linenos b/test_negative/output.expected.3.8.omit_linenos index 8f70315f..fd4048a5 100644 --- a/test_negative/output.expected.3.8.omit_linenos +++ b/test_negative/output.expected.3.8.omit_linenos @@ -21,7 +21,7 @@ test_negative/negative_3.8.py: note: This violates the Liskov substitution princ test_negative/negative_3.8.py: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#incompatible-overrides test_negative/negative_3.8.py: error: Return type "Iterator[DummyReply]" of "StreamUnary" incompatible with return type "DummyReply" in supertype "DummyServiceServicer" [override] test_negative/negative.py: error: "Simple1" has no attribute "SerializeToStringg" [attr-defined] -test_negative/negative.py: error: Argument 1 to "ParseFromString" of "Message" has incompatible type "Simple1"; expected "ByteString" [arg-type] +test_negative/negative.py: error: Argument 1 to "ParseFromString" of "Message" has incompatible type "Simple1"; expected "bytes" [arg-type] test_negative/negative.py: error: Argument 1 to "CopyFrom" of "Message" has incompatible type "bytes"; expected "Simple1" [arg-type] test_negative/negative.py: error: Argument 1 to "extend" of "list" has incompatible type "RepeatedScalarFieldContainer[str]"; expected "Iterable[int]" [arg-type] test_negative/negative.py: error: Argument "foo" to "TestMessage" has incompatible type "int"; expected "str" [arg-type] diff --git a/test_requirements.txt b/test_requirements.txt index df77ac73..35a14f4b 100644 --- a/test_requirements.txt +++ b/test_requirements.txt @@ -4,4 +4,4 @@ protobuf>=3.19.1 pytest==6.2.5 grpc-stubs==1.24.7 grpcio-tools==1.43.0 -types-protobuf>=3.18.4 +types-protobuf>=3.19.0