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

Drop Python 3.8 support #1225

Merged
merged 4 commits into from
Jan 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ env:
GO_VER: '1.21.x'
PGG_VER: 'v1.31.0'
PROTOC_VER: '24.3'
PYTHON_VER: '3.8'
PYTHON_VER: '3.9'
TEST_TAG: protoc-gen-validate:${{ github.sha }}

jobs:
Expand Down
12 changes: 5 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,12 @@ ENV INSTALL_DEPS \
wget \
maven \
patch \
python3 \
python3-distutils \
python3-setuptools \
python3.9 \
python3-pip \
apt-transport-https \
curl \
openjdk-8-jdk \
gnupg
gnupg

RUN apt update \
&& apt install -y -q --no-install-recommends ${INSTALL_DEPS} \
Expand Down Expand Up @@ -63,14 +62,13 @@ RUN go install github.com/bazelbuild/buildtools/buildozer@${BDR_VER} \

# python must be on PATH for the execution of py_binary bazel targets, but
# the distribution we installed doesn't provide this alias
RUN ln -s /usr/bin/python3.8 /usr/bin/python
RUN ln -s /usr/bin/python3.9 /usr/bin/python

WORKDIR ${GOPATH}/src/github.com/envoyproxy/protoc-gen-validate

# python tooling for linting and uploading to PyPI
COPY requirements.txt .
RUN python3.8 -m easy_install pip \
&& python3.8 -m pip install -r requirements.txt
RUN pip3 install -r requirements.txt

COPY . .

Expand Down
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -143,14 +143,14 @@ prepare-python-release:
.PHONY: python-release
python-release: prepare-python-release
rm -rf python/dist
python3.8 -m build --no-isolation --sdist python
# the below command should be identical to `python3.8 -m build --wheel`
python3.9 -m build --no-isolation --sdist python
# the below command should be identical to `python3.9 -m build --wheel`
# however that returns mysterious `error: could not create 'build': File exists`.
# setuptools copies source and data files to a temporary build directory,
# but why there's a collision or why setuptools stopped respecting the `build_lib` flag is unclear.
# As a workaround, we build a source distribution and then separately build a wheel from it.
python3.8 -m pip wheel --wheel-dir python/dist --no-deps python/dist/*
python3.8 -m twine upload --verbose --skip-existing --repository ${PYPI_REPO} --username "__token__" --password ${PGV_PYPI_TOKEN} python/dist/*
python3.9 -m pip wheel --wheel-dir python/dist --no-deps python/dist/*
python3.9 -m twine upload --verbose --skip-existing --repository ${PYPI_REPO} --username "__token__" --password ${PGV_PYPI_TOKEN} python/dist/*

.PHONY: check-generated
check-generated: ## run during CI; this checks that the checked-in generated code matches the generated version.
Expand Down
5 changes: 1 addition & 4 deletions python/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ license_files = LICENSE
classifiers =
Programming Language :: Python :: 3
Programming Language :: Python :: 3 :: Only
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
stefanvanburen marked this conversation as resolved.
Show resolved Hide resolved
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
Expand All @@ -27,7 +24,7 @@ install_requires =
Jinja2>=2.11.1
protobuf>=5.27.0
astunparse>=1.6.3; python_version<"3.10"
python_requires = >=3.6
python_requires = >=3.9

[options.data_files]
data = validate.proto
Expand Down
Loading