From 1ca7c795bef328fd2da58ae54385c1260a325aa2 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Tue, 3 Nov 2026 15:05:57 +0200 Subject: [PATCH 1/8] Drop support for EOL Python 3.10 --- .github/workflows/main.yml | 2 +- doc/changelog.rst | 7 ++++++- pyperformance/_pyproject_toml.py | 6 +----- pyperformance/tests/test_venv.py | 11 ++++------- pyproject.toml | 9 +++------ requirements.in | 1 - tox.ini | 1 - 7 files changed, 15 insertions(+), 22 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a38b706a..981557b9 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -21,7 +21,7 @@ jobs: matrix: # Test all supported versions on Ubuntu: os: [ubuntu-latest, ubuntu-24.04-arm] - python: ["3.10", "3.11", "3.12", "3.13", "3.14"] + python: ["3.11", "3.12", "3.13", "3.14"] experimental: [false] build: [''] include: diff --git a/doc/changelog.rst b/doc/changelog.rst index 8735b3bb..73596082 100644 --- a/doc/changelog.rst +++ b/doc/changelog.rst @@ -1,7 +1,12 @@ Changelog ========= -Version 1.14.0 +Version 1.15.0 (unreleased) +-------------- + +* Drop support for Python 3.10 + +Version 1.14.0 (2026-02-07) -------------- * Bump ``pyperf`` to 2.10.0 * Add base64 module benchmark (b64, b32, b16, a85, b85) diff --git a/pyperformance/_pyproject_toml.py b/pyperformance/_pyproject_toml.py index 40b26e82..17d4afd4 100644 --- a/pyperformance/_pyproject_toml.py +++ b/pyperformance/_pyproject_toml.py @@ -12,6 +12,7 @@ import os.path import re +import tomllib import urllib.parse import packaging.requirements @@ -19,11 +20,6 @@ import packaging.utils import packaging.version -try: - import tomllib # type: ignore[import-not-found] # tomllib doesn't exist on 3.7-3.10 -except ImportError: - import tomli as tomllib - from ._utils import check_name NAME_RE = re.compile("^([A-Z0-9]|[A-Z0-9][A-Z0-9._-]*[A-Z0-9])$", re.IGNORECASE) diff --git a/pyperformance/tests/test_venv.py b/pyperformance/tests/test_venv.py index 3e0a6800..31912579 100644 --- a/pyperformance/tests/test_venv.py +++ b/pyperformance/tests/test_venv.py @@ -16,8 +16,6 @@ def new_venv_config( system_site_packages=False, executable=None, command=None, - *, - old=sys.version_info < (3, 11), ): if not home: home = os.path.dirname(sys.executable) @@ -26,11 +24,10 @@ def new_venv_config( if not isinstance(system_site_packages, str): system_site_packages = "true" if system_site_packages else "false" system_site_packages = system_site_packages == "true" - if not old: - if executable is None: - executable = sys.executable - if command is None: - command = f"{executable} -m venv {root}" + if executable is None: + executable = sys.executable + if command is None: + command = f"{executable} -m venv {root}" return types.SimpleNamespace( home=home, version=version, diff --git a/pyproject.toml b/pyproject.toml index 177d3c73..46df93f0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -46,7 +46,7 @@ description = "Python benchmark suite" readme = "README.rst" license = { text = "MIT" } authors = [ { name = "Collin Winter" }, { name = "Jeffrey Yasskin" } ] -requires-python = ">=3.10" +requires-python = ">=3.11" classifiers = [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", @@ -55,7 +55,6 @@ classifiers = [ "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", @@ -65,11 +64,9 @@ dynamic = [ "version" ] dependencies = [ "packaging", "pyperf", - "tomli; python_version<'3.11'", ] optional-dependencies.dev = [ "mypy==2.3.1", - "tomli", # Needed even on 3.11+ for typechecking with mypy "tox", ] urls = { Homepage = "https://github.com/python/pyperformance" } @@ -81,7 +78,7 @@ dynamic.version = { attr = "pyperformance.__version__" } packages.find = {} # Scanning implicit namespaces is active by default [tool.ruff] -target-version = "py310" +target-version = "py311" exclude = [ "pyperformance/data-files/", ] @@ -102,7 +99,7 @@ lint.ignore = [ max_supported_python = "3.14" [tool.mypy] -python_version = "3.10" +python_version = "3.11" pretty = true enable_error_code = "ignore-without-code" disallow_any_generics = true diff --git a/requirements.in b/requirements.in index 55f432ef..04abf276 100644 --- a/requirements.in +++ b/requirements.in @@ -13,7 +13,6 @@ pyperf # for benchmark metadata: packaging -tomli; python_version < '3.11' # Optional dependencies diff --git a/tox.ini b/tox.ini index 12ab9b65..96836941 100644 --- a/tox.ini +++ b/tox.ini @@ -32,5 +32,4 @@ ignore = E501,E741,W503 basepython = python3 deps= mypy - tomli commands = mypy From ee9c221d9670cd9e5d80f500fec47181f6d140d9 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Tue, 3 Nov 2026 15:13:27 +0200 Subject: [PATCH 2/8] Add support for Python 3.15 --- .github/workflows/main.yml | 14 +++++++------- doc/changelog.rst | 3 +-- pyproject.toml | 3 ++- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 981557b9..0253d537 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -21,24 +21,24 @@ jobs: matrix: # Test all supported versions on Ubuntu: os: [ubuntu-latest, ubuntu-24.04-arm] - python: ["3.11", "3.12", "3.13", "3.14"] + python: ["3.11", "3.12", "3.13", "3.14", "3.15"] experimental: [false] build: [''] include: # As the experimental task for the dev version. - os: ubuntu-latest - python: "3.14" + python: "3.15" experimental: true build: 'free-threading' - os: ubuntu-24.04-arm - python: "3.14" + python: "3.15" experimental: true build: 'free-threading' - os: ubuntu-latest - python: "3.15-dev" + python: "3.15-dev" # TODO 3.16-dev pending https://github.com/actions/python-versions/pull/413 experimental: true - os: ubuntu-latest - python: "3.15-dev" + python: "3.15-dev" # TODO 3.16-dev pending https://github.com/actions/python-versions/pull/413 experimental: true build: 'free-threading' # Also test PyPy, macOS, and Windows: @@ -46,10 +46,10 @@ jobs: python: pypy-3.11 experimental: false - os: macos-latest - python: "3.14" + python: "3.15" experimental: true - os: windows-latest - python: "3.14" + python: "3.15" experimental: false steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 diff --git a/doc/changelog.rst b/doc/changelog.rst index 73596082..aa8a1069 100644 --- a/doc/changelog.rst +++ b/doc/changelog.rst @@ -3,8 +3,7 @@ Changelog Version 1.15.0 (unreleased) -------------- - -* Drop support for Python 3.10 +* Add support for Python 3.15 and drop 3.10 Version 1.14.0 (2026-02-07) -------------- diff --git a/pyproject.toml b/pyproject.toml index 46df93f0..d1de8675 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -59,6 +59,7 @@ classifiers = [ "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3.14", + "Programming Language :: Python :: 3.15", ] dynamic = [ "version" ] dependencies = [ @@ -96,7 +97,7 @@ lint.ignore = [ ] [tool.pyproject-fmt] -max_supported_python = "3.14" +max_supported_python = "3.15" [tool.mypy] python_version = "3.11" From 4d89583f5bc83c079e5895de7f89d4d59658d011 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Tue, 3 Nov 2026 15:14:50 +0200 Subject: [PATCH 3/8] Bump tornado to fix bm_tornado_http on PyPy --- doc/changelog.rst | 1 + .../data-files/benchmarks/bm_tornado_http/requirements.txt | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/changelog.rst b/doc/changelog.rst index aa8a1069..e24bb84f 100644 --- a/doc/changelog.rst +++ b/doc/changelog.rst @@ -4,6 +4,7 @@ Changelog Version 1.15.0 (unreleased) -------------- * Add support for Python 3.15 and drop 3.10 +* Bump tornado to 6.6 (fixes ``BufferError`` on PyPy) Version 1.14.0 (2026-02-07) -------------- diff --git a/pyperformance/data-files/benchmarks/bm_tornado_http/requirements.txt b/pyperformance/data-files/benchmarks/bm_tornado_http/requirements.txt index 180ff786..f60a887b 100644 --- a/pyperformance/data-files/benchmarks/bm_tornado_http/requirements.txt +++ b/pyperformance/data-files/benchmarks/bm_tornado_http/requirements.txt @@ -1 +1 @@ -tornado==6.5.2 +tornado==6.6 From ca2fbbaf3c807849d1c80b111c18cacb47241cdc Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Tue, 3 Nov 2026 15:16:45 +0200 Subject: [PATCH 4/8] Upgrade syntax for Python 3.11+ with Ruff --- doc/conf.py | 1 - examples/benchmarking-scripts/backfill.py | 2 +- pyperformance/compare.py | 2 +- pyperformance/compile.py | 6 +++--- pyperformance/tests/test_commands.py | 2 +- pyperformance/venv.py | 2 +- 6 files changed, 7 insertions(+), 8 deletions(-) diff --git a/doc/conf.py b/doc/conf.py index 202335f6..d3bc05ea 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 -# -*- coding: utf-8 -*- # # Python Performance Benchmark Suite documentation build configuration file, created by # sphinx-quickstart on Tue Mar 28 15:59:41 2017. diff --git a/examples/benchmarking-scripts/backfill.py b/examples/benchmarking-scripts/backfill.py index 313ca479..5b873fdd 100644 --- a/examples/benchmarking-scripts/backfill.py +++ b/examples/benchmarking-scripts/backfill.py @@ -16,7 +16,7 @@ def get_revisions() -> tuple[str, str]: revisions = [] - with open("backfill_shas.txt", "r") as f: + with open("backfill_shas.txt") as f: for line in f: sha, branch = line.split("=") revisions.append((sha, branch.rstrip())) diff --git a/pyperformance/compare.py b/pyperformance/compare.py index 176d797d..b9089796 100644 --- a/pyperformance/compare.py +++ b/pyperformance/compare.py @@ -231,7 +231,7 @@ def format_table(base_label, changed_label, results): return "\n".join(output) -class BenchmarkResult(object): +class BenchmarkResult: """An object representing data from a succesful benchmark run.""" def __init__(self, base, changed): diff --git a/pyperformance/compile.py b/pyperformance/compile.py index c1ffe06d..447256fd 100644 --- a/pyperformance/compile.py +++ b/pyperformance/compile.py @@ -43,7 +43,7 @@ def replace_timezone(regs): return datetime.datetime.strptime(text2, "%Y-%m-%dT%H:%M:%S%z") -class Task(object): +class Task: def __init__(self, app, cwd): self.app = app self.cwd = cwd @@ -118,14 +118,14 @@ def get_revision_info(self, revision): node, date = stdout.split("|") date = datetime.datetime.strptime(date, "%Y-%m-%d %H:%M:%S %z") # convert local date to UTC - date = (date - date.utcoffset()).replace(tzinfo=datetime.timezone.utc) + date = (date - date.utcoffset()).replace(tzinfo=datetime.UTC) else: node, date = stdout.split("|") date = datetime.datetime.strptime(date[:16], "%Y-%m-%d %H:%M") return (node, date) -class Application(object): +class Application: def __init__(self, conf, options): self.conf = conf self.options = options diff --git a/pyperformance/tests/test_commands.py b/pyperformance/tests/test_commands.py index 5b44f015..f3924692 100644 --- a/pyperformance/tests/test_commands.py +++ b/pyperformance/tests/test_commands.py @@ -456,7 +456,7 @@ def test_compare_csv(self): filename = self.resolve_tmp("outfile.csv", unique=True) with tests.CleanupFile(filename): self.compare("--csv", filename) - with open(filename, "r", encoding="utf-8") as infile: + with open(filename, encoding="utf-8") as infile: csv = infile.read() self.assertEqual(csv, expected) diff --git a/pyperformance/venv.py b/pyperformance/venv.py index 6c7301a9..871790e8 100644 --- a/pyperformance/venv.py +++ b/pyperformance/venv.py @@ -12,7 +12,7 @@ PYPERF_OPTIONAL = ["psutil"] -class Requirements(object): +class Requirements: @classmethod def from_file(cls, filename): self = cls() From f72fe07710ed20522bd41dca01ba5bc95190ad2c Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Tue, 3 Nov 2026 15:33:26 +0200 Subject: [PATCH 5/8] Bump genshi to fix bm_genshi on Python 3.15 --- doc/changelog.rst | 1 + pyperformance/data-files/benchmarks/bm_genshi/requirements.txt | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/changelog.rst b/doc/changelog.rst index e24bb84f..6e0adfd3 100644 --- a/doc/changelog.rst +++ b/doc/changelog.rst @@ -5,6 +5,7 @@ Version 1.15.0 (unreleased) -------------- * Add support for Python 3.15 and drop 3.10 * Bump tornado to 6.6 (fixes ``BufferError`` on PyPy) +* Bump genshi to 0.7.12 (fixes ``TypeError`` on Python 3.15) Version 1.14.0 (2026-02-07) -------------- diff --git a/pyperformance/data-files/benchmarks/bm_genshi/requirements.txt b/pyperformance/data-files/benchmarks/bm_genshi/requirements.txt index 3ea4b594..333291bd 100644 --- a/pyperformance/data-files/benchmarks/bm_genshi/requirements.txt +++ b/pyperformance/data-files/benchmarks/bm_genshi/requirements.txt @@ -1,2 +1 @@ -genshi==0.7.7 -six==1.16.0 +genshi==0.7.12 From 4bb80359ede507e51f9f696e930fba76d13c2ea6 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Tue, 3 Nov 2026 20:43:22 +0200 Subject: [PATCH 6/8] Test PyPy3.12 --- .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 0253d537..7429d1c8 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -43,7 +43,7 @@ jobs: build: 'free-threading' # Also test PyPy, macOS, and Windows: - os: ubuntu-latest - python: pypy-3.11 + python: pypy3.12 experimental: false - os: macos-latest python: "3.15" From 905c4374cd4a41f83f8a12ffdb77bdb1d9023f17 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Tue, 3 Nov 2026 20:45:30 +0200 Subject: [PATCH 7/8] Revert "Test PyPy3.12" This reverts commit 4bb80359ede507e51f9f696e930fba76d13c2ea6. --- .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 7429d1c8..0253d537 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -43,7 +43,7 @@ jobs: build: 'free-threading' # Also test PyPy, macOS, and Windows: - os: ubuntu-latest - python: pypy3.12 + python: pypy-3.11 experimental: false - os: macos-latest python: "3.15" From f94a7e83deffc7dd3dae71ee18e15b0f4ba7e9c2 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Wed, 4 Nov 2026 11:04:44 +0200 Subject: [PATCH 8/8] 3.16-dev is now available on GitHub Actions --- .github/workflows/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0253d537..5344d66e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -35,10 +35,10 @@ jobs: experimental: true build: 'free-threading' - os: ubuntu-latest - python: "3.15-dev" # TODO 3.16-dev pending https://github.com/actions/python-versions/pull/413 + python: "3.16-dev" experimental: true - os: ubuntu-latest - python: "3.15-dev" # TODO 3.16-dev pending https://github.com/actions/python-versions/pull/413 + python: "3.16-dev" experimental: true build: 'free-threading' # Also test PyPy, macOS, and Windows: