]> 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 17:59:56 +0000 (13:59 -0400)
commita0b02abfda75fd3f85cd4d402eed7f3abf58d5dd
treed2364bd86c12d9f7d0f1cb69ea134c3f3a3ac0f1
parent44a61e2e5671eca0671a0f1d7180f0bb036d9340
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
(cherry picked from commit 456727df50c7dc29ddc31c6f67c1be21771386fa)
21 files changed:
.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
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