Skip to content

Commit 126efc5

Browse files
committed
fix: update protobuf and grpcio-tools versions in requirements-tools.txt; improve pylint configuration and check-protobuf workflow
1 parent a86939d commit 126efc5

4 files changed

Lines changed: 10 additions & 11 deletions

File tree

.github/workflows/check-protobuf.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434

3535
- name: Check for uncommitted changes
3636
run: |
37-
git diff --exit-code -- '*_pb2.py' || {
37+
git diff --exit-code -- '**/*_pb2.py' || {
3838
echo ""
3939
echo "ERROR: pb2 files are out of date with their .proto sources."
4040
echo "Run the protoc commands above locally and commit the updated pb2 files."

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ repos:
1212
- id: pylint-pypowerwall
1313
name: Pylint (pypowerwall errors)
1414
language: system
15-
entry: pylint -E pypowerwall/*.py
16-
files: ^pypowerwall/[^/]+\.py$
15+
entry: pylint -E pypowerwall/
16+
files: ^pypowerwall/.*\.py$
1717
pass_filenames: false
1818

1919
- id: pylint-proxy

tools/gen_proto.sh

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,12 @@
1919
# pip install -r tools/requirements-tools.txt
2020
#
2121
# IMPORTANT - VERSION PINNING:
22-
# The generated pb2 files embed the exact protobuf version used to generate
23-
# them (see ValidateProtobufRuntimeVersion in each pb2 file). The floor in
24-
# requirements.txt and setup.py MUST match this version exactly.
25-
# tools/requirements-tools.txt pins the generator to protobuf 5.x so that
26-
# the library can be used by anyone with protobuf>=5.29.0.
22+
# tools/requirements-tools.txt currently pins the generator to protobuf
23+
# 4.25.x, and the generated pb2 files currently target protobuf>=4.25.1.
24+
# (protobuf 4.25.x does NOT embed ValidateProtobufRuntimeVersion, so any
25+
# 4.x runtime is compatible — but 5.x is not.)
2726
# If you upgrade tools/requirements-tools.txt you MUST also update the
28-
# protobuf floor in requirements.txt and setup.py to match.
27+
# protobuf floor/cap in requirements.txt and setup.py to stay aligned.
2928
#
3029
# USAGE:
3130
# bash tools/gen_proto.sh

tools/requirements-tools.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@
1414
# 2. Update protobuf floor in requirements.txt and setup.py to match the
1515
# "Protobuf Python Version" comment in any regenerated pb2 file.
1616
# 3. Consider whether the upgrade is a breaking change for library users.
17-
grpcio-tools>=1.60.0,<1.64.0
18-
protobuf>=4.25.0,<5
17+
grpcio-tools==1.62.3
18+
protobuf==4.25.1

0 commit comments

Comments
 (0)