Skip to content

Commit 711bd96

Browse files
authored
fix: update protobuf dependency to v5.29.5 (#111)
This PR upgrades the `protobuf` dependency and related dependencies to a consistent version. - update protobuf to v5.29.5 - downgrade protoc in devcontainer to v29.5 - update nipunn1313-mypy buf plugin to v3.6.0 - regenerate proto Python code with protobuf v5.29.5 - update uv.lock fixes #110 Signed-off-by: Niels Pardon <par@zurich.ibm.com>
1 parent 16eb837 commit 711bd96

24 files changed

+868
-856
lines changed

.devcontainer/Dockerfile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@ SHELL ["/bin/bash", "-c"]
55
RUN source "/home/vscode/.sdkman/bin/sdkman-init.sh" && sdk install java 25-graalce
66
RUN mkdir -p ~/lib && cd ~/lib && curl -L -O http://www.antlr.org/download/antlr-4.13.2-complete.jar
77
ENV ANTLR_JAR="~/lib/antlr-4.13.1-complete.jar"
8-
RUN cd ~ && curl -LO https://github.com/protocolbuffers/protobuf/releases/download/v30.2/protoc-30.2-linux-x86_64.zip && \
9-
unzip protoc-30.2-linux-x86_64.zip -d ~/.local && \
10-
rm protoc-30.2-linux-x86_64.zip
8+
# protoc 29.5 is the last version with protobuf python v5 which is compatible with protoletariat v3
9+
RUN cd ~ && curl -LO https://github.com/protocolbuffers/protobuf/releases/download/v29.5/protoc-29.5-linux-x86_64.zip && \
10+
unzip protoc-29.5-linux-x86_64.zip -d ~/.local && \
11+
rm protoc-29.5-linux-x86_64.zip
1112
RUN curl -sSL "https://github.com/bufbuild/buf/releases/download/v1.58.0/buf-$(uname -s)-$(uname -m)" -o ~/.local/bin/buf && chmod +x ~/.local/bin/buf
1213
RUN curl -LsSf https://astral.sh/uv/install.sh | sh
1314
USER root

buf.gen.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ version: v2
22
plugins:
33
- protoc_builtin: python
44
out: src/substrait/gen
5-
- remote: buf.build/community/nipunn1313-mypy:v3.5.0
5+
- remote: buf.build/community/nipunn1313-mypy:v3.6.0
66
out: src/substrait/gen

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@ authors = [{name = "Substrait contributors", email = "substrait@googlegroups.com
55
license = {text = "Apache-2.0"}
66
readme = "README.md"
77
requires-python = ">=3.9"
8-
dependencies = ["protobuf >= 3.20"]
8+
dependencies = ["protobuf >=3.19.1,<6"]
99
dynamic = ["version"]
1010

1111
[tool.setuptools_scm]
1212
write_to = "src/substrait/_version.py"
1313

1414
[project.optional-dependencies]
1515
extensions = ["antlr4-python3-runtime", "pyyaml"]
16-
gen_proto = ["protobuf == 3.20.1", "protoletariat >= 2.0.0"]
16+
gen_proto = ["protobuf >=3.19.1,<6", "protoletariat >= 3.0.0"]
1717
sql = ["sqloxide", "deepdiff"]
1818
test = ["pytest >= 7.0.0", "antlr4-python3-runtime", "pyyaml", "sqloxide", "deepdiff", "duckdb<=1.2.2", "datafusion"]
1919

src/substrait/gen/json/__init__.py

Whitespace-only changes.

src/substrait/gen/json/__init__.pyi

Whitespace-only changes.

src/substrait/gen/proto/algebra_pb2.py

Lines changed: 21 additions & 19 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)