Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow protobuf v5 as dependency #8627

Merged
merged 23 commits into from
Jun 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
18 changes: 11 additions & 7 deletions .github/actions/make_init/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,18 @@ runs:
libgvc6
shell: bash --login -eo pipefail {0}
# We require protoc >= 3.20, but Ubuntu 22.04 - the OS that these Github
# Actions are running as of 2023.05.03 - doesn't have recent versions
# of protoc in its package repository. To work around this, we vendor in
# protoc 3.20.3.
# We can remove the vendored protoc binary and this run step once Github
# Actions moves to a newer version of Ubunutu.
- name: Add vendored `protoc` to $PATH
# Actions are running as of 2024.06.04 - doesn't have recent versions
# of protoc in its package repository. To work around this, we
# install the latest version from the protobuf release page.
- name: Install `protoc` binary
run: |
echo "./vendor/protoc-3.20.3-linux-x86_64/bin" >> $GITHUB_PATH
PROTOC_VERSION=26.1
curl -OL https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-x86_64.zip
sudo unzip -o protoc-${PROTOC_VERSION}-linux-x86_64.zip -d /usr/local bin/protoc
sudo unzip -o protoc-${PROTOC_VERSION}-linux-x86_64.zip -d /usr/local 'include/*'
sudo ln -s /usr/local/bin/protoc /usr/bin/protoc
# Print out your System's protoc version:
protoc --version
shell: bash --login -eo pipefail {0}
# Combine hashes of the Python interpreter, Pipfile, and today's
# date into a file whose hash will key the Python virtualenv.
Expand Down
2 changes: 0 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -237,8 +237,6 @@ MIN_PROTOC_VERSION = 3.20
.PHONY: check-protoc
# Ensure protoc is installed and is >= MIN_PROTOC_VERSION.
check-protoc:
@# We support Python protobuf 4.21, which is incompatible with code generated from
@# protoc < 3.20
@if ! command -v protoc &> /dev/null ; then \
echo "protoc not installed."; \
exit 1; \
Expand Down
2 changes: 0 additions & 2 deletions lib/dev-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ hypothesis>=6.17.4
mypy>=1.4, <1.7
mypy-protobuf>=3.2
parameterized
# Lower protobuf versions cause mypy issues during development builds
protobuf>=3.19, <4
pytest
pytest-cov
requests-mock
Expand Down
7 changes: 2 additions & 5 deletions lib/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,8 @@
# Lowest version with available wheel for 3.7 + amd64 + linux
"pandas>=1.3.0, <3",
"pillow>=7.1.0, <11",
# Python protobuf 4.21 (the first 4.x version) is compatible with protobufs
# generated from `protoc` >= 3.20. (`protoc` is installed separately from the Python
# protobuf package, so this pin doesn't actually enforce a `protoc` minimum version.
# Instead, the `protoc` min version is enforced in our Makefile.)
"protobuf>=3.20, <5",
# `protoc` < 3.20 is not able to generate protobuf code compatible with protobuf >= 3.20.
"protobuf>=3.20, <6",
# pyarrow is not semantically versioned, gets new major versions frequently, and
# doesn't tend to break the API on major version upgrades, so we don't put an
# upper bound on it.
Expand Down
2 changes: 0 additions & 2 deletions lib/test-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ pytest-xdist
pytest-rerunfailures
pytest-github-actions-annotate-failures

mypy-protobuf>=3.2, <3.4

# Used for testing of st.connection
sqlalchemy[mypy]>=1.4.25, <2

Expand Down
32 changes: 0 additions & 32 deletions vendor/protoc-3.20.3-linux-x86_64/LICENSE

This file was deleted.

Binary file removed vendor/protoc-3.20.3-linux-x86_64/bin/protoc
Binary file not shown.
158 changes: 0 additions & 158 deletions vendor/protoc-3.20.3-linux-x86_64/include/google/protobuf/any.proto

This file was deleted.