From a09c23b5ab845673d79ce63dcc8ed0e19f82ad95 Mon Sep 17 00:00:00 2001 From: Stan Ulbrych Date: Fri, 20 Nov 2026 18:26:32 +0000 Subject: [PATCH 1/2] Update pinned benchmark dependencies to current releases Co-authored-by: Inada Naoki --- doc/changelog.rst | 8 ++++++ .../bm_asyncio_websockets/requirements.txt | 2 +- .../benchmarks/bm_chameleon/requirements.txt | 2 +- .../benchmarks/bm_coverage/requirements.txt | 2 +- .../benchmarks/bm_dask/requirements.txt | 2 +- .../bm_django_template/requirements.txt | 10 ++++---- .../benchmarks/bm_docutils/requirements.txt | 2 +- .../bm_dulwich_log/requirements.txt | 6 ++--- .../benchmarks/bm_fastapi/requirements.txt | 4 +-- .../benchmarks/bm_hg_startup/requirements.txt | 2 +- .../benchmarks/bm_html5lib/requirements.txt | 2 +- .../benchmarks/bm_mako/requirements.txt | 4 +-- .../benchmarks/bm_mako/run_benchmark.py | 5 ++-- .../benchmarks/bm_networkx/requirements.txt | 2 +- .../benchmarks/bm_sphinx/requirements.txt | 4 +-- .../requirements.txt | 3 +-- .../run_benchmark.py | 8 +----- .../bm_sqlalchemy_imperative/requirements.txt | 3 +-- .../bm_sqlalchemy_imperative/run_benchmark.py | 25 ++++++------------- .../benchmarks/bm_sqlglot_v2/requirements.txt | 2 +- .../benchmarks/bm_sympy/requirements.txt | 4 +-- .../bm_tomli_loads/requirements.txt | 2 +- .../bm_tornado_http/requirements.txt | 2 +- .../benchmarks/bm_xdsl/pyproject.toml | 2 +- .../benchmarks/bm_xdsl/requirements.txt | 2 +- .../benchmarks/bm_yaml/requirements.txt | 2 +- pyperformance/requirements/requirements.txt | 4 +-- 27 files changed, 54 insertions(+), 62 deletions(-) diff --git a/doc/changelog.rst b/doc/changelog.rst index 9c775d3a..29de493d 100644 --- a/doc/changelog.rst +++ b/doc/changelog.rst @@ -6,6 +6,14 @@ 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) +* Bump the pinned dependencies of most benchmarks to current releases, + including Django 5.2, SQLAlchemy 2.1, dulwich 1.2, SymPy 1.14, Mako 1.4, + docutils 0.23, sqlglot 30, websockets 17, Sphinx 9.0 and dask 2026.8. +* Port the SQLAlchemy benchmarks to the SQLAlchemy 2 API and drop the + ``greenlet`` requirement +* ``mako``: use the pure Python implementation of ``markupsafe``, which Mako + now requires +* Bump ``pyperf`` to 2.11.0 and ``psutil`` to 7.2.2 Version 1.14.0 (2026-02-07) --------------------------- diff --git a/pyperformance/data-files/benchmarks/bm_asyncio_websockets/requirements.txt b/pyperformance/data-files/benchmarks/bm_asyncio_websockets/requirements.txt index e3e82768..933b1e1b 100644 --- a/pyperformance/data-files/benchmarks/bm_asyncio_websockets/requirements.txt +++ b/pyperformance/data-files/benchmarks/bm_asyncio_websockets/requirements.txt @@ -1 +1 @@ -websockets==11.0.3 \ No newline at end of file +websockets==17.4 diff --git a/pyperformance/data-files/benchmarks/bm_chameleon/requirements.txt b/pyperformance/data-files/benchmarks/bm_chameleon/requirements.txt index 1d7b5237..25185fb1 100644 --- a/pyperformance/data-files/benchmarks/bm_chameleon/requirements.txt +++ b/pyperformance/data-files/benchmarks/bm_chameleon/requirements.txt @@ -1 +1 @@ -chameleon==4.6.0 +chameleon==4.6.1 diff --git a/pyperformance/data-files/benchmarks/bm_coverage/requirements.txt b/pyperformance/data-files/benchmarks/bm_coverage/requirements.txt index b13cbb7c..260fc781 100644 --- a/pyperformance/data-files/benchmarks/bm_coverage/requirements.txt +++ b/pyperformance/data-files/benchmarks/bm_coverage/requirements.txt @@ -1 +1 @@ -coverage==7.3.2 +coverage==7.17.3 diff --git a/pyperformance/data-files/benchmarks/bm_dask/requirements.txt b/pyperformance/data-files/benchmarks/bm_dask/requirements.txt index 3b8ca8e1..66ba4b0d 100644 --- a/pyperformance/data-files/benchmarks/bm_dask/requirements.txt +++ b/pyperformance/data-files/benchmarks/bm_dask/requirements.txt @@ -1 +1 @@ -dask[distributed]==2024.10.0 +dask[distributed]==2026.8.0 diff --git a/pyperformance/data-files/benchmarks/bm_django_template/requirements.txt b/pyperformance/data-files/benchmarks/bm_django_template/requirements.txt index 4b71dc07..fa580ca7 100644 --- a/pyperformance/data-files/benchmarks/bm_django_template/requirements.txt +++ b/pyperformance/data-files/benchmarks/bm_django_template/requirements.txt @@ -1,5 +1,5 @@ -asgiref==3.3.4 -django==3.2.4 -pytz==2021.1 -sqlparse==0.4.1 -legacy-cgi==2.6 \ No newline at end of file +asgiref==3.13.0 +django==5.2.19 +pytz==2026.6 +sqlparse==0.6.1 +legacy-cgi==2.6.4 diff --git a/pyperformance/data-files/benchmarks/bm_docutils/requirements.txt b/pyperformance/data-files/benchmarks/bm_docutils/requirements.txt index 1ffc5119..2f3b989f 100644 --- a/pyperformance/data-files/benchmarks/bm_docutils/requirements.txt +++ b/pyperformance/data-files/benchmarks/bm_docutils/requirements.txt @@ -1 +1 @@ -docutils==0.18.1 +docutils==0.23 diff --git a/pyperformance/data-files/benchmarks/bm_dulwich_log/requirements.txt b/pyperformance/data-files/benchmarks/bm_dulwich_log/requirements.txt index 82a5e8d4..e954f4b1 100644 --- a/pyperformance/data-files/benchmarks/bm_dulwich_log/requirements.txt +++ b/pyperformance/data-files/benchmarks/bm_dulwich_log/requirements.txt @@ -1,3 +1,3 @@ -certifi==2026.10.18 -dulwich==0.20.23 -urllib3==1.26.5 +certifi==2026.10.23 +dulwich==1.2.21 +urllib3==2.8.0 diff --git a/pyperformance/data-files/benchmarks/bm_fastapi/requirements.txt b/pyperformance/data-files/benchmarks/bm_fastapi/requirements.txt index bbcf5238..2b1e489a 100644 --- a/pyperformance/data-files/benchmarks/bm_fastapi/requirements.txt +++ b/pyperformance/data-files/benchmarks/bm_fastapi/requirements.txt @@ -1,3 +1,3 @@ -fastapi==0.121.0 +fastapi==0.162.7 httpx==0.28.1 -uvicorn==0.38.0 +uvicorn==0.54.0 diff --git a/pyperformance/data-files/benchmarks/bm_hg_startup/requirements.txt b/pyperformance/data-files/benchmarks/bm_hg_startup/requirements.txt index 7b54aaa7..05c6657f 100644 --- a/pyperformance/data-files/benchmarks/bm_hg_startup/requirements.txt +++ b/pyperformance/data-files/benchmarks/bm_hg_startup/requirements.txt @@ -1 +1 @@ -mercurial==5.8 +mercurial==7.2.4 diff --git a/pyperformance/data-files/benchmarks/bm_html5lib/requirements.txt b/pyperformance/data-files/benchmarks/bm_html5lib/requirements.txt index 937d99a9..cad374b7 100644 --- a/pyperformance/data-files/benchmarks/bm_html5lib/requirements.txt +++ b/pyperformance/data-files/benchmarks/bm_html5lib/requirements.txt @@ -1,3 +1,3 @@ html5lib==1.1 -six==1.16.0 +six==1.17.0 webencodings==0.5.1 diff --git a/pyperformance/data-files/benchmarks/bm_mako/requirements.txt b/pyperformance/data-files/benchmarks/bm_mako/requirements.txt index 5f2fe892..067972c5 100644 --- a/pyperformance/data-files/benchmarks/bm_mako/requirements.txt +++ b/pyperformance/data-files/benchmarks/bm_mako/requirements.txt @@ -1,2 +1,2 @@ -mako==1.1.4 -markupsafe==2.0.1 +mako==1.4.3 +markupsafe==3.0.4 diff --git a/pyperformance/data-files/benchmarks/bm_mako/run_benchmark.py b/pyperformance/data-files/benchmarks/bm_mako/run_benchmark.py index a8074a14..26445698 100644 --- a/pyperformance/data-files/benchmarks/bm_mako/run_benchmark.py +++ b/pyperformance/data-files/benchmarks/bm_mako/run_benchmark.py @@ -12,8 +12,9 @@ import pyperf -# Mako imports (w/o markupsafe) -sys.modules['markupsafe'] = None +# Mako requires markupsafe; use its pure Python implementation +# rather than the C speedups. +sys.modules['markupsafe._speedups'] = None import mako # noqa from mako.template import Template # noqa diff --git a/pyperformance/data-files/benchmarks/bm_networkx/requirements.txt b/pyperformance/data-files/benchmarks/bm_networkx/requirements.txt index 5e0aaf71..fa8afaa8 100644 --- a/pyperformance/data-files/benchmarks/bm_networkx/requirements.txt +++ b/pyperformance/data-files/benchmarks/bm_networkx/requirements.txt @@ -1 +1 @@ -networkx==3.4.2 +networkx==3.6.1 diff --git a/pyperformance/data-files/benchmarks/bm_sphinx/requirements.txt b/pyperformance/data-files/benchmarks/bm_sphinx/requirements.txt index a866afda..0312cc25 100644 --- a/pyperformance/data-files/benchmarks/bm_sphinx/requirements.txt +++ b/pyperformance/data-files/benchmarks/bm_sphinx/requirements.txt @@ -1,2 +1,2 @@ -sphinx==7.3.7 -python-docs-theme==2024.6 +sphinx==9.0.4 +python-docs-theme==2025.2 diff --git a/pyperformance/data-files/benchmarks/bm_sqlalchemy_declarative/requirements.txt b/pyperformance/data-files/benchmarks/bm_sqlalchemy_declarative/requirements.txt index c9434339..73889981 100644 --- a/pyperformance/data-files/benchmarks/bm_sqlalchemy_declarative/requirements.txt +++ b/pyperformance/data-files/benchmarks/bm_sqlalchemy_declarative/requirements.txt @@ -1,2 +1 @@ -greenlet==3.2.4 -sqlalchemy==1.4.19 +sqlalchemy==2.1.8 diff --git a/pyperformance/data-files/benchmarks/bm_sqlalchemy_declarative/run_benchmark.py b/pyperformance/data-files/benchmarks/bm_sqlalchemy_declarative/run_benchmark.py index a977775a..edcd95c8 100644 --- a/pyperformance/data-files/benchmarks/bm_sqlalchemy_declarative/run_benchmark.py +++ b/pyperformance/data-files/benchmarks/bm_sqlalchemy_declarative/run_benchmark.py @@ -1,8 +1,7 @@ import pyperf from sqlalchemy import Column, ForeignKey, Integer, String -from sqlalchemy.ext.declarative import declarative_base -from sqlalchemy.orm import relationship, sessionmaker +from sqlalchemy.orm import declarative_base, relationship, sessionmaker from sqlalchemy import create_engine @@ -37,11 +36,6 @@ class Address(Base): # statements in raw SQL. Base.metadata.create_all(engine) - -# Bind the engine to the metadata of the Base class so that the -# declaratives can be accessed through a DBSession instance -Base.metadata.bind = engine - DBSession = sessionmaker(bind=engine) # A DBSession() instance establishes all conversations with the database # and represents a "staging zone" for all the objects loaded into the diff --git a/pyperformance/data-files/benchmarks/bm_sqlalchemy_imperative/requirements.txt b/pyperformance/data-files/benchmarks/bm_sqlalchemy_imperative/requirements.txt index c9434339..73889981 100644 --- a/pyperformance/data-files/benchmarks/bm_sqlalchemy_imperative/requirements.txt +++ b/pyperformance/data-files/benchmarks/bm_sqlalchemy_imperative/requirements.txt @@ -1,2 +1 @@ -greenlet==3.2.4 -sqlalchemy==1.4.19 +sqlalchemy==2.1.8 diff --git a/pyperformance/data-files/benchmarks/bm_sqlalchemy_imperative/run_benchmark.py b/pyperformance/data-files/benchmarks/bm_sqlalchemy_imperative/run_benchmark.py index b2fe89fa..8f07e647 100644 --- a/pyperformance/data-files/benchmarks/bm_sqlalchemy_imperative/run_benchmark.py +++ b/pyperformance/data-files/benchmarks/bm_sqlalchemy_imperative/run_benchmark.py @@ -1,8 +1,8 @@ import pyperf from sqlalchemy import Column, ForeignKey, Integer, String, Table, MetaData +from sqlalchemy import create_engine, delete, insert, select from sqlalchemy.orm import sessionmaker -from sqlalchemy import create_engine metadata = MetaData() @@ -26,11 +26,6 @@ # statements in raw SQL. metadata.create_all(engine) - -# Bind the engine to the metadata of the Base class so that the -# declaratives can be accessed through a DBSession instance -metadata.bind = engine - DBSession = sessionmaker(bind=engine) # A DBSession() instance establishes all conversations with the database # and represents a "staging zone" for all the objects loaded into the @@ -48,28 +43,24 @@ def bench_sqlalchemy(loops, npeople): for loops in range(loops): # drop rows created by the previous benchmark - cur = Person.delete() - cur.execute() - - cur = Address.delete() - cur.execute() + session.execute(delete(Person)) + session.execute(delete(Address)) # Run the benchmark once t0 = pyperf.perf_counter() for i in range(npeople): # Insert a Person in the person table - new_person = Person.insert() - new_person.execute(name="name %i" % i) + new_person = insert(Person).values(name="name %i" % i) + session.execute(new_person) # Insert an Address in the address table - new_address = Address.insert() - new_address.execute(post_code='%05i' % i) + new_address = insert(Address).values(post_code='%05i' % i) + session.execute(new_address) # do 'npeople' queries per insert for i in range(npeople): - cur = Person.select() - cur.execute() + session.execute(select(Person)) total_dt += (pyperf.perf_counter() - t0) diff --git a/pyperformance/data-files/benchmarks/bm_sqlglot_v2/requirements.txt b/pyperformance/data-files/benchmarks/bm_sqlglot_v2/requirements.txt index 08a89a92..84367a39 100644 --- a/pyperformance/data-files/benchmarks/bm_sqlglot_v2/requirements.txt +++ b/pyperformance/data-files/benchmarks/bm_sqlglot_v2/requirements.txt @@ -1 +1 @@ -sqlglot==4.6.0 +sqlglot==30.31.0 diff --git a/pyperformance/data-files/benchmarks/bm_sympy/requirements.txt b/pyperformance/data-files/benchmarks/bm_sympy/requirements.txt index 652d404d..7336df4d 100644 --- a/pyperformance/data-files/benchmarks/bm_sympy/requirements.txt +++ b/pyperformance/data-files/benchmarks/bm_sympy/requirements.txt @@ -1,2 +1,2 @@ -mpmath==1.2.1 -sympy==1.8 +mpmath==1.3.0 +sympy==1.14.0 diff --git a/pyperformance/data-files/benchmarks/bm_tomli_loads/requirements.txt b/pyperformance/data-files/benchmarks/bm_tomli_loads/requirements.txt index 1d0cc148..d678504b 100644 --- a/pyperformance/data-files/benchmarks/bm_tomli_loads/requirements.txt +++ b/pyperformance/data-files/benchmarks/bm_tomli_loads/requirements.txt @@ -1 +1 @@ -tomli==2.0.1 +tomli==2.1.0 diff --git a/pyperformance/data-files/benchmarks/bm_tornado_http/requirements.txt b/pyperformance/data-files/benchmarks/bm_tornado_http/requirements.txt index f60a887b..123baac5 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.6 +tornado==6.6.1 diff --git a/pyperformance/data-files/benchmarks/bm_xdsl/pyproject.toml b/pyperformance/data-files/benchmarks/bm_xdsl/pyproject.toml index ad004ffe..72b0aa45 100644 --- a/pyperformance/data-files/benchmarks/bm_xdsl/pyproject.toml +++ b/pyperformance/data-files/benchmarks/bm_xdsl/pyproject.toml @@ -1,7 +1,7 @@ [project] name = "pyperformance_bm_xdsl" requires-python = ">=3.10" -dependencies = ["pyperf", "xdsl==0.46.0"] +dependencies = ["pyperf", "xdsl"] urls = {repository = "https://github.com/python/pyperformance"} dynamic = ["version"] diff --git a/pyperformance/data-files/benchmarks/bm_xdsl/requirements.txt b/pyperformance/data-files/benchmarks/bm_xdsl/requirements.txt index 09ead47e..5d768f8a 100644 --- a/pyperformance/data-files/benchmarks/bm_xdsl/requirements.txt +++ b/pyperformance/data-files/benchmarks/bm_xdsl/requirements.txt @@ -1 +1 @@ -xdsl==0.54.3 +xdsl==0.76.0 diff --git a/pyperformance/data-files/benchmarks/bm_yaml/requirements.txt b/pyperformance/data-files/benchmarks/bm_yaml/requirements.txt index cf39afa6..86d967ea 100644 --- a/pyperformance/data-files/benchmarks/bm_yaml/requirements.txt +++ b/pyperformance/data-files/benchmarks/bm_yaml/requirements.txt @@ -1 +1 @@ -pyyaml==6.0.1 +pyyaml==6.0.3 diff --git a/pyperformance/requirements/requirements.txt b/pyperformance/requirements/requirements.txt index 825c212c..78a82df6 100644 --- a/pyperformance/requirements/requirements.txt +++ b/pyperformance/requirements/requirements.txt @@ -6,9 +6,9 @@ # packaging>=24.1 # via -r requirements.in -psutil==7.0.0 +psutil==7.2.2 # via # -r requirements.in # pyperf -pyperf==2.10.0 +pyperf==2.11.0 # via -r requirements.in From c9df6611f57cf1cdcd45fef3db5635b330adb438 Mon Sep 17 00:00:00 2001 From: Stan Ulbrych Date: Fri, 20 Nov 2026 18:45:23 +0000 Subject: [PATCH 2/2] Keep pins mutually installable --- doc/changelog.rst | 2 +- .../data-files/benchmarks/bm_docutils/requirements.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/changelog.rst b/doc/changelog.rst index 29de493d..028610c7 100644 --- a/doc/changelog.rst +++ b/doc/changelog.rst @@ -8,7 +8,7 @@ Version 1.15.0 (unreleased) * Bump genshi to 0.7.12 (fixes ``TypeError`` on Python 3.15) * Bump the pinned dependencies of most benchmarks to current releases, including Django 5.2, SQLAlchemy 2.1, dulwich 1.2, SymPy 1.14, Mako 1.4, - docutils 0.23, sqlglot 30, websockets 17, Sphinx 9.0 and dask 2026.8. + docutils 0.22, sqlglot 30, websockets 17, Sphinx 9.0 and dask 2026.8. * Port the SQLAlchemy benchmarks to the SQLAlchemy 2 API and drop the ``greenlet`` requirement * ``mako``: use the pure Python implementation of ``markupsafe``, which Mako diff --git a/pyperformance/data-files/benchmarks/bm_docutils/requirements.txt b/pyperformance/data-files/benchmarks/bm_docutils/requirements.txt index 2f3b989f..dcb6d0f0 100644 --- a/pyperformance/data-files/benchmarks/bm_docutils/requirements.txt +++ b/pyperformance/data-files/benchmarks/bm_docutils/requirements.txt @@ -1 +1 @@ -docutils==0.23 +docutils==0.22.4