]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Add explicit multi-threaded tests and support free-threaded build
authorLysandros Nikolaou <lisandrosnik@gmail.com>
Fri, 26 Sep 2025 14:16:41 +0000 (10:16 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Thu, 2 Oct 2025 16:14:28 +0000 (12:14 -0400)
commit456727df50c7dc29ddc31c6f67c1be21771386fa
tree90c13fe3cfea3ed56753ed9cc5ee39c0949f00af
parent29db79c71f4681a59ac3befbba34fcb90e91bc88
Add explicit multi-threaded tests and support free-threaded build

Implemented initial support for free-threaded Python by adding new tests
and reworking the test harness and GitHub Actions to include Python 3.13t
and Python 3.14t in test runs. Two concurrency issues have been identified
and fixed: the first involves initialization of the ``.c`` collection on a
``FromClause``, a continuation of :ticket:`12302`, where an optional mutex
under free-threading is added; the second involves synchronization of the
pool "first_connect" event, which first received thread synchronization in
:ticket:`2964`, however under free-threading the creation of the mutex
itself runs under the same free-threading mutex. Initial pull request and
test suite courtesy Lysandros Nikolaou.

py313t: yes
py314t: yes
Fixes: #12881
Closes: #12882
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/12882
Pull-request-sha: 53d65d96b979b1afbdb49e6394979cfd598c9a34

Co-authored-by: Mike Bayer <mike_mp@zzzcomputng.com>
Change-Id: I2e4f2e9ac974ab6382cb0520cc446b396d9680a6
24 files changed:
.github/workflows/create-wheels.yaml
.github/workflows/run-on-pr.yaml
.github/workflows/run-test.yaml
doc/build/changelog/unreleased_20/12881.rst [new file with mode: 0644]
lib/sqlalchemy/event/attr.py
lib/sqlalchemy/sql/selectable.py
lib/sqlalchemy/testing/profiling.py
lib/sqlalchemy/testing/requirements.py
lib/sqlalchemy/testing/suite/test_reflection.py
lib/sqlalchemy/util/__init__.py
lib/sqlalchemy/util/compat.py
lib/sqlalchemy/util/concurrency.py
lib/sqlalchemy/util/langhelpers.py
pyproject.toml
setup.py
test/aaa_profiling/test_memusage.py
test/aaa_profiling/test_threading.py [new file with mode: 0644]
test/base/test_events.py
test/base/test_tutorials.py
test/engine/test_pool.py
test/profiles.txt
test/requirements.py
test/sql/test_selectable.py
tox.ini