Skip to content
This repository was archived by the owner on Jun 1, 2026. It is now read-only.

Commit f9745b8

Browse files
authored
fix: drop support for python 3.6 (#145)
* fix: drop support for python 3.6 * workaround setuptools editable install issue
1 parent 9c408be commit f9745b8

12 files changed

Lines changed: 56 additions & 134 deletions

File tree

.appveyor.yml

Lines changed: 0 additions & 78 deletions
This file was deleted.

.github/workflows/presubmit.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,15 @@ jobs:
1414
- name: Set up Python
1515
uses: actions/setup-python@v4
1616
with:
17-
python-version: "3.6"
17+
python-version: "3.9"
1818
- name: Install nox
1919
run: |
2020
python -m ensurepip
2121
python -m pip install nox
2222
- name: Run mypy
23+
env:
24+
# workaround for https://github.com/pypa/setuptools/issues/3557
25+
SETUPTOOLS_ENABLE_FEATURES: legacy-editable
2326
run: |
2427
nox -s mypy
2528

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ C toolchain.
99

1010
# Currently Published Wheels
1111

12-
Wheels are currently published for Python 3.6, 3.7, 3.8, 3.9, 3.10, and
12+
Wheels are currently published for Python 3.7, 3.8, 3.9, 3.10, 3.11 and
1313
pypy-3.7 for multiple architectures. For information on building your own,
1414
please view [BUILDING.md](BUILDING.md).
1515

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.6
2+
python_version = 3.9
33
exclude = tests/unit/resources/

noxfile.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
HERE = os.path.dirname(__file__)
2626

27-
@nox.session(python=["3.6", "3.7", "3.8", "3.9", "3.10", "3.11"])
27+
@nox.session(python=["3.7", "3.8", "3.9", "3.10", "3.11"])
2828
def build_libcrc32c(session):
2929
session.env["PY_BIN"] = f"python{session.python}"
3030
session.env["REPO_ROOT"] = HERE
@@ -39,7 +39,7 @@ def build_libcrc32c(session):
3939
raise Exception("Unsupported")
4040

4141

42-
@nox.session(python=["3.6", "3.7", "3.8", "3.9", "3.10", "3.11"])
42+
@nox.session(python=["3.7", "3.8", "3.9", "3.10", "3.11"])
4343
def check(session):
4444
session.install("pytest")
4545
session.install("--no-index", f"--find-links={HERE}/wheels", "google-crc32c")
@@ -49,7 +49,7 @@ def check(session):
4949
session.run("python", f"{HERE}/scripts/check_crc32c_extension.py", *session.posargs)
5050

5151

52-
@nox.session(python="3.6")
52+
@nox.session(python="3.9")
5353
def mypy(session):
5454
"""Verify type hints are mypy compatible."""
5555
session.install("-e", ".")

scripts/manylinux/build.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ git submodule update --init --recursive
2727

2828
# Note: PyPA's support for the 'manylinux1' image ends on 2022-01-01.
2929
# See: https://github.com/pypa/manylinux/issues/994
30-
# No 3.10 support for 'manylinux1'.
31-
if [[ "${BUILD_PYTHON}" != "3.10"* ]]; then
30+
# No 3.1* support for 'manylinux1'.
31+
if [[ "${BUILD_PYTHON}" != "3.1"* ]]; then
3232
docker pull quay.io/pypa/manylinux1_x86_64
3333
docker run \
3434
--rm \

scripts/manylinux/build_on_centos.sh

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,7 @@ if [[ -z ${BUILD_PYTHON} ]]; then
4545
# Collect all target Python versions.
4646
for PYTHON_BIN in /opt/python/*/bin; do
4747
# H/T: https://stackoverflow.com/a/229606/1068170
48-
if [[ "${PYTHON_BIN}" == *"36"* ]]; then
49-
PYTHON_VERSIONS="${PYTHON_VERSIONS} ${PYTHON_BIN}"
50-
continue
51-
elif [[ "${PYTHON_BIN}" == *"37"* ]]; then
48+
if [[ "${PYTHON_BIN}" == *"37"* ]]; then
5249
PYTHON_VERSIONS="${PYTHON_VERSIONS} ${PYTHON_BIN}"
5350
continue
5451
elif [[ "${PYTHON_BIN}" == *"38"* ]]; then

scripts/manylinux/check.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ echo "CHECKING ON LINUX"
2121
VERSION=$(awk "/version \= ([0-9.]+)/" setup.cfg)
2222
PACKAGE_VERSION=${VERSION:10}
2323
WHEEL_FILE="wheels/google_crc32c-${PACKAGE_VERSION}-cp36-cp36m-manylinux1_x86_64.whl"
24-
PYTHON=python3.6
24+
PYTHON=python3.7
2525

26-
# Using pyenv, set 3.6.1 as a local python version.
26+
# Using pyenv, set 3.7.13 as a local python version.
2727
# pyenv versions
28-
pyenv local 3.6.1
28+
pyenv local 3.7.13
2929

3030
# Make sure we can create a virtual environment.
3131
${PYTHON} -m pip install --upgrade setuptools pip wheel

scripts/osx/build.sh

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,11 @@ SCRIPTS_DIR=$(dirname ${OSX_DIR})
2424
export REPO_ROOT=$(dirname ${SCRIPTS_DIR})
2525

2626
# NOTE: These are the Python.org versions of Python.
27-
PYTHON36="/Library/Frameworks/Python.framework/Versions/3.6/bin"
2827
PYTHON37="/Library/Frameworks/Python.framework/Versions/3.7/bin"
2928
PYTHON38="/Library/Frameworks/Python.framework/Versions/3.8/bin"
3029
PYTHON39="/Library/Frameworks/Python.framework/Versions/3.9/bin"
30+
PYTHON310="/Library/Frameworks/Python.framework/Versions/3.10/bin"
31+
PYTHON311="/Library/Frameworks/Python.framework/Versions/3.11/bin"
3132

3233
# Build and install `libcrc32c`
3334
export PY_BIN="${PY_BIN:-python3}"
@@ -38,11 +39,6 @@ git submodule update --init --recursive
3839

3940
${OSX_DIR}/build_c_lib.sh
4041

41-
# Build wheel for Python 3.6.
42-
export PY_BIN="python3.6"
43-
export PY_TAG="cp36-cp36m"
44-
${OSX_DIR}/build_python_wheel.sh
45-
4642
# Build wheel for Python 3.7.
4743
export PY_BIN="python3.7"
4844
export PY_TAG="cp37-cp37m"
@@ -54,12 +50,20 @@ export PY_BIN="python3.8"
5450
export PY_TAG="cp38-cp38"
5551
${OSX_DIR}/build_python_wheel.sh
5652

57-
# TODO: As of 2020-12-11, 3.9 is not available on our CI
5853
# Build wheel for Python 3.9.
59-
#export PY_BIN="python3.9"
60-
#export PY_TAG="cp39-cp39"
61-
#${OSX_DIR}/build_python_wheel.sh
54+
export PY_BIN="python3.9"
55+
export PY_TAG="cp39-cp39"
56+
${OSX_DIR}/build_python_wheel.sh
6257

58+
# Build wheel for Python 3.10.
59+
export PY_BIN="python3.10"
60+
export PY_TAG="cp310-cp310"
61+
${OSX_DIR}/build_python_wheel.sh
62+
63+
# Build wheel for Python 3.11.
64+
export PY_BIN="python3.11"
65+
export PY_TAG="cp311-cp311"
66+
${OSX_DIR}/build_python_wheel.sh
6367

6468
# Clean up.
6569
rm -fr ${CRC32C_INSTALL_PREFIX}

scripts/osx/check.sh

Lines changed: 26 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,11 @@ export REPO_ROOT=$(dirname ${SCRIPTS_DIR})
2828
ls ${REPO_ROOT}/wheels
2929

3030
# NOTE: These are the Python.org versions of Python.
31-
PYTHON36="/Library/Frameworks/Python.framework/Versions/3.6/bin"
3231
PYTHON37="/Library/Frameworks/Python.framework/Versions/3.7/bin"
3332
PYTHON38="/Library/Frameworks/Python.framework/Versions/3.8/bin"
34-
35-
# PYTHON37="/users/crwilcox/.pyenv/versions/3.7.2/bin"
36-
# PYTHON36="/users/crwilcox/.pyenv/versions/3.6.6/bin"
37-
# PYTHON35="/users/crwilcox/.pyenv/versions/3.5.6/bin"
33+
PYTHON39="/Library/Frameworks/Python.framework/Versions/3.9/bin"
34+
PYTHON310="/Library/Frameworks/Python.framework/Versions/3.10/bin"
35+
PYTHON311="/Library/Frameworks/Python.framework/Versions/3.11/bin"
3836

3937
# Make sure we have an updated `pip`.
4038
curl https://bootstrap.pypa.io/get-pip.py | ${PYTHON37}/python3
@@ -44,17 +42,6 @@ ${PYTHON37}/python3 -m pip install --upgrade delocate
4442
LISTDEPS_CMD="${PYTHON37}/delocate-listdeps --all --depending"
4543
VIRTUALENV_CMD="${PYTHON37}/python3 -m venv"
4644

47-
48-
${PYTHON36}/python3 -m venv venv36
49-
curl https://bootstrap.pypa.io/get-pip.py | venv36/bin/python3
50-
WHL=${REPO_ROOT}/wheels/google_crc32c-${PACKAGE_VERSION}-cp36-cp36m-macosx_10_9_x86_64.whl
51-
venv36/bin/pip install ${WHL}
52-
venv36/bin/python ${REPO_ROOT}/scripts/check_crc32c_extension.py
53-
venv36/bin/pip install pytest
54-
venv36/bin/py.test ${REPO_ROOT}/tests
55-
${LISTDEPS_CMD} ${WHL}
56-
rm -fr venv36
57-
5845
${PYTHON37}/python3 -m venv venv37
5946
curl https://bootstrap.pypa.io/get-pip.py | venv37/bin/python3
6047
WHL=${REPO_ROOT}/wheels/google_crc32c-${PACKAGE_VERSION}-cp37-cp37m-macosx_10_9_x86_64.whl
@@ -75,11 +62,26 @@ venv38/bin/python ${REPO_ROOT}/scripts/check_crc32c_extension.py
7562
${LISTDEPS_CMD} ${WHL}
7663
rm -fr venv38
7764

78-
# TODO: As of 2020-12-11, 3.9 is not available on our CI
79-
# ${PYTHON39}/python3 -m venv venv39
80-
# curl https://bootstrap.pypa.io/get-pip.py | venv39/bin/python3
81-
# WHL=${REPO_ROOT}/wheels/google_crc32c-${PACKAGE_VERSION}-cp39-cp39-macosx_10_9_x86_64.whl
82-
# venv37/bin/pip install ${WHL}
83-
# venv37/bin/python ${REPO_ROOT}/scripts/check_crc32c_extension.py
84-
# ${LISTDEPS_CMD} ${WHL}
85-
# rm -fr venv39
65+
${PYTHON39}/python3 -m venv venv39
66+
curl https://bootstrap.pypa.io/get-pip.py | venv39/bin/python3
67+
WHL=${REPO_ROOT}/wheels/google_crc32c-${PACKAGE_VERSION}-cp39-cp39-macosx_10_9_x86_64.whl
68+
venv39/bin/pip install ${WHL}
69+
venv39/bin/python ${REPO_ROOT}/scripts/check_crc32c_extension.py
70+
${LISTDEPS_CMD} ${WHL}
71+
rm -fr venv39
72+
73+
${PYTHON310}/python3 -m venv venv310
74+
curl https://bootstrap.pypa.io/get-pip.py | venv310/bin/python3
75+
WHL=${REPO_ROOT}/wheels/google_crc32c-${PACKAGE_VERSION}-cp310-cp310-macosx_10_9_x86_64.whl
76+
venv310/bin/pip install ${WHL}
77+
venv310/bin/python ${REPO_ROOT}/scripts/check_crc32c_extension.py
78+
${LISTDEPS_CMD} ${WHL}
79+
rm -fr venv310
80+
81+
${PYTHON311}/python3 -m venv venv311
82+
curl https://bootstrap.pypa.io/get-pip.py | venv311/bin/python3
83+
WHL=${REPO_ROOT}/wheels/google_crc32c-${PACKAGE_VERSION}-cp311-cp311-macosx_10_9_x86_64.whl
84+
venv311/bin/pip install ${WHL}
85+
venv311/bin/python ${REPO_ROOT}/scripts/check_crc32c_extension.py
86+
${LISTDEPS_CMD} ${WHL}
87+
rm -fr venv311

0 commit comments

Comments
 (0)