Skip to content

Commit

Permalink
Bump dependency for protobuf and types-protobuf (#338)
Browse files Browse the repository at this point in the history
  • Loading branch information
nipunn1313 authored Jan 22, 2022
1 parent cb90fcb commit e0f32df
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 11 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: Install Protoc
uses: arduino/setup-protoc@v1
with:
version: '3.19.1'
version: '3.19.3'
- uses: actions/checkout@v2
- name: Cache pyenv
uses: actions/cache@v2
Expand Down Expand Up @@ -101,7 +101,7 @@ jobs:
- name: Install Protoc
uses: arduino/setup-protoc@v1
with:
version: '3.19.1'
version: '3.19.3'
- name: Run Protoc
run: |
pip3 install -e .
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
- Reorder/reference enum classes to avoid forward references.
- Support `*_FIELD_NUMBER` for extensions
- Bump types-protobuf dependency to 3.19
- Require protobuf 3.19.3
- Support DESCRIPTOR: ServiceDescriptor in py generic services
- More accurately represent method names in py generic services (done -> callback, self -> inst)
- More accurately represent method names in grpc services (`request` -> `request_iterator`)
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ See [Changelog](CHANGELOG.md) for recent changes.

## Requirements to run mypy-protobuf
Earlier releases might work, but aren't tested
- [protoc >= 3.19.1](https://github.com/protocolbuffers/protobuf/releases)
- [python-protobuf >= 3.19.1](https://pypi.org/project/protobuf/) - matching protoc release
- [protoc >= 3.19.3](https://github.com/protocolbuffers/protobuf/releases)
- [python-protobuf >= 3.19.3](https://pypi.org/project/protobuf/) - matching protoc release
- [python >= 3.6](https://www.python.org/downloads/source/) - for running mypy-protobuf plugin.

## Requirements to run typecheckers on stubs generated by mypy-protobuf
Earlier releases might work, but aren't tested
- [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
- [python-protobuf >= 3.19.3](https://pypi.org/project/protobuf/) - matching protoc release
- [types-protobuf >= 3.19.5](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
Earlier releases might work, but aren't tested
Expand Down
2 changes: 1 addition & 1 deletion run_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ MYPY_PROTOBUF_VENV=venv_$PY_VER_MYPY_PROTOBUF
# Generate protos
python --version
$PROTOC --version
expected="libprotoc 3.19.1"
expected="libprotoc 3.19.3"
if [[ $($PROTOC --version) != $expected ]]; then
echo -e "${RED}For tests - must install protoc version ${expected} ${NC}"
exit 1
Expand Down
4 changes: 2 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ py_modules =
mypy_protobuf.main
mypy_protobuf.extensions_pb2
install_requires =
protobuf>=3.19.1
types-protobuf>=3.19.0
protobuf>=3.19.3
types-protobuf>=3.19.5
python_requires = >=3.6

[options.entry_points]
Expand Down
4 changes: 2 additions & 2 deletions test_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Requirements to run unit tests. Tests import from
# generated code.
protobuf>=3.19.1
protobuf>=3.19.3
pytest==6.2.5
grpc-stubs==1.24.7
grpcio-tools==1.43.0
types-protobuf>=3.19.0
types-protobuf>=3.19.5

0 comments on commit e0f32df

Please sign in to comment.