Skip to content

Commit

Permalink
Merge pull request #1032 from getsentry/remove-py310
Browse files Browse the repository at this point in the history
only support python3.11+
  • Loading branch information
asottile-sentry authored Oct 16, 2024
2 parents efa521f + 17b8f1b commit 5ebf2b2
Show file tree
Hide file tree
Showing 11 changed files with 17 additions and 91 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10'
python-version: '3.11'
- run: pip install -r docker/requirements.txt
- uses: actions/download-artifact@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10'
python-version: '3.11'
- uses: pre-commit/action@v3.0.0
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10'
python-version: '3.11'
- run: pip install tox
- run: tox -e py
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ repos:
rev: v3.12.0
hooks:
- id: reorder-python-imports
args: [--py310-plus, --add-import, 'from __future__ import annotations']
args: [--py311-plus, --add-import, 'from __future__ import annotations']
- repo: https://github.com/psf/black
rev: 24.1.1
hooks:
Expand All @@ -20,7 +20,7 @@ repos:
rev: v3.15.0
hooks:
- id: pyupgrade
args: [--py310-plus]
args: [--py311-plus]
- repo: https://github.com/PyCQA/flake8
rev: 7.0.0
hooks:
Expand Down
2 changes: 1 addition & 1 deletion build.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
from packaging.utils import parse_wheel_filename
from packaging.version import Version

PYTHONS = ((3, 10), (3, 11), (3, 12))
PYTHONS = ((3, 11), (3, 12))

BINARY_EXTS = frozenset(
(".c", ".cc", ".cpp", ".cxx", ".pxd", ".pxi", ".pyx", ".go", ".rs")
Expand Down
4 changes: 2 additions & 2 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.10.12-slim-buster
FROM python:3.11.4-slim-buster
RUN : \
&& apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install \
Expand Down Expand Up @@ -56,7 +56,7 @@ RUN /tmp/install-pythons

COPY requirements.txt /tmp/requirements.txt
RUN : \
&& /opt/python/cp310-cp310/bin/python3.10 -m venv /venv \
&& /opt/python/cp311-cp311/bin/python3.11 -m venv /venv \
&& /venv/bin/pip install --no-cache-dir -r /tmp/requirements.txt

ENTRYPOINT ["dumb-init", "--"]
8 changes: 2 additions & 6 deletions docker/install-pythons
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3.10
#!/usr/bin/env python3.11
from __future__ import annotations

import argparse
Expand All @@ -16,10 +16,6 @@ RELEASE = (
)
# curl --silent --location https://github.com/indygreg/python-build-standalone/releases/download/20240107/SHA256SUMS | grep -E '(aarch64-apple-darwin-pgo\+lto-full|x86_64-apple-darwin-pgo\+lto-full|aarch64-unknown-linux-gnu-lto-full|x86_64-unknown-linux-gnu-pgo\+lto-full)' | grep -v 'cpython-3\.[89]'
CHECKSUMS = """\
d1a777a0688bafd2a62050c680508769d9b6c14779f64fee591f4e135c11e711 cpython-3.10.13+20240107-aarch64-apple-darwin-pgo+lto-full.tar.zst
4e9fcb141a0c9af986f0819ab7a64c62ceb7b68f33df75753e669fc3d23a3412 cpython-3.10.13+20240107-aarch64-unknown-linux-gnu-lto-full.tar.zst
b61f6f9cf0c35fd6df90b424e757a3bc1b483e8f8d8fadfa6c1ddd1a0c39c003 cpython-3.10.13+20240107-x86_64-apple-darwin-pgo+lto-full.tar.zst
60e7ca89d37dd8a630a5525bda6143a66a3949c4f03c8319295ddb1d1023b425 cpython-3.10.13+20240107-x86_64-unknown-linux-gnu-pgo+lto-full.tar.zst
c1f3dd13825906a5eae23ed8de9b653edb620568b2e0226eef3784eb1cce7eed cpython-3.11.7+20240107-aarch64-apple-darwin-pgo+lto-full.tar.zst
e066d3fb69162e401d2bb1f3c20798fde7c2fffcba0912d792e46d569b591ab3 cpython-3.11.7+20240107-aarch64-unknown-linux-gnu-lto-full.tar.zst
3f8caf73f2bfe22efa9666974c119727e163716e88af8ed3caa1e0ae5493de61 cpython-3.11.7+20240107-x86_64-apple-darwin-pgo+lto-full.tar.zst
Expand All @@ -29,7 +25,7 @@ b7e19b262c19dfb82107e092ba3959b2da9b8bc53aafeb86727996afdb577221 cpython-3.11.7
bf2b176b0426d7b4d4909c1b19bbb25b4893f9ebdc61e32df144df2b10dcc800 cpython-3.12.1+20240107-x86_64-apple-darwin-pgo+lto-full.tar.zst
f267489a041daf4e523c03d32639de04ee59ca925dff49a8c3ce2f28a9f70a3b cpython-3.12.1+20240107-x86_64-unknown-linux-gnu-pgo+lto-full.tar.zst
"""
VERSIONS = ("3.10.13", "3.11.7", "3.12.1")
VERSIONS = ("3.11.7", "3.12.1")
ARCH_MAP = {"arm64": "aarch64"}
ARCH = ARCH_MAP.get(platform.machine(), platform.machine())

Expand Down
2 changes: 1 addition & 1 deletion docker/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# This file is autogenerated by pip-compile with Python 3.10
# This file is autogenerated by pip-compile with Python 3.11
# by the following command:
#
# pip-compile --allow-unsafe --no-annotate
Expand Down
70 changes: 0 additions & 70 deletions packages.ini
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
[aiohappyeyeballs==2.4.3]

[aiohttp==3.8.1]
python_versions = <3.11
[aiohttp==3.8.3]
python_versions = <3.12
[aiohttp==3.8.4]
Expand Down Expand Up @@ -58,9 +56,6 @@ python_versions = <3.12

[babel==2.10.3]

[backports-zoneinfo==0.2.1]
python_versions = <3.9

[bcrypt==4.0.0]
[bcrypt==4.1.3]
[bcrypt==4.2.0]
Expand Down Expand Up @@ -200,20 +195,11 @@ brew_requires = libffi
[click-repl==0.2.0]
[click-repl==0.3.0]

[clickhouse-driver==0.2.4]
python_versions = <3.11
[clickhouse-driver==0.2.6]

[colorama==0.4.5]
[colorama==0.4.6]

[confluent-kafka==1.9.2]
apt_requires =
patch
wget
brew_requires = wget
custom_prebuild = prebuild/librdkafka v1.9.2
python_versions = <3.11
[confluent-kafka==2.1.1]
apt_requires =
patch
Expand Down Expand Up @@ -471,10 +457,6 @@ validate_incorrect_missing_deps = six
[freezegun==1.2.1]
[freezegun==1.2.2]

[frozenlist==1.3.1]
python_versions = <3.11
[frozenlist==1.3.3]
python_versions = <3.11
[frozenlist==1.4.1]

[gitdb==4.0.5]
Expand Down Expand Up @@ -570,11 +552,6 @@ brew_requires = go
[google-cloud-storage==2.14.0]
[google-cloud-storage==2.18.0]

[google-crc32c==1.3.0]
apt_requires = cmake
brew_requires = cmake
custom_prebuild = prebuild/crc32c 1.1.2
python_versions = <3.11
[google-crc32c==1.5.0]
apt_requires = cmake
brew_requires = cmake
Expand Down Expand Up @@ -610,14 +587,6 @@ python_versions = <3.12

[grpc-stubs==1.53.0.5]

[grpcio==1.46.3]
python_versions = <3.11
[grpcio==1.47.0]
python_versions = <3.11
[grpcio==1.48.1]
python_versions = <3.11
[grpcio==1.51.1]
python_versions = <3.11
[grpcio==1.56.0]
python_versions = <3.12
[grpcio==1.59.0]
Expand Down Expand Up @@ -784,21 +753,8 @@ python_versions = <3.12
[lazy-object-proxy==1.9.0]
[lazy-object-proxy==1.10.0]

[libcst==0.4.3]
python_versions = <3.11
[libcst==0.4.7]
python_versions = <3.11

[looseversion==1.0.2]

[lxml==4.6.5]
apt_requires =
libxml2-dev
libxslt1-dev
brew_requires =
libxml2
libxslt
python_versions = <3.11
[lxml==4.9.1]
apt_requires =
libxml2-dev
Expand Down Expand Up @@ -876,8 +832,6 @@ brew_requires = libmaxminddb
[more-itertools==10.0.0]
[more-itertools==10.1.0]

[msgpack==1.0.2]
python_versions = <3.11
[msgpack==1.0.4]
python_versions = <3.12
[msgpack==1.0.7]
Expand Down Expand Up @@ -1110,12 +1064,6 @@ python_versions = <3.12
[psutil==5.9.2]
[psutil==5.9.7]

[psycopg2-binary==2.8.6]
apt_requires = libpq-dev
brew_requires =
openssl@1.1
postgresql
python_versions = <3.11
[psycopg2-binary==2.9.3]
apt_requires = libpq-dev
brew_requires =
Expand Down Expand Up @@ -1329,9 +1277,6 @@ brew_requires = libmemcached
[pyupgrade==3.15.0]
[pyupgrade==3.17.0]

[pyuwsgi==2.0.20]
python_versions = <3.11
validate_skip_imports = uwsgidecorators
[pyuwsgi==2.0.23]
validate_skip_imports = uwsgidecorators
[pyuwsgi==2.0.23.post0]
Expand Down Expand Up @@ -1390,10 +1335,6 @@ python_versions = <3.12
[regex==2022.9.13]
[regex==2023.12.25]

[reportlab==3.6.1]
python_versions = <3.11
[reportlab==3.6.11]
python_versions = <3.11
[reportlab==3.6.13]
python_versions = <3.12
[reportlab==4.0.7]
Expand Down Expand Up @@ -2194,9 +2135,6 @@ python_versions = <3.12
[time-machine==2.12.0]
[time-machine==2.13.0]

[timelib==0.2.5]
python_versions = <3.11

[tldextract==5.1.2]

[tokenize-rt==4.2.1]
Expand Down Expand Up @@ -2466,14 +2404,6 @@ python_versions = <3.12
[wsproto==1.1.0]
[wsproto==1.2.0]

[xmlsec==1.3.12]
apt_requires =
libxmlsec1-dev
pkg-config
brew_requires =
libxmlsec1
pkg-config
python_versions = <3.11
[xmlsec==1.3.13]
apt_requires =
libxmlsec1-dev
Expand Down
10 changes: 5 additions & 5 deletions tests/validate_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,24 +43,24 @@ def test_pythons_to_check_no_pythons_raises_error():

def test_pythons_to_check_py2_ignored():
ret = validate._pythons_to_check(parse_tag("py2.py3-none-any"))
assert ret == ("python3.10", "python3.11", "python3.12")
assert ret == ("python3.11", "python3.12")


def test_pythons_to_check_py3_gives_all():
ret = validate._pythons_to_check(parse_tag("py3-none-any"))
assert ret == ("python3.10", "python3.11", "python3.12")
assert ret == ("python3.11", "python3.12")


def test_pythons_to_check_abi3():
tag = "cp37-abi3-manylinux1_x86_64"
ret = validate._pythons_to_check(parse_tag(tag))
assert ret == ("python3.10", "python3.11", "python3.12")
assert ret == ("python3.11", "python3.12")


def test_pythons_to_check_minimum_abi3():
tag = "cp311-abi3-manylinux1_x86_64"
tag = "cp312-abi3-manylinux1_x86_64"
ret = validate._pythons_to_check(parse_tag(tag))
assert ret == ("python3.11", "python3.12")
assert ret == ("python3.12",)


def test_pythons_to_check_specific_cpython_tag():
Expand Down
2 changes: 1 addition & 1 deletion validate.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
from packaging.utils import parse_wheel_filename
from packaging.version import Version

PYTHONS = ((3, 10), (3, 11), (3, 12))
PYTHONS = ((3, 11), (3, 12))
DIST_INFO_RE = re.compile(r"^[^/]+.dist-info/[^/]+$")


Expand Down

0 comments on commit 5ebf2b2

Please sign in to comment.