Skip to content

Commit d5bea2e

Browse files
authored
fix(crc32c): Drop support for Python 3.8 and 3.9 (googleapis#16955)
This PR updates \`google-crc32c\` to establish Python 3.10 as the minimum supported version, dropping support for Python 3.7, 3.8, and 3.9. ### Changes * Configuration: Updated \`setup.cfg\` and \`pyproject.toml\` to require Python 3.10+ and remove references to Python 3.8 and 3.9. * Nox: Updated \`noxfile.py\` to remove Python 3.7, 3.8, and 3.9 from unit test versions. * Documentation: Updated \`README.md\` to reflect supported Python versions and published wheels. Note: Verification tests were skipped locally due to environment issues with building the C library in the Docker container, but changes are strictly metadata and configuration! Fixes internal issue: http://b/482126936 🦕
1 parent 63f6d96 commit d5bea2e

10 files changed

Lines changed: 13 additions & 22 deletions

File tree

packages/google-crc32c/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ C toolchain.
99

1010
# Currently Published Wheels
1111

12-
Wheels are currently published for CPython 3.9, 3.10, 3.11, 3.12, 3.13 and 3.14
13-
for multiple architectures. PyPy 3.9 and 3.10 are also supported for Linux.
12+
Wheels are currently published for CPython 3.10, 3.11, 3.12, 3.13 and 3.14
13+
for multiple architectures. PyPy 3.10 is also supported for Linux.
1414
For information on building your own wheels please view [BUILDING.md](BUILDING.md).
1515

1616

packages/google-crc32c/mypy.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[mypy]
2-
python_version = 3.9
2+
python_version = 3.10
33
exclude = tests/unit/resources/

packages/google-crc32c/noxfile.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,8 @@
2525

2626
# Constants
2727
DEFAULT_PYTHON_VERSION = "3.14"
28-
UNIT_TEST_PYTHON_VERSIONS = ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
28+
UNIT_TEST_PYTHON_VERSIONS = ["3.10", "3.11", "3.12", "3.13", "3.14"]
2929
ALL_PYTHON = list(UNIT_TEST_PYTHON_VERSIONS)
30-
ALL_PYTHON.extend(["3.7"])
3130

3231
FLAKE8_VERSION = "flake8==6.1.0"
3332
BLACK_VERSION = "black[jupyter]==23.7.0"

packages/google-crc32c/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,5 @@ name = "google-crc32c"
2121
version = "1.8.0"
2222
description = "A python wrapper of the C library 'Google CRC32C'"
2323
readme = "README.md"
24-
requires-python = ">=3.8"
24+
requires-python = ">=3.10"
2525
license = {text = "Apache-2.0"}

packages/google-crc32c/scripts/manylinux/build_on_centos.sh

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,7 @@ if [[ -z ${BUILD_PYTHON} ]]; then
4848
# Collect all target Python versions.
4949
for PYTHON_BIN in /opt/python/*/bin; do
5050
# H/T: https://stackoverflow.com/a/229606/1068170
51-
if [[ "${PYTHON_BIN}" == *"39"* ]]; then
52-
PYTHON_VERSIONS="${PYTHON_VERSIONS} ${PYTHON_BIN}"
53-
continue
54-
elif [[ "${PYTHON_BIN}" == *"310"* ]]; then
51+
if [[ "${PYTHON_BIN}" == *"310"* ]]; then
5552
PYTHON_VERSIONS="${PYTHON_VERSIONS} ${PYTHON_BIN}"
5653
continue
5754
elif [[ "${PYTHON_BIN}" == *"311"* ]]; then

packages/google-crc32c/scripts/osx/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ ${OSX_DIR}/build_c_lib.sh
4141
rm -rf /Users/kbuilder/.pyenv
4242
git clone https://github.com/pyenv/pyenv.git /Users/kbuilder/.pyenv
4343

44-
SUPPORTED_PYTHON_VERSIONS=("3.9" "3.10" "3.11" "3.12" "3.13" "3.14")
44+
SUPPORTED_PYTHON_VERSIONS=("3.10" "3.11" "3.12" "3.13" "3.14")
4545

4646
for PYTHON_VERSION in ${SUPPORTED_PYTHON_VERSIONS[@]}; do
4747
echo "Build wheel for Python ${PYTHON_VERSION}"

packages/google-crc32c/scripts/osx/publish_python_wheel.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@
1515

1616
set -eo pipefail
1717

18-
if [ -z "$(pyenv versions --bare | grep 3.8)" ]; then
19-
echo "Python 3.8 is not installed. Installing..."
20-
pyenv install 3.8
18+
if [ -z "$(pyenv versions --bare | grep 3.10)" ]; then
19+
echo "Python 3.10 is not installed. Installing..."
20+
pyenv install 3.10
2121
fi
22-
pyenv shell 3.8
22+
pyenv shell 3.10
2323

2424
python -m pip install "setuptools<71"
2525

packages/google-crc32c/setup.cfg

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@ classifiers =
2929
Intended Audience :: Developers
3030
Operating System :: OS Independent
3131
Programming Language :: Python :: 3
32-
Programming Language :: Python :: 3.8
33-
Programming Language :: Python :: 3.9
3432
Programming Language :: Python :: 3.10
3533
Programming Language :: Python :: 3.11
3634
Programming Language :: Python :: 3.12
@@ -39,7 +37,7 @@ classifiers =
3937

4038
[options]
4139
zip_safe = True
42-
python_requires = >=3.8
40+
python_requires = >=3.10
4341

4442
[options.extras_require]
4543
testing = pytest

packages/google-crc32c/setup.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,7 @@ def build_c_extension():
104104
package_dir={"": "src"},
105105
ext_modules=[module],
106106
cmdclass={"build_ext": BuildExtWithDLL},
107-
install_requires=[
108-
"importlib_resources>=1.3 ; python_version < '3.9' and os_name == 'nt'"
109-
],
107+
install_requires=[],
110108
)
111109

112110

packages/google-crc32c/src/google_crc32c/__config__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ def modify_path():
3030

3131
extra_dll_dir = str(_resources_files("google_crc32c") / "extra-dll")
3232
if os.path.isdir(extra_dll_dir):
33-
# Python 3.8+ uses add_dll_directory.
3433
os.add_dll_directory(extra_dll_dir)
3534
except ImportError:
3635
pass

0 commit comments

Comments
 (0)