Drop support for Python 2.7, 3.5-3.9

Change-Id: Ibdcdb2fa2cc228aae77ee53d27639218d497203e
This commit is contained in:
Tim Burke
2025-04-08 08:17:03 -07:00
parent da4e08ef43
commit e44bb1365c
10 changed files with 27 additions and 64 deletions

View File

@@ -1,6 +1,6 @@
- project: - project:
templates: templates:
- openstack-python-jobs - openstack-python3-jobs
- libec-pyeclib-jobs-arm64 - libec-pyeclib-jobs-arm64
- build-openstack-docs-pti - build-openstack-docs-pti
check: check:
@@ -14,21 +14,11 @@
pre-run: tools/playbooks/release-wheel/download-artifacts.yaml pre-run: tools/playbooks/release-wheel/download-artifacts.yaml
vars: vars:
build_wheel: false build_wheel: false
- openstack-tox-py35: &py35_overrides
ansible-version: 8
vars:
tox_envlist: py35-compilelibs
tox_environment:
LIBERASURECODE_REF: '1.4.0'
- openstack-tox-py36
- openstack-tox-py37
- openstack-tox-py38
- openstack-tox-py39
- openstack-tox-py310 - openstack-tox-py310
- openstack-tox-py311 - openstack-tox-py311
- openstack-tox-py312 - openstack-tox-py312
- openstack-tox-py313 - openstack-tox-py313
- pyeclib-tox-py39-centos-9-stream - pyeclib-tox-py311-centos-9-stream
- libec-pyeclib-unit - libec-pyeclib-unit
- libec-pyeclib-unit-centos-9-stream - libec-pyeclib-unit-centos-9-stream
gate: gate:
@@ -36,16 +26,11 @@
- pyeclib-build-wheels - pyeclib-build-wheels
- pyeclib-build-wheels-arm64 - pyeclib-build-wheels-arm64
- test-release-openstack: *release_overrides - test-release-openstack: *release_overrides
- openstack-tox-py35: *py35_overrides
- openstack-tox-py36
- openstack-tox-py37
- openstack-tox-py38
- openstack-tox-py39
- openstack-tox-py310 - openstack-tox-py310
- openstack-tox-py311 - openstack-tox-py311
- openstack-tox-py312 - openstack-tox-py312
- openstack-tox-py313 - openstack-tox-py313
- pyeclib-tox-py39-centos-9-stream - pyeclib-tox-py311-centos-9-stream
- libec-pyeclib-unit - libec-pyeclib-unit
- libec-pyeclib-unit-centos-9-stream - libec-pyeclib-unit-centos-9-stream
post: post:
@@ -65,19 +50,22 @@
- release-openstack-python: *release_overrides - release-openstack-python: *release_overrides
- job: - job:
name: pyeclib-tox-py39-centos-9-stream name: pyeclib-tox-py311-centos-9-stream
parent: openstack-tox-py39 parent: openstack-tox-py311
description: | description: |
Run unit tests using ``py39`` environment on CentOS 9. Run unit tests using ``py311`` environment on CentOS 9.
nodeset: centos-9-stream nodeset: centos-9-stream
vars:
python_use_pyenv: true
- job: - job:
name: libec-pyeclib-unit-centos-9-stream name: libec-pyeclib-unit-centos-9-stream
parent: openstack-tox-py39 parent: openstack-tox-py311
timeout: 1800 timeout: 1800
nodeset: centos-9-stream nodeset: centos-9-stream
vars: vars:
tox_envlist: py39-compilelibs python_use_pyenv: true
tox_envlist: py311-compilelibs
- job: - job:
name: libec-pyeclib-unit name: libec-pyeclib-unit

View File

@@ -1,16 +1,14 @@
# manylinux2010 has oldest build chain that can still build modern ISA-L # manylinux2010 has oldest build chain that can still build modern ISA-L
# 2021-02-06-3d322a5 is newest tag that still had 2.7 support
# aarch64 images never had 2.7, but 2021-05-01-a10bece is the newest that still had 3.5
ARG TARGET="x86_64" ARG TARGET="x86_64"
FROM quay.io/pypa/manylinux2010_x86_64:2021-02-06-3d322a5 AS x86_64 FROM quay.io/pypa/manylinux2010_x86_64:latest AS x86_64
FROM quay.io/pypa/manylinux2014_aarch64:2021-05-01-a10bece AS aarch64 FROM quay.io/pypa/manylinux2014_aarch64:latest AS aarch64
FROM quay.io/pypa/musllinux_1_1_x86_64:2021-09-18-f12faf3 AS musl_x86_64 FROM quay.io/pypa/musllinux_1_1_x86_64:latest AS musl_x86_64
FROM quay.io/pypa/musllinux_1_1_aarch64:2021-09-18-f12faf3 AS musl_aarch64 FROM quay.io/pypa/musllinux_1_1_aarch64:latest AS musl_aarch64
FROM ${TARGET} FROM ${TARGET}
MAINTAINER OpenStack Swift LABEL org.opencontainers.image.authors="OpenStack Swift"
# can also take branch names, e.g. "master" # can also take branch names, e.g. "master"
ARG LIBERASURECODE_TAG=1.6.4 ARG LIBERASURECODE_TAG=1.6.4
@@ -19,8 +17,7 @@ ARG ISAL_TAG=v2.31.0
ARG SO_SUFFIX=-pyeclib ARG SO_SUFFIX=-pyeclib
ENV SO_SUFFIX=${SO_SUFFIX} ENV SO_SUFFIX=${SO_SUFFIX}
ENV UID=1000 ENV UID=1000
# Alternatively, try cp27-cp27m, cp27-cp27mu ENV PYTHON_VERSION=cp310-cp310
ENV PYTHON_VERSION=cp35-cp35m
RUN mkdir /opt/src /output RUN mkdir /opt/src /output
@@ -33,9 +30,6 @@ RUN if [ -e /etc/yum.repos.d ]; then \
fi fi
RUN if [ -n "$(type -p yum)" ]; then yum install -y zlib-devel ; fi RUN if [ -n "$(type -p yum)" ]; then yum install -y zlib-devel ; fi
# Update auditwheel so it can improve our tag to manylinux1 automatically
# Not *too far*, though, since we've got the old base image
RUN /opt/_internal/tools/bin/pip install -U 'auditwheel<5.2'
ADD https://github.com/netwide-assembler/nasm/archive/refs/tags/nasm-2.15.05.tar.gz /opt/src/nasm.tar.gz ADD https://github.com/netwide-assembler/nasm/archive/refs/tags/nasm-2.15.05.tar.gz /opt/src/nasm.tar.gz
RUN tar -C /opt/src -xz -f /opt/src/nasm.tar.gz RUN tar -C /opt/src -xz -f /opt/src/nasm.tar.gz
@@ -62,4 +56,4 @@ RUN cd /opt/src/liberasurecode*/ && \
make install make install
COPY . /opt/src/pyeclib/ COPY . /opt/src/pyeclib/
ENTRYPOINT ["/bin/sh", "-c", "/opt/python/${PYTHON_VERSION}/bin/python /opt/src/pyeclib/pack_wheel.py /opt/src/pyeclib/ --repair --so-suffix=${SO_SUFFIX} --wheel-dir=/output"] ENTRYPOINT ["/bin/sh", "-c", "/opt/python/${PYTHON_VERSION}/bin/python3 /opt/src/pyeclib/pack_wheel.py /opt/src/pyeclib/ --repair --so-suffix=${SO_SUFFIX} --wheel-dir=/output"]

View File

@@ -2,7 +2,7 @@ PyEClib
------- -------
This library provides a simple Python interface for implementing erasure codes This library provides a simple Python interface for implementing erasure codes
and is known to work with Python 2.7 and 3.5 through 3.13. To obtain the best and is known to work with Python 3.10 through 3.13. To obtain the best
possible performance, the library utilizes liberasurecode, which is a C based possible performance, the library utilizes liberasurecode, which is a C based
erasure code library. erasure code library.
@@ -23,7 +23,7 @@ Installation
Install pre-requisites: Install pre-requisites:
* Python 2.7 or 3.5+ (including development packages), argparse, setuptools * Python 3.10+ (including development packages), argparse, setuptools
* liberasurecode v1.4.0 or greater [3] * liberasurecode v1.4.0 or greater [3]
* Erasure code backend libraries, gf-complete and Jerasure [1],[2], ISA-L [4], etc * Erasure code backend libraries, gf-complete and Jerasure [1],[2], ISA-L [4], etc

View File

@@ -10,9 +10,7 @@ libtool
liberasurecode-dev [platform:dpkg] liberasurecode-dev [platform:dpkg]
# There's no library in CentOS 7 but Fedora and openSUSE have it. # There's no library in CentOS 7 but Fedora and openSUSE have it.
liberasurecode-devel [platform:rpm !platform:centos] liberasurecode-devel [platform:rpm !platform:centos]
python-dev [(platform:dpkg py27)] python3-dev [platform:dpkg]
python3-dev [(platform:dpkg !py27)] python3-devel [platform:rpm]
python-devel [(platform:rpm py27)]
python3-devel [(platform:rpm !py27)]
zlib-devel [platform:rpm] zlib-devel [platform:rpm]
zlib1g-dev [platform:dpkg] zlib1g-dev [platform:dpkg]

View File

@@ -103,7 +103,7 @@ def build_wheel(src_dir):
try: try:
subprocess.check_call([ subprocess.check_call([
sys.executable, 'setup.py', sys.executable, 'setup.py',
'bdist_wheel', '-d', tmp, '--py-limited-api=cp35', 'bdist_wheel', '-d', tmp, '--py-limited-api=cp310',
], cwd=src_dir) ], cwd=src_dir)
files = os.listdir(tmp) files = os.listdir(tmp)
assert len(files) == 1, files assert len(files) == 1, files

View File

@@ -243,14 +243,7 @@ setup(name='pyeclib',
'written in C.'), 'written in C.'),
classifiers=[ classifiers=[
"Development Status :: 5 - Production/Stable", "Development Status :: 5 - Production/Stable",
"Programming Language :: Python :: 2", "Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.12",
@@ -264,6 +257,7 @@ setup(name='pyeclib',
license='BSD', license='BSD',
ext_modules=[module], ext_modules=[module],
packages=['pyeclib'], packages=['pyeclib'],
python_requires='>=3.10',
package_dir={'pyeclib': 'pyeclib'}, package_dir={'pyeclib': 'pyeclib'},
cmdclass={'build': build, 'install': install, 'clean': clean}, cmdclass={'build': build, 'install': install, 'clean': clean},
py_modules=['pyeclib.ec_iface', 'pyeclib.core'], py_modules=['pyeclib.ec_iface', 'pyeclib.core'],

View File

@@ -3,6 +3,5 @@
# process, which may cause wedges in the gate later. # process, which may cause wedges in the gate later.
coverage coverage
attrs<22; python_version<"3.5"
pytest pytest
six>=1.9.0 six>=1.9.0

View File

@@ -1,3 +1,3 @@
tag: pyeclib-build-wheel-latest tag: pyeclib-build-wheel-latest
wheel_python_version: cp35-cp35m wheel_python_version: cp310-cp310
musl: False musl: False

View File

@@ -3,16 +3,6 @@
- build-pyeclib-images - build-pyeclib-images
- role: build-pyeclib-wheel - role: build-pyeclib-wheel
wheel_python_version: cp27-cp27m
when: wheel_target != "aarch64"
- role: build-pyeclib-wheel - role: build-pyeclib-wheel
wheel_python_version: cp27-cp27mu
when: wheel_target != "aarch64"
- role: build-pyeclib-wheel
wheel_python_version: cp35-cp35m
- role: build-pyeclib-wheel
wheel_python_version: cp36-cp36m
musl: True musl: True

View File

@@ -1,5 +1,5 @@
[tox] [tox]
envlist = py{27,35,36,37,38,39,310}-compilelibs,pep8,docs envlist = py3{10,11,12}-compilelibs,pep8,docs
[testenv] [testenv]
deps = deps =