From 0c5c7c2c054f2bb9863f790d6bcaa97bb4ee7f79 Mon Sep 17 00:00:00 2001 From: Jason Madden Date: Tue, 11 Jun 2024 09:08:17 -0500 Subject: [PATCH 1/9] Initial pass adding 3.13 --- .github/workflows/tests.yml | 16 ++++++++-------- CHANGES.rst | 4 ++-- pyproject.toml | 2 +- scripts/releases/make-manylinux | 4 ++-- setup.py | 6 ++++-- tox.ini | 2 +- 6 files changed, 18 insertions(+), 16 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 320caa8..42f4216 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -81,17 +81,17 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - python-version: [pypy-3.9, 3.7, 3.8, 3.9, '3.10', '3.11', "3.12-dev"] + python-version: [pypy-3.10, 3.7, 3.8, 3.9, '3.10', '3.11', "3.12", "3.13"] os: [ubuntu-latest, macos-latest] exclude: - os: macos-latest - python-version: pypy-3.9 + python-version: pypy-3.10 steps: - name: checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} cache: 'pip' @@ -135,7 +135,7 @@ jobs: twine check dist/* - name: Upload perfmetrics wheel - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: perfmetrics-${{ runner.os }}-${{ matrix.python-version }}.whl path: dist/*whl @@ -169,7 +169,7 @@ jobs: # We use a regular Python matrix entry to share as much code as possible. strategy: matrix: - python-version: [3.9] + python-version: [3.11] image: - manylinux2010_x86_64 - manylinux2014_aarch64 @@ -181,9 +181,9 @@ jobs: name: ${{ matrix.image }} steps: - name: checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Set up QEMU diff --git a/CHANGES.rst b/CHANGES.rst index a9b303f..854852f 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -2,10 +2,10 @@ CHANGES ========= -4.0.1 (unreleased) +4.1.0 (unreleased) ================== -- Nothing changed yet. +- Add support for Python 3.13. 4.0.0 (2023-06-22) diff --git a/pyproject.toml b/pyproject.toml index 7c7b2c5..8835d22 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -19,5 +19,5 @@ requires = [ # failing in Python 2 (https://travis-ci.org/github/gevent/gevent/jobs/683782800); # This was fixed in 3.0a5 (https://github.com/cython/cython/issues/3578) # 3.0a6 fixes an issue cythonizing source on 32-bit platforms - "Cython >= 3.0b3; platform_python_implementation == 'CPython'", + "Cython >= 3.0.10; platform_python_implementation == 'CPython'", ] diff --git a/scripts/releases/make-manylinux b/scripts/releases/make-manylinux index 2c57643..4258dc4 100755 --- a/scripts/releases/make-manylinux +++ b/scripts/releases/make-manylinux @@ -20,14 +20,14 @@ if [ -d /io -a -d /opt/python ]; then cd /io rm -rf wheelhouse mkdir wheelhouse - for variant in `ls -d /opt/python/cp{37,38,39,310,311,312}*`; do + for variant in `ls -d /opt/python/cp{37,38,39,310,311,312,313}*`; do echo "Building $variant" mkdir /tmp/build cd /tmp/build git clone /io io cd io $variant/bin/pip install -U pip - $variant/bin/pip install -U 'cython>=3.0b3' setuptools + $variant/bin/pip install -U 'cython>=3.0.10' setuptools PATH=$variant/bin:$PATH $variant/bin/python setup.py bdist_wheel auditwheel show dist/*.whl auditwheel repair dist/*.whl diff --git a/setup.py b/setup.py index a85b245..8c29096 100644 --- a/setup.py +++ b/setup.py @@ -20,7 +20,8 @@ def read(fname, here=os.path.dirname(__file__)): # nti.testing > ZODB > persistent -> cffi # But cffi won't build on apple silicon on 3.12. # Can't get persistent to build on PyPy 3.9 either. - 'nti.testing; (python_version != "3.12" and platform_machine != "arm64" and platform_system != "Darwin") and platform_python_implementation != "PyPy"', + #'nti.testing; (python_version != "3.12" and platform_machine != "arm64" and platform_system != "Darwin") and platform_python_implementation != "PyPy"', + 'nti.testing', # transitive dep of nti.testing, which we don't always have, but need # for our emulation 'zope.schema', @@ -125,7 +126,7 @@ def _c(m): setup( name='perfmetrics', - version='4.0.1.dev0', + version='4.1.0.dev0', author='Shane Hathaway', author_email='shane@hathawaymix.org', maintainer='Jason Madden', @@ -146,6 +147,7 @@ def _c(m): "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", "License :: Repoze Public License", diff --git a/tox.ini b/tox.ini index 6cb3c8b..e53aaad 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py37,py38,py39,py310,py311,py312,pypy3,py37,coverage +envlist = py37,py38,py39,py310,py311,py312,py313,pypy3,py37,coverage [testenv] extras = From b463bdfc6d0ea70a806c74e6f64b5f295dd3eeb6 Mon Sep 17 00:00:00 2001 From: Jason Madden Date: Tue, 11 Jun 2024 09:11:59 -0500 Subject: [PATCH 2/9] tighter version specification; try to make git shut up. --- .github/workflows/tests.yml | 2 +- scripts/releases/make-manylinux | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 42f4216..00fa18e 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -81,7 +81,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - python-version: [pypy-3.10, 3.7, 3.8, 3.9, '3.10', '3.11', "3.12", "3.13"] + python-version: [pypy-3.10, 3.7, 3.8, 3.9, '3.10', '3.11', "3.12", "3.13.0-beta.1"] os: [ubuntu-latest, macos-latest] exclude: - os: macos-latest diff --git a/scripts/releases/make-manylinux b/scripts/releases/make-manylinux index 4258dc4..ea8cd6c 100755 --- a/scripts/releases/make-manylinux +++ b/scripts/releases/make-manylinux @@ -17,6 +17,8 @@ export CXXFLAGS="-pipe -O3 -DNDEBUG" if [ -d /io -a -d /opt/python ]; then # Running inside docker + # 2024-06-11: git started complaining "fatal: detected dubious ownership in repository at '/io/.git'" + git config --global --add safe.directory /io/.git cd /io rm -rf wheelhouse mkdir wheelhouse From 086564a6e8811842b73486618dbde9b959c7ccfc Mon Sep 17 00:00:00 2001 From: Jason Madden Date: Tue, 11 Jun 2024 09:14:22 -0500 Subject: [PATCH 3/9] Drop support for 3.7 as it is no longer available for darwin on ci. --- .github/workflows/tests.yml | 2 +- CHANGES.rst | 2 +- scripts/releases/make-manylinux | 2 +- setup.py | 1 - 4 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 00fa18e..8226675 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -81,7 +81,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - python-version: [pypy-3.10, 3.7, 3.8, 3.9, '3.10', '3.11', "3.12", "3.13.0-beta.1"] + python-version: [pypy-3.10, 3.8, 3.9, '3.10', '3.11', "3.12", "3.13.0-beta.1"] os: [ubuntu-latest, macos-latest] exclude: - os: macos-latest diff --git a/CHANGES.rst b/CHANGES.rst index 854852f..f5aa6fd 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -6,7 +6,7 @@ ================== - Add support for Python 3.13. - +- Drop support for Python 3.7. 4.0.0 (2023-06-22) ================== diff --git a/scripts/releases/make-manylinux b/scripts/releases/make-manylinux index ea8cd6c..c285dd9 100755 --- a/scripts/releases/make-manylinux +++ b/scripts/releases/make-manylinux @@ -22,7 +22,7 @@ if [ -d /io -a -d /opt/python ]; then cd /io rm -rf wheelhouse mkdir wheelhouse - for variant in `ls -d /opt/python/cp{37,38,39,310,311,312,313}*`; do + for variant in `ls -d /opt/python/cp{38,39,310,311,312,313}*`; do echo "Building $variant" mkdir /tmp/build cd /tmp/build diff --git a/setup.py b/setup.py index 8c29096..4b10bb5 100644 --- a/setup.py +++ b/setup.py @@ -141,7 +141,6 @@ def _c(m): "Intended Audience :: Developers", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", From 142a839442b22caf7154a74db31eca2545740c8d Mon Sep 17 00:00:00 2001 From: Jason Madden Date: Tue, 11 Jun 2024 09:19:43 -0500 Subject: [PATCH 4/9] Use the wheel command to make wheels; setup.py bdist_wheel is now broken. --- .github/workflows/tests.yml | 7 +++++++ scripts/releases/make-manylinux | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 8226675..0447746 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -86,6 +86,13 @@ jobs: exclude: - os: macos-latest python-version: pypy-3.10 + - os: macos-latest + python-version: "3.8" + - os: macos-latest + python-version: "3.9" + + - os: ubuntu-latest + python-version: pypy-3.10 steps: - name: checkout uses: actions/checkout@v4 diff --git a/scripts/releases/make-manylinux b/scripts/releases/make-manylinux index c285dd9..f4a1f11 100755 --- a/scripts/releases/make-manylinux +++ b/scripts/releases/make-manylinux @@ -29,8 +29,8 @@ if [ -d /io -a -d /opt/python ]; then git clone /io io cd io $variant/bin/pip install -U pip - $variant/bin/pip install -U 'cython>=3.0.10' setuptools - PATH=$variant/bin:$PATH $variant/bin/python setup.py bdist_wheel + $variant/bin/pip install -U 'cython>=3.0.10' setuptools wheel + PATH=$variant/bin:$PATH $variant/bin/python -m pip wheel --wheel-dir ./dist . auditwheel show dist/*.whl auditwheel repair dist/*.whl cp wheelhouse/*.whl /io/wheelhouse From 965ef7e9fcb13ab8a512cd6f462b5628649c1eda Mon Sep 17 00:00:00 2001 From: Jason Madden Date: Tue, 11 Jun 2024 09:25:09 -0500 Subject: [PATCH 5/9] Make that the build command. --- .github/workflows/tests.yml | 8 ++++---- scripts/releases/make-manylinux | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 0447746..062d398 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -107,14 +107,14 @@ jobs: - name: Install Build Dependencies run: | pip install -U pip - pip install -U setuptools wheel twine - pip install -U 'cython>=3.0b3' + pip install -U setuptools wheel twine build + pip install -U 'cython>=3.0.10' pip install -U coverage - name: Install perfmetrics (non-Mac) if: ${{ ! startsWith(runner.os, 'Mac') }} run: | - python setup.py bdist_wheel + python -m build python -m pip install -U -e ".[test,docs]" env: # Ensure we test with assertions enabled. @@ -127,7 +127,7 @@ jobs: - name: Install perfmetrics (Mac) if: startsWith(runner.os, 'Mac') run: | - python setup.py bdist_wheel + python -m build python -m pip install -U -e ".[test,docs]" env: # Unlike the above, we are actually distributing these diff --git a/scripts/releases/make-manylinux b/scripts/releases/make-manylinux index f4a1f11..cf10ab4 100755 --- a/scripts/releases/make-manylinux +++ b/scripts/releases/make-manylinux @@ -29,11 +29,11 @@ if [ -d /io -a -d /opt/python ]; then git clone /io io cd io $variant/bin/pip install -U pip - $variant/bin/pip install -U 'cython>=3.0.10' setuptools wheel - PATH=$variant/bin:$PATH $variant/bin/python -m pip wheel --wheel-dir ./dist . - auditwheel show dist/*.whl - auditwheel repair dist/*.whl - cp wheelhouse/*.whl /io/wheelhouse + $variant/bin/pip install -U 'cython>=3.0.10' setuptools build wheel + PATH=$variant/bin:$PATH $variant/bin/python -m pip build --wheel + auditwheel show dist/perfmetrics*.whl + auditwheel repair dist/perfmetrics*.whl + cp wheelhouse/perfmetrics*.whl /io/wheelhouse cd /io rm -rf /tmp/build done From 592df156bf06592d36dc89b35a46abfe5c1a1425 Mon Sep 17 00:00:00 2001 From: Jason Madden Date: Tue, 11 Jun 2024 09:29:24 -0500 Subject: [PATCH 6/9] Try installing persistent, etc, manually. --- .github/workflows/tests.yml | 2 +- scripts/releases/make-manylinux | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 062d398..f7a6929 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -110,7 +110,7 @@ jobs: pip install -U setuptools wheel twine build pip install -U 'cython>=3.0.10' pip install -U coverage - + pip install -U persistent zope.interface zope.proxy - name: Install perfmetrics (non-Mac) if: ${{ ! startsWith(runner.os, 'Mac') }} run: | diff --git a/scripts/releases/make-manylinux b/scripts/releases/make-manylinux index cf10ab4..f9aaf95 100755 --- a/scripts/releases/make-manylinux +++ b/scripts/releases/make-manylinux @@ -29,8 +29,8 @@ if [ -d /io -a -d /opt/python ]; then git clone /io io cd io $variant/bin/pip install -U pip - $variant/bin/pip install -U 'cython>=3.0.10' setuptools build wheel - PATH=$variant/bin:$PATH $variant/bin/python -m pip build --wheel + $variant/bin/pip install -U 'cython>=3.0.10' setuptools build wheel persistent zope.interface zope.proxy + PATH=$variant/bin:$PATH $variant/bin/python -m build --wheel auditwheel show dist/perfmetrics*.whl auditwheel repair dist/perfmetrics*.whl cp wheelhouse/perfmetrics*.whl /io/wheelhouse From 7fbf8aef03b72cadae88695d3e3599ede823bad8 Mon Sep 17 00:00:00 2001 From: Jason Madden Date: Tue, 11 Jun 2024 09:37:54 -0500 Subject: [PATCH 7/9] Same for cffi --- .github/workflows/tests.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index f7a6929..2a358cc 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -110,6 +110,7 @@ jobs: pip install -U setuptools wheel twine build pip install -U 'cython>=3.0.10' pip install -U coverage + pip install -U cffi pip install -U persistent zope.interface zope.proxy - name: Install perfmetrics (non-Mac) if: ${{ ! startsWith(runner.os, 'Mac') }} From fc9837793cda2ae6df1d97bd0551ec4fdab12f6c Mon Sep 17 00:00:00 2001 From: Jason Madden Date: Tue, 11 Jun 2024 09:43:40 -0500 Subject: [PATCH 8/9] Drop manylinux 2010 wheels. --- .github/workflows/tests.yml | 4 ---- CHANGES.rst | 1 + scripts/releases/make-manylinux | 2 +- setup.py | 7 +++---- 4 files changed, 5 insertions(+), 9 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 2a358cc..0955289 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -90,9 +90,6 @@ jobs: python-version: "3.8" - os: macos-latest python-version: "3.9" - - - os: ubuntu-latest - python-version: pypy-3.10 steps: - name: checkout uses: actions/checkout@v4 @@ -179,7 +176,6 @@ jobs: matrix: python-version: [3.11] image: - - manylinux2010_x86_64 - manylinux2014_aarch64 - manylinux2014_ppc64le - manylinux2014_s390x diff --git a/CHANGES.rst b/CHANGES.rst index f5aa6fd..fd6182a 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -7,6 +7,7 @@ - Add support for Python 3.13. - Drop support for Python 3.7. +- Drop support for Manylinux 2010 wheels. 4.0.0 (2023-06-22) ================== diff --git a/scripts/releases/make-manylinux b/scripts/releases/make-manylinux index f9aaf95..2cd8175 100755 --- a/scripts/releases/make-manylinux +++ b/scripts/releases/make-manylinux @@ -29,7 +29,7 @@ if [ -d /io -a -d /opt/python ]; then git clone /io io cd io $variant/bin/pip install -U pip - $variant/bin/pip install -U 'cython>=3.0.10' setuptools build wheel persistent zope.interface zope.proxy + $variant/bin/pip install -U 'cython>=3.0.10' setuptools build wheel PATH=$variant/bin:$PATH $variant/bin/python -m build --wheel auditwheel show dist/perfmetrics*.whl auditwheel repair dist/perfmetrics*.whl diff --git a/setup.py b/setup.py index 4b10bb5..f611f0d 100644 --- a/setup.py +++ b/setup.py @@ -18,10 +18,9 @@ def read(fname, here=os.path.dirname(__file__)): tests_require = [ 'zope.testrunner', # nti.testing > ZODB > persistent -> cffi - # But cffi won't build on apple silicon on 3.12. - # Can't get persistent to build on PyPy 3.9 either. - #'nti.testing; (python_version != "3.12" and platform_machine != "arm64" and platform_system != "Darwin") and platform_python_implementation != "PyPy"', - 'nti.testing', + # CffI won't build on 3.13 yet; persistent is having trouble on PyPy + 'nti.testing; python_version != "3.13" and platform_python_implementation != "PyPy"', + # transitive dep of nti.testing, which we don't always have, but need # for our emulation 'zope.schema', From 3e7184c52cf244b04ad218d851df3d9ddfae5b6f Mon Sep 17 00:00:00 2001 From: Jason Madden Date: Tue, 11 Jun 2024 09:54:09 -0500 Subject: [PATCH 9/9] Can't build on non-gil. --- .github/workflows/tests.yml | 2 -- scripts/releases/make-manylinux | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 0955289..d8b7d4d 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -107,8 +107,6 @@ jobs: pip install -U setuptools wheel twine build pip install -U 'cython>=3.0.10' pip install -U coverage - pip install -U cffi - pip install -U persistent zope.interface zope.proxy - name: Install perfmetrics (non-Mac) if: ${{ ! startsWith(runner.os, 'Mac') }} run: | diff --git a/scripts/releases/make-manylinux b/scripts/releases/make-manylinux index 2cd8175..40e7138 100755 --- a/scripts/releases/make-manylinux +++ b/scripts/releases/make-manylinux @@ -22,6 +22,8 @@ if [ -d /io -a -d /opt/python ]; then cd /io rm -rf wheelhouse mkdir wheelhouse + # non-gil won't build, seems like a cython issue. + rm -f /opt/python/cp313-cp313t for variant in `ls -d /opt/python/cp{38,39,310,311,312,313}*`; do echo "Building $variant" mkdir /tmp/build