From 8d11d377ba3a37deaa6aea8382b3bcdcede7dfaa Mon Sep 17 00:00:00 2001 From: Jendrik Seipp Date: Tue, 1 Oct 2024 20:06:58 +0200 Subject: [PATCH 1/7] Test Python 3.13. --- .github/workflows/main.yml | 2 +- setup.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d2a1d119..2a87d438 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -16,7 +16,7 @@ jobs: fail-fast: false matrix: os: [macos-latest, ubuntu-latest, windows-latest] - python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] + python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13'] steps: - name: Checkout code diff --git a/setup.py b/setup.py index d9187eac..e9a453f8 100644 --- a/setup.py +++ b/setup.py @@ -46,6 +46,7 @@ def find_version(*parts): "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", "Topic :: Software Development :: Quality Assurance", From 95a5db43f0d0b9ed86e51550d16ce0194c98184a Mon Sep 17 00:00:00 2001 From: Jendrik Seipp Date: Tue, 1 Oct 2024 20:14:20 +0200 Subject: [PATCH 2/7] Use Python 3.13 RC 3. --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2a87d438..4e2b035c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -16,7 +16,7 @@ jobs: fail-fast: false matrix: os: [macos-latest, ubuntu-latest, windows-latest] - python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13'] + python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13.0-rc.3'] steps: - name: Checkout code From bc053495097b113293349a781335d91db0abc9b2 Mon Sep 17 00:00:00 2001 From: Jendrik Seipp Date: Tue, 1 Oct 2024 20:17:06 +0200 Subject: [PATCH 3/7] Allow pre-releases. --- .github/workflows/main.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4e2b035c..812f811a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -16,7 +16,7 @@ jobs: fail-fast: false matrix: os: [macos-latest, ubuntu-latest, windows-latest] - python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13.0-rc.3'] + python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13'] steps: - name: Checkout code @@ -26,6 +26,7 @@ jobs: uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} + allow-prereleases: true - name: Install dependencies run: | From cdbd3b8bbf8a32b3d9591ce5f9519d1ecdcb10c9 Mon Sep 17 00:00:00 2001 From: Jendrik Seipp Date: Tue, 1 Oct 2024 20:30:28 +0200 Subject: [PATCH 4/7] Disable Pint test for Python 3.13. --- tests/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/__init__.py b/tests/__init__.py index 58e1da85..edd81b49 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -8,7 +8,10 @@ REPO = pathlib.Path(__file__).resolve().parents[1] WHITELISTS = [ - str(path) for path in (REPO / "vulture" / "whitelists").glob("*.py") + str(path) + for path in (REPO / "vulture" / "whitelists").glob("*.py") + # Pint is incompatible with Python 3.13 (https://github.com/hgrecco/pint/issues/1969). + if sys.version_info < (3, 13) or path.name != "pint.py" ] From 14be2fb9a35eb75507b34a9eb94b7682409cccf7 Mon Sep 17 00:00:00 2001 From: Jendrik Seipp Date: Tue, 1 Oct 2024 20:33:10 +0200 Subject: [PATCH 5/7] Fix name. --- tests/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/__init__.py b/tests/__init__.py index edd81b49..c54b3877 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -11,7 +11,7 @@ str(path) for path in (REPO / "vulture" / "whitelists").glob("*.py") # Pint is incompatible with Python 3.13 (https://github.com/hgrecco/pint/issues/1969). - if sys.version_info < (3, 13) or path.name != "pint.py" + if sys.version_info < (3, 13) or path.name != "pint_whitelist.py" ] From dc5ff4ed44d02d477aaad74832d1cfd2511540ab Mon Sep 17 00:00:00 2001 From: Jendrik Seipp Date: Tue, 1 Oct 2024 20:46:55 +0200 Subject: [PATCH 6/7] use latest test apps. --- tox.ini | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tox.ini b/tox.ini index 4ca649a9..3d363561 100644 --- a/tox.ini +++ b/tox.ini @@ -1,20 +1,20 @@ [tox] -envlist = cleanup, py{38,310,311,312}, style # Skip py39 since it chokes on distutils. +envlist = cleanup, py{38,310,311,312,313}, style # Skip py39 since it chokes on distutils. skip_missing_interpreters = true # Erase old coverage results, then accumulate them during this tox run. [testenv:cleanup] deps = - coverage==7.0.5 + coverage commands = coverage erase [testenv] deps = - coverage==7.0.5 + coverage pint # Use latest version to catch API changes. - pytest==7.4.2 - pytest-cov==4.0.0 + pytest + pytest-cov commands = pytest {posargs} # Install package as wheel in all envs (https://hynek.me/articles/turbo-charge-tox/). From a585c5c626e2f358810c142c6e9359daa53907cd Mon Sep 17 00:00:00 2001 From: Jendrik Seipp Date: Tue, 1 Oct 2024 20:54:22 +0200 Subject: [PATCH 7/7] Update changelog. --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 03509bd7..d62b1398 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ # 2.13 (unreleased) +* Add support for Python 3.13 (Jendrik Seipp, #369). * Add PyPI and conda-forge badges to README file (Trevor James Smith, #356). * Include `tests/**/*.toml` in sdist (Colin Watson).