]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Add explicit multi-threaded tests and support free-threaded build workflow_test_freethreading
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 14:08:01 +0000 (10:08 -0400)
commitb8ab31e7f1e341fa19dca4fc8bb5bf400855b835
treed3a1124f308a97cec34382908dd226877799cf8f
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
23 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
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