Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Python 3.13 #34

Merged
merged 9 commits into from
Jun 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 16 additions & 14 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,17 +81,21 @@ 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.8, 3.9, '3.10', '3.11', "3.12", "3.13.0-beta.1"]
os: [ubuntu-latest, macos-latest]
exclude:
- os: macos-latest
python-version: pypy-3.9
python-version: pypy-3.10
- os: macos-latest
python-version: "3.8"
- os: macos-latest
python-version: "3.9"
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'
Expand All @@ -100,14 +104,13 @@ 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.
Expand All @@ -120,7 +123,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
Expand All @@ -135,7 +138,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
Expand Down Expand Up @@ -169,9 +172,8 @@ 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
- manylinux2014_ppc64le
- manylinux2014_s390x
Expand All @@ -181,9 +183,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
Expand Down
7 changes: 4 additions & 3 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@
CHANGES
=========

4.0.1 (unreleased)
4.1.0 (unreleased)
==================

- Nothing changed yet.

- Add support for Python 3.13.
- Drop support for Python 3.7.
- Drop support for Manylinux 2010 wheels.

4.0.0 (2023-06-22)
==================
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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'",
]
16 changes: 10 additions & 6 deletions scripts/releases/make-manylinux
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,25 @@ 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
for variant in `ls -d /opt/python/cp{37,38,39,310,311,312}*`; do
# 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
cd /tmp/build
git clone /io io
cd io
$variant/bin/pip install -U pip
$variant/bin/pip install -U 'cython>=3.0b3' setuptools
PATH=$variant/bin:$PATH $variant/bin/python setup.py bdist_wheel
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 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
Expand Down
10 changes: 5 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +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"',
# 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',
Expand Down Expand Up @@ -125,7 +125,7 @@ def _c(m):

setup(
name='perfmetrics',
version='4.0.1.dev0',
version='4.1.0.dev0',
author='Shane Hathaway',
author_email='[email protected]',
maintainer='Jason Madden',
Expand All @@ -140,12 +140,12 @@ 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",
"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",
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -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 =
Expand Down
Loading