]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/log
thirdparty/sqlalchemy/sqlalchemy.git
7 weeks agoMerge "Fix return type hint for `Query.get()`" into rel_2_0
Michael Bayer [Wed, 10 Dec 2025 20:44:44 +0000 (20:44 +0000)] 
Merge "Fix return type hint for `Query.get()`" into rel_2_0

7 weeks agocleaup test pipeline
Federico Caselli [Wed, 10 Dec 2025 20:06:44 +0000 (21:06 +0100)] 
cleaup test pipeline

Change-Id: Ic29289686139f27df3c3802f20ca4cbd2105778c

7 weeks agoFix wheel pipeline
Federico Caselli [Wed, 10 Dec 2025 20:02:34 +0000 (21:02 +0100)] 
Fix wheel pipeline

Change-Id: I97b47160b619a454e421a94396a2fb8116dada6e

7 weeks agoFix return type hint for `Query.get()`
Séamus Ó Ceanainn [Wed, 10 Dec 2025 17:14:25 +0000 (12:14 -0500)] 
Fix return type hint for `Query.get()`

<!-- Provide a general summary of your proposed changes in the Title field above -->

<!-- Describe your changes in detail -->

`Query[_T].get(...)` should return `Optional[_T]` instead of `Optional[Any]`. This is typed correctly when migrating to  `Session.get(_T, ...)`. By typing the legacy `Query.get(...)` call first, it should make migrations easier on developers, as it splits up the type checking improvements (and subsequent errors which may be discovered) from the `Query.get()`
 to `Session.get()` migration.

<!-- go over following points. check them with an `x` if they do apply, (they turn into clickable checkboxes once the PR is submitted, so no need to do everything at once)

-->

This pull request is:

- [x] A documentation / typographical / small typing error fix
- Good to go, no issue or tests are needed
- [ ] A short code fix
- please include the issue number, and create an issue if none exists, which
  must include a complete example of the issue.  one line code fixes without an
  issue and demonstration will not be accepted.
- Please include: `Fixes: #<issue number>` in the commit message
- please include tests.   one line code fixes without tests will not be accepted.
- [ ] A new feature implementation
- please include the issue number, and create an issue if none exists, which must
  include a complete example of how the feature would look.
- Please include: `Fixes: #<issue number>` in the commit message
- please include tests.

**Have a nice day!**

Closes: #13028
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/13028
Pull-request-sha: 38ec0c3ae072f8c7b62134dd017579a6a249219f

Change-Id: I7ae8e59bc0bd0a25c65de3804d60f6c2b6f50151
(cherry picked from commit 9cd9b6b5896333f779f484c73f3c1119448305b5)

7 weeks agoMerge "additional check for dc test" into rel_2_0
Michael Bayer [Wed, 10 Dec 2025 14:34:53 +0000 (14:34 +0000)] 
Merge "additional check for dc test" into rel_2_0

7 weeks agoadd length, take two
Mike Bayer [Wed, 10 Dec 2025 14:19:23 +0000 (09:19 -0500)] 
add length, take two

followup to 292aa19698326793003

Change-Id: I283059eaf747c722b871afa55aaeaa2889862584
(cherry picked from commit 668ea5b7384297236330ead78919889b4473807f)

7 weeks agoadd length
Mike Bayer [Wed, 10 Dec 2025 13:38:03 +0000 (08:38 -0500)] 
add length

new tests in e4a802f99a for issue #12858 forgot to add string
length for String leading to MySQL failures

Change-Id: I7642ee8581da09a3a25236dacdc441effee21931
(cherry picked from commit 292aa19698326793003c0ebb2c75f6863d039573)

7 weeks agoadditional check for dc test
Federico Caselli [Tue, 9 Dec 2025 21:40:02 +0000 (22:40 +0100)] 
additional check for dc test

Change-Id: Ibf39a4c413b445abd8825ded900ac451ab9de9a2
(cherry picked from commit 3cad9e372b98b96e9493ad383b2e44301b4b58f4)

7 weeks agoVersion 2.0.46 placeholder
Mike Bayer [Tue, 9 Dec 2025 21:06:37 +0000 (16:06 -0500)] 
Version 2.0.46 placeholder

7 weeks ago- 2.0.45 rel_2_0_45
Mike Bayer [Tue, 9 Dec 2025 20:54:35 +0000 (15:54 -0500)] 
- 2.0.45

7 weeks agoMerge "Factor out constraints into separate methods" into rel_2_0
Michael Bayer [Tue, 9 Dec 2025 20:45:35 +0000 (20:45 +0000)] 
Merge "Factor out constraints into separate methods" into rel_2_0

7 weeks agoFactor out constraints into separate methods
G Allajmi [Tue, 9 Dec 2025 19:13:52 +0000 (14:13 -0500)] 
Factor out constraints into separate methods

Fixed issue where PostgreSQL dialect options such as ``postgresql_include``
on :class:`.PrimaryKeyConstraint` and :class:`.UniqueConstraint` were
rendered in the wrong position when combined with constraint deferrability
options like ``deferrable=True``. Pull request courtesy G Allajmi.

Fixes: #12867
Closes: #13003
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/13003
Pull-request-sha: 1a9216062f12cba2695b0b4a1407e092556c2305

Change-Id: I8c55d8faae25d56ff63c9126d569c01d8ee6c7dd
(cherry picked from commit 9fe3c3cd30bd7d4afc877bb2243ba7679ebe185d)

7 weeks agoFix adding property to mapper before mapping is complete
G Allajmi [Mon, 8 Dec 2025 13:03:49 +0000 (08:03 -0500)] 
Fix adding property to mapper before mapping is complete

Fixed issue where calling :meth:`.Mapper.add_property` within mapper event
hooks such as :meth:`.MapperEvents.instrument_class`,
:meth:`.MapperEvents.after_mapper_constructed`, or
:meth:`.MapperEvents.before_mapper_configured` would raise an
``AttributeError`` because the mapper's internal property collections were
not yet initialized. The :meth:`.Mapper.add_property` method now handles
early-stage property additions correctly, allowing properties including
column properties, deferred columns, and relationships to be added during
mapper initialization events.  Pull request courtesy G Allajmi.

Fixes: #12858
Closes: #13023
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/13023
Pull-request-sha: fa9a0ae4bb07819307e6c9d6ec5fd4c9706bf67e

Change-Id: Ibb794c401102a8d23d157b40353f272d5735b49a
(cherry picked from commit e4a802f99a0bca813dd29e8dc88bb5e5aaddff93)

7 weeks agoupdate cibuildwheel to ensure python 3.14 is supported
Federico Caselli [Mon, 8 Dec 2025 20:12:16 +0000 (21:12 +0100)] 
update cibuildwheel to ensure python 3.14 is supported

Change-Id: Ic520ae7084dcc0660da0d70a0c33de251395ec50
(cherry picked from commit f58ea194d5190859baef66c183fa0228f629830c)

7 weeks agofix typo
Mike Bayer [Mon, 8 Dec 2025 16:40:34 +0000 (11:40 -0500)] 
fix typo

Change-Id: I5a440f9d3a8bb5afb45b0af4d9f1a112255d5f96
(cherry picked from commit c7bd25650adf6babc8f39eb61b42eb626d92261f)

7 weeks agouse plain 3.14 for test runs
Mike Bayer [Mon, 8 Dec 2025 14:14:26 +0000 (09:14 -0500)] 
use plain 3.14 for test runs

this was already applied to main previously

Change-Id: Id0d6a16e3be645ecf30cdbd238b4a9867791fd79

7 weeks agofix / modernize short_selects example
Mike Bayer [Fri, 5 Dec 2025 22:41:56 +0000 (17:41 -0500)] 
fix / modernize short_selects example

Fixed the "short_selects" performance example where the cache was being
used in all the examples, making it impossible to compare performance with
and without the cache.   Less important comparisons like "lambdas" and
"baked queries" have been removed.

Change-Id: Ia55391ba23e01d2ed136c84f9c34bb16689ce10e
(cherry picked from commit 66d55b51992a463beef47212992e5b2914f9e586)

8 weeks agoAdd a test for #13021
Mike Bayer [Wed, 3 Dec 2025 19:48:08 +0000 (14:48 -0500)] 
Add a test for #13021

Confirmed the upstream fix for [1] given at [2] solves the issue
illustrated here, this patch adds a test for this case as our
existing tests did not catch this error in python 3.14.1.

Fixes: #13021
Change-Id: Ie6827279ccf2b2cb2e0fe6029aafdcfefc790f1f
(cherry picked from commit 133f14dabed44f7398039e2556bf9b7107f3922e)

8 weeks agoMerge "run sentinel server side fns outside of VALUES" into rel_2_0
Michael Bayer [Wed, 3 Dec 2025 16:56:18 +0000 (16:56 +0000)] 
Merge "run sentinel server side fns outside of VALUES" into rel_2_0

8 weeks agorun sentinel server side fns outside of VALUES
Mike Bayer [Mon, 1 Dec 2025 20:11:50 +0000 (15:11 -0500)] 
run sentinel server side fns outside of VALUES

Fixed the structure of the SQL string used for the
:ref:`engine_insertmanyvalues` feature when an explicit sequence with
``nextval()`` is used. The SQL function invocation for the sequence has
been moved from being rendered inline within each tuple inside of VALUES to
being rendered once in the SELECT that reads from VALUES. This change
ensures the function is invoked in the correct order as rows are processed,
rather than assuming PostgreSQL will execute inline function calls within
VALUES in a particular order. While current PostgreSQL versions appear to
handle the previous approach correctly, the database does not guarantee
this behavior for future versions.

Fixes: #13015
Change-Id: Ia0a2a4e8f89e21852d7cb550dfa5d9ea9447b590
(cherry picked from commit c5d09f5ed4b4e37cfdd033026e2f67382ee9fcb3)

8 weeks ago[typing] Fix type error when passing Mapped columns to values()
Yossi [Mon, 1 Dec 2025 17:06:12 +0000 (12:06 -0500)] 
[typing] Fix type error when passing Mapped columns to values()

This adjusts the _DMLOnlyColumnArgument type to be a more
focused _OnlyColumnArgument type where we also add a more tightly
focused coercion, while still allowing ORM attributes to be used
as arguments.

Co-authored-by: Mike Bayer <mike_mp@zzzcomputing.com>
Closes: #13012
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/13012
Pull-request-sha: 5ebb402c686abf1090e5b83e3489dfca4908efdf

Change-Id: I8bbccaf556ec5ecb2f5cfdd2030bcfa4eb5ce125
(cherry picked from commit 40c2400af7d44a528358ea1d73c275a85bb75616)

8 weeks agoType postgresql.ExcludeConstraint()
Denis Laxalde [Mon, 1 Dec 2025 10:43:18 +0000 (05:43 -0500)] 
Type postgresql.ExcludeConstraint()

Related to #6810.

Closes: #13011
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/13011
Pull-request-sha: 4a212cad1b231629ae4e3d6866c9603662a197a2

Change-Id: If5d91e06b6c0afc11adc02bb0c0d5ce97e53203c
(cherry picked from commit 4f87f4d9265adf826bd10b3b764405c3b871b5d8)

8 weeks agoadd python 3.14 wheels + free threaded
Mike Bayer [Mon, 1 Dec 2025 20:22:54 +0000 (15:22 -0500)] 
add python 3.14 wheels + free threaded

the freethreadeds are in a separate task so if they fail,
we still have wheels published

Change-Id: Ie28483cc379cf3db01afe2a2b4c475a9fbfbb9e5

2 months agoadditional fixes re: mariadb innodb etc.
Mike Bayer [Sat, 29 Nov 2025 03:47:40 +0000 (22:47 -0500)] 
additional fixes re: mariadb innodb etc.

fix a bunch of side effects that were not tested in the gerrit
phase because we run with --backendonly

Change-Id: Iebcedb962e6e11dd247b0da5f309a71db711694c
(cherry picked from commit 2169a2950479873cd42d62c3f81a6bd7caa8aaeb)

2 months agodrop a 400 ton anvil on oracle 23c
Mike Bayer [Thu, 27 Nov 2025 06:22:38 +0000 (01:22 -0500)] 
drop a 400 ton anvil on oracle 23c

this DB is extremely erratic in being able to connect.   Add
a brute force connection retrier to all engines everywhere
(which for oracledb we can fortunately use their built-in feature
that also works).
This actually works and I can see it pausing under load, reconnecting,
and succeeding.  the problem is that absolutely every engine everywhere
needs this routine otherwise an engine without a retrier in it will
crash.    That then necessitates digging into testing_engine(),
making sure testing_engine() is used everywhere an engine that's going
to connect is used, then dealing with the fallout from that.

We also simplify some older workarounds for cx_oracle and
hack into config/provision to make oracledb seem like the primary
DBAPI for most tests.

testing_engine has been completely overhauled, making use of a new
post_configure_testing_engine() hook which moves and refines
the SQLite pool sharing and savepoint logic all into sqlite/provision.py
and also allows for cx_oracle to apply a retry event handler.

Change-Id: I4ea4c523effb878290d28b94d8925eb32fc5ae3b
(cherry picked from commit af768d0c3c33fc2dfc6dfc7ce847dd88bd31bc06)

2 months agohappy mypy day; backport the bump to pytest 9
Mike Bayer [Fri, 28 Nov 2025 16:55:36 +0000 (11:55 -0500)] 
happy mypy day; backport the bump to pytest 9

Change-Id: I5beb5770e916b41438720c2d4e474eef1ba6598c

2 months agostop using MyISAM; more oracle struggles
Mike Bayer [Wed, 26 Nov 2025 06:36:57 +0000 (01:36 -0500)] 
stop using MyISAM; more oracle struggles

getting some fails on mariadb12 and likely 11 which appear to
be related to calling in MyISAM, which is not used in
modern mysql/mariadb.   see if we can just remove this whole
thing and rely on default engines for mariadb/mysql.

this change also removes the "ignore errors" part of the
run deletes for the TablesTest fixture, which was resulting
in compound failures, and apparently a lot of tests were relying
on it skipping nonexistent tables.   rather than check for that
we should just improve the tests and probably increase use of
pytest style fixtures overall.

this change also identifies and fixes that memusage_w_backend
tests were running for all backends with a tag like
py314_mysql_backendonly; the memusage tests should basically
never be run as part of the whole suite since they are entirely
unreliable within a full scale test run.

dialect suite tests are also further broken out into those where
every driver should be exercised (i.e. __backend__, for tests that
test datatypes going out and coming back from the database as well
as identity/autoincrement kinds of tests) vs. those where only
one driver per backend is needed (i.e. __sparse_driver_backend__,
for tests like reflection, DDL, CTEs, etc.).

we are also trying to get a --low-connections option that actually
works.  changed this so that the testing reaper aggressively disposes
the "global" engines (one per backend / driver) after test classes
are done and before any testing_engine() call.   This definitely
works, however some monitoring with PG shows the number of connections
still has brief bursts for some reason.   it should be much more
effective than before though as oracle 23/26 really does not handle
more than a few connections.

this change reverts oracle to oracle18c for now in setup.cfg;
further work will be needed to determine if oracle23c can be
run with this test suite

Change-Id: Id87d0ea15155c452615a7edeb9d434c8e55151e7
(cherry picked from commit 88028954576a8d7e772160d74b14da62c0b4fd43)

2 months agore-enable vectore test in oracle
Federico Caselli [Tue, 25 Nov 2025 21:48:01 +0000 (22:48 +0100)] 
re-enable vectore test in oracle

Change-Id: I382a20027f36f32617d2680332873f1b7d5bcee6
(cherry picked from commit 09ce4d07540628dfac84bf500e9bbddbca48dc9f)

2 months agotest oracle 23c, mariadb12; reduce backend use
Mike Bayer [Tue, 25 Nov 2025 00:33:18 +0000 (19:33 -0500)] 
test oracle 23c, mariadb12; reduce backend use

one particular vector test wont run on oracle 23c free, so
just disable it.

added better skips for the rest of the vector tests and
fixed a deprecation issue.

this will be the first run on the new oracle23 on CI so we'll have to
see how this goes.

Also adjust for mariabdb12 being overly helpful with regards
to stale row updates.

as we are having trouble getting 23c to pass throug transaction
tests, i noted we have an explosion of tests due to the multiple
drivers, so this patch introduces __sparse_driver_backend__
for all tests where we want variety of
database server but there's no need to test every driver.
This should dramatically reduce the size of the test suite run

Change-Id: Ic8d3eb0a60e76b4c54c6bb4a721f90c81ede782b
(cherry picked from commit 8ce47663c238b230400d3603fa403eb5fed227dc)

2 months agobreak up test_update_delete_where into several files
Mike Bayer [Fri, 21 Nov 2025 18:44:31 +0000 (13:44 -0500)] 
break up test_update_delete_where into several files

it's grown to 3K lines and i need to add more tests

Change-Id: Ic55c50446d57789e3e3cc58e6a99239c1bfa8328
(cherry picked from commit 871e66e058fafae8f54d68359370c022d51059e1)

2 months agouse zimports 0.7.0
Mike Bayer [Thu, 20 Nov 2025 18:44:09 +0000 (13:44 -0500)] 
use zimports 0.7.0

this adds pyproject.toml support

Change-Id: I6d00fc912f25405542326c3d0ffcfb1969cea24b
(cherry picked from commit 708a0360b17b6cae0135f1d6143b0ee1e88e885c)

2 months agoFix type hint for with_for_update() to support tuples of table classes
Shamil [Wed, 19 Nov 2025 13:02:28 +0000 (08:02 -0500)] 
Fix type hint for with_for_update() to support tuples of table classes

Fixed typing issue where :meth:`.Select.with_for_update` would not support
lists of ORM entities in the :paramref:`.Select.with_for_update.of`
parameter. Pull request courtesy Shamil.

Fixes: #12730
Closes: #12988
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/12988
Pull-request-sha: 41a38bfe38d8b66da853012e7165cc0cacf7f28a

Change-Id: I61d60a4f4d2b16037da8d5f30e33f5d74fa47374
(cherry picked from commit a057c474bf84ccd0508b89aa5428f45c9a644ee3)

2 months agopropagate _scalar_type() for SelectStatementGrouping
Mike Bayer [Tue, 18 Nov 2025 20:10:05 +0000 (15:10 -0500)] 
propagate _scalar_type() for SelectStatementGrouping

Fixed issue where using the :meth:`.ColumnOperators.in_` operator with a
nested :class:`.CompoundSelect` statement (e.g. an ``INTERSECT`` of
``UNION`` queries) would raise a :class:`NotImplementedError` when the
nested compound select was the first argument to the outer compound select.
The ``_scalar_type()`` internal method now properly handles nested compound
selects.

Fixes: #12987
Change-Id: I6aa1b38863588d371bbac74b3531b99ccd5fcaec
(cherry picked from commit 42710c9220f897487710424981b81a69a7da5def)

2 months agoupdate lint setup
Mike Bayer [Mon, 17 Nov 2025 21:32:54 +0000 (16:32 -0500)] 
update lint setup

We are stuck on flake8 because we rely on many plugins with
specific behaviors.  The situation has calcified where:

1. the whole world uses ruff
2. nobody cares about import order linting or all the other stuff
   we do, and/or similar but not quite the same things are embedded
   deeply into ruff which would require us giving up a lot of our
   standards (like isort)
3. flake8 is absolutely never going to support pyproject.
4. flake8-pyproject works for this

beyond that, for t string support we want to make it easy
to get onto py3.14, so here we update black to the latest which
appears to fix some missing symbols for py3.14 t strings.

we should also migrate the remaining sqlalchemy test config
from setup.cfg to pyproject.toml but that should likely be
2.1 only

Change-Id: I896a7c839148d0ef516728c73baddc8eddf5ee96
(cherry picked from commit f6714c8e090b9dd84ac4256ed74eefc1fe9cbddc)

2 months agoadd highlight for python3 over api doc sections
Mike Bayer [Sun, 16 Nov 2025 15:55:54 +0000 (10:55 -0500)] 
add highlight for python3 over api doc sections

the pycon+sql highlight seems to take effect for docstrings
now in sphinx 8 or whatever.

Fixes: #12981
Change-Id: Ifab2c66d6adddf3ce5336f244653a336ac0d2ce9
(cherry picked from commit 5af013026fe995bb7abd95005913026ea13d020c)

2 months agobump nox to latest main + fix
Mike Bayer [Sat, 15 Nov 2025 16:41:34 +0000 (11:41 -0500)] 
bump nox to latest main + fix

apparently 2.0 was behind so this copies
the files with 2.0-specific modifications from the below change id

add pyv to file template; use = for all custom args

adding "test/" to pytest doesnt work because then we can't indicate
a specific set of test files.  use = for all sqlalchemy-custom
parameters instead to avoid [1]

[1] https://github.com/pytest-dev/pytest/issues/13913

Change-Id: I9eb5bbfac734fcb145fcf3ae58fcc55df6bb6e71

2 months agoAdd Mimer SQL to list of external dialects (#12969)
Fredrik Ålund [Wed, 12 Nov 2025 23:05:21 +0000 (00:05 +0100)] 
Add Mimer SQL to list of external dialects (#12969)

(cherry picked from commit d96c04950d6a1a72961a097289f7fd850319e3d0)

2 months agoTyping: fix type of func.coalesce when used with hybrid properties
Yannick PÉROUX [Tue, 4 Nov 2025 17:58:03 +0000 (12:58 -0500)] 
Typing: fix type of func.coalesce when used with hybrid properties

Fixed typing issue where :class:`.coalesce` would not return the correct
return type when a nullable form of that argument were passed, even though
this function is meant to select the non-null entry among possibly null
arguments.  Pull request courtesy Yannick PÉROUX.

Closes: #12963
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/12963
Pull-request-sha: 05d0d9784d4497fb3bfee540fbc51747c1767c90

Change-Id: Ife83a384ea57faf446c1fdb542df14627348f40f
(cherry picked from commit d160cb5314239ef9487c84aa5173e946d57804fd)

2 months agofeat: Support MySQL FOR SHARE locking syntax.
JetDrag [Wed, 5 Nov 2025 03:47:02 +0000 (22:47 -0500)] 
feat: Support MySQL FOR SHARE locking syntax.

Added support for MySQL 8.0.1 + ``FOR SHARE`` to be emitted for the
:meth:`.Select.with_for_uddate` method, which offers compatibility with
``NOWAIT`` and ``SKIP LOCKED``.  The new syntax is used only for MySQL when
version 8.0.1 or higher is detected. Pull request courtesy JetDrag.

Fixes: #10134
Closes: #12964
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/12964
Pull-request-sha: 03d5e37cfda5da9dab8ae00aa682521f8ab9190b

Change-Id: Iafb7a24363284edcfeead94a348f50a470a88403
(cherry picked from commit 59afd08a5206c69ce47c138c6e4f18b2c40e1ef6)

2 months agodont fail if imports not set up
Mike Bayer [Mon, 10 Nov 2025 13:43:10 +0000 (08:43 -0500)] 
dont fail if imports not set up

this is to help with vscode extensions

Change-Id: I4dc6c07bec8158c82e376b3399d6e0e104360bf2
(cherry picked from commit 828bedbe3ab096d30ade65e387feaffe6c1207e5)

2 months agoadd missing changelog for #12954
Mike Bayer [Tue, 4 Nov 2025 21:56:34 +0000 (16:56 -0500)] 
add missing changelog for #12954

Change-Id: I9b779230c236884dc58f79c97e65bd6c983b252e
(cherry picked from commit 1bddbd9e58a2835dbc3539ffc38a93a4cb85a105)

2 months agodouble guard import issue
Mike Bayer [Tue, 4 Nov 2025 14:56:39 +0000 (09:56 -0500)] 
double guard import issue

3.13 has an import issue, 3.14 has a "hey why are you ignoring here"
issue, solve them both

this then cascaded into zimport uncooperativeness so had to
fix that and put out 0.6.3, so this becomes more of a thing

Change-Id: I5c01e48af2af14be17c3e5f2a53e7913444b98eb
(cherry picked from commit f4c08c07d0ea4d18d384925f4c7d46f05566f42b)

2 months agoclarify Core / ORM insert parameter behaviors
Mike Bayer [Tue, 4 Nov 2025 14:13:45 +0000 (09:13 -0500)] 
clarify Core / ORM insert parameter behaviors

it seems to have gotten lost in our newer docs that we're looking
at the first dict only for core insert.  add sections to both
INSERT tutorials explaining this difference

references: #12962
Change-Id: Id2e6c7e7db57fba6aa7838d5c3c65dea1939445a
(cherry picked from commit 7beb71d208955f8badef270c67eb47f3caac1f96)

2 months agoAdd order by clause to dialect tests to ensure expected result order
Pat Buxton [Mon, 3 Nov 2025 14:49:33 +0000 (09:49 -0500)] 
Add order by clause to dialect tests to ensure expected result order

<!-- Provide a general summary of your proposed changes in the Title field above -->

### Description
Failing for Starrocks dialect currently without overrides, the amended dialect tests require an order by clause to ensure the expected result.

### Checklist
<!-- go over following points. check them with an `x` if they do apply, (they turn into clickable checkboxes once the PR is submitted, so no need to do everything at once)

-->

This pull request is:

- [x] A short code fix
- please include the issue number, and create an issue if none exists, which
  must include a complete example of the issue.  one line code fixes without an
  issue and demonstration will not be accepted.
- Please include: `Fixes: #<issue number>` in the commit message
- please include tests.   one line code fixes without tests will not be accepted.

Fixes https://github.com/sqlalchemy/sqlalchemy/issues/12956

Closes: #12957
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/12957
Pull-request-sha: 271a014896e0c3d994112dec19029261d4507b6d

Change-Id: Ib8f5bc1caf014026071b83f57011c43c02043746
(cherry picked from commit a87faba35a65563447c8204cc47eb37ab47e216e)

2 months agouse the default driver for sparse backend
Mike Bayer [Sat, 1 Nov 2025 13:56:18 +0000 (09:56 -0400)] 
use the default driver for sparse backend

the memusage tests use sparse_backend but should use the
main driver in a set; they were using the pysqlite_numeric
dialect which is not a real dialect and apparently runs
dramatically slower for the memusage tests since it generates
more memory artifacts.

Change-Id: Icf19ac1a3cae862a48ddcec565079c960b8ac2b7
(cherry picked from commit 725d1a19b4e638c4a5ef40534397423c6c016614)

2 months agofix sqlite regex for quoted fk, pk names
Mike Bayer [Sat, 1 Nov 2025 02:57:28 +0000 (22:57 -0400)] 
fix sqlite regex for quoted fk, pk names

Fixed issue where SQLite dialect would fail to reflect constraint names
that contained uppercase letters or other characters requiring quoting. The
regular expressions used to parse primary key, foreign key, and unique
constraint names from the ``CREATE TABLE`` statement have been updated to
properly handle both quoted and unquoted constraint names.

Fixes: #12954
Change-Id: If5c24f536795e5db867d857242013610a04638fc
(cherry picked from commit cdaf1824316ba6fa7b52164b50cd9fd4aeb2c41f)

2 months agoensure util.get_annotations() is used
Mike Bayer [Fri, 31 Oct 2025 15:51:37 +0000 (11:51 -0400)] 
ensure util.get_annotations() is used

Fixed issue in Python 3.14 where dataclass transformation would fail when
a mapped class using :class:`.MappedAsDataclass` included a
:func:`.relationship` referencing a class that was not available at
runtime (e.g., within a ``TYPE_CHECKING`` block). This occurred when using
Python 3.14's :pep:`649` deferred annotations feature, which is the
default behavior without a ``from __future__ import annotations``
directive.

Fixes: #12952
Change-Id: I32f0adba00c32f5bf98fe2880dda1b96a7774d07
(cherry picked from commit 03dbd830e174685964191f739ea784f51c97d6b3)

3 months agoMerge "Add docs for using Psycopg 3 connection pooling" into rel_2_0
Michael Bayer [Wed, 29 Oct 2025 15:38:55 +0000 (15:38 +0000)] 
Merge "Add docs for using Psycopg 3 connection pooling" into rel_2_0

3 months agofix session cursor result tip
Mike Bayer [Wed, 29 Oct 2025 12:08:03 +0000 (08:08 -0400)] 
fix session cursor result tip

in 2.0, we are usually not returning CursorResult for
Session.execute().

References: #12813
Change-Id: I19049b57790b5429ce7890c86e87b93c07a3f1d2
(cherry picked from commit e2bda66b5115cc628ebce9423877586c9e817feb)

3 months agomissed yet another force dereference
Mike Bayer [Tue, 28 Oct 2025 23:41:10 +0000 (19:41 -0400)] 
missed yet another force dereference

Change-Id: I75204886b7a48a6148e47e18d28a0465f908c09d
(cherry picked from commit b8c5fd8588aeaea8077560b68c0ce85bfd2dfc3f)

3 months agofollowup to 368f5ac6668456 2
Mike Bayer [Tue, 28 Oct 2025 23:39:06 +0000 (19:39 -0400)] 
followup to 368f5ac6668456 2

Change-Id: I35e212aba32b2758a8bf6c01455f624910b4df17
(cherry picked from commit 2845e8418db95b4950a4df0d7933a419ca0e6f9e)

3 months agoadditional followup to368f5ac6668456609cf5f862
Mike Bayer [Tue, 28 Oct 2025 22:44:55 +0000 (18:44 -0400)] 
additional followup to368f5ac6668456609cf5f862

Change-Id: I689a52c22efe8cff5ef80fe308673b2cb1fe7684
(cherry picked from commit df558a375339abeaeb416e353fe6f1bdf05e2a32)

3 months agoAdd docs for using Psycopg 3 connection pooling
chrispy [Fri, 24 Oct 2025 21:08:31 +0000 (17:08 -0400)] 
Add docs for using Psycopg 3 connection pooling

Updates documentation to describe how to use Psycopg 3 connection
pooling in SQLAlchemy. This is a follow-up to discussion #12522.

References: #12522
Closes: #12540
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/12540
Pull-request-sha: 8abbcb6e863deb6e0cf077d5fa780a2be5792931

Change-Id: I11ded6f82852f354f8371051c4b68fd7bdd01997
(cherry picked from commit 6f2275d8051beb501af912d431672887baa26594)

3 months agotry not to rely on GC working at all for tests
Mike Bayer [Tue, 28 Oct 2025 20:20:54 +0000 (16:20 -0400)] 
try not to rely on GC working at all for tests

GC seems to be working in fewer cases across different interpreters,
so add a new step to force an InstanceState to act as though
it got dereferenced, for those cases where we have del'ed the object,
done a gc collect, and we know it should not be reachable.

Change-Id: Ie97af1d5739f8d5a24aabe1296f14ce99ec1b0e5
(cherry picked from commit 368f5ac6668456609cf5f862c0676108cef4bec8)

3 months agoMerge "rewrite pool subsecond test to use mocking" into rel_2_0
Michael Bayer [Tue, 28 Oct 2025 20:25:30 +0000 (20:25 +0000)] 
Merge "rewrite pool subsecond test to use mocking" into rel_2_0

3 months agodont even run 3.7 on github actions
Mike Bayer [Tue, 28 Oct 2025 20:24:36 +0000 (16:24 -0400)] 
dont even run 3.7 on github actions

the nox version that installs on 3.7 is too old for the things
we are doing with tags. just skip it

Change-Id: I0d53ff3ed715dd6f4188fe865ce9a2d70a285de0

3 months agoset nox min version only for newer sys python
Mike Bayer [Tue, 28 Oct 2025 19:22:45 +0000 (15:22 -0400)] 
set nox min version only for newer sys python

The min version here fails on github actions because the runners
there use the single version of python for the install, and the newer
nox is not available on older pythons like 3.7.

We probably dont need the min version anyway, as since we have just
switched to venv in 5e62ea65167c, the misinterpretation of
"python3.14t" doesn't seem to happen anyway.  however, all versions
of nox seem willing to install a 3.14t interpreter when 3.14 is
requested, and a 3.14t is sooner in the path.  does not seem to
happen the other way around though (e.g. when 3.14t is requested,
it does not use a 3.14)

Anyway, for better predictability leave a min nox version in place
where we can do so for now.

Change-Id: I93a2c2e71798f5a75d71cc63de54750ec13975a1
(cherry picked from commit 93968e2c9e0796a4ea2fc13582b2eec83371f008)

3 months agorewrite pool subsecond test to use mocking
Mike Bayer [Tue, 28 Oct 2025 14:03:09 +0000 (10:03 -0400)] 
rewrite pool subsecond test to use mocking

the timing here is too sensitive to play out reliably
on CI machines particularly free threaded, so mock the time()
callable instead and ensure with subsecond clock intervals
we do the right math

Change-Id: Icc203ae2298eb4b64e3b45f063811e9527278d0c
(cherry picked from commit 4147accbd2b70493c01df18fd0d4598c4e1cb72e)

3 months agouse the nox venv backend
Mike Bayer [Tue, 28 Oct 2025 18:06:14 +0000 (14:06 -0400)] 
use the nox venv backend

This backend seems to run from the start against the resolved
interpreter, which we want.   The virtualenv option, which is
the default, has the problem indicated at [1].

[1] https://github.com/wntrblm/nox/issues/1021

Change-Id: Ic10317c603e0556676b16ad314fe6e79ba9d0476
(cherry picked from commit 5e62ea65167c4d6d710cb475cf506284e9335cfb)

3 months agoensure PYTHONPATH is blanked out
Mike Bayer [Mon, 27 Oct 2025 15:12:44 +0000 (11:12 -0400)] 
ensure PYTHONPATH is blanked out

this is in the tox.ini file also.  without it, the tests
run from my local ./lib/ when I set PYTHONPATH on the
outside

Change-Id: I1ec88edc0e1aeafbfa95054ec4ccb30bcb22d55f
(cherry picked from commit 2bb963891b8bbc3b2ec67c848cb405596c8ca3f6)

3 months agoimprove sqlite reflection regex for unusual names/formats
Mike Bayer [Sat, 18 Oct 2025 20:43:22 +0000 (16:43 -0400)] 
improve sqlite reflection regex for unusual names/formats

A series of improvements have been made for reflection of CHECK constraints
on SQLite. The reflection logic now correctly handles table names
containing the strings "CHECK" or "CONSTRAINT", properly supports all four
SQLite identifier quoting styles (double quotes, single quotes, brackets,
and backticks) for constraint names, and accurately parses CHECK constraint
expressions containing parentheses within string literals using balanced
parenthesis matching with string context tracking.    Big thanks to
GruzdevAV for new test cases and implementation ideas.

Fixes: #12924
Change-Id: I0390ac334c98e934c7e0353f47c9f43204791af5
(cherry picked from commit 189907be93392246ed5948506f1ca3921b8379f0)

3 months agorequire nox 2025.10.16, remove python version workaround
Mike Bayer [Sat, 18 Oct 2025 20:05:14 +0000 (16:05 -0400)] 
require nox 2025.10.16, remove python version workaround

the workaround for [1] no longer works now that the fix has
been committed.  slightly surprising but just require that version
of nox and carry on

[1] https://github.com/wntrblm/nox/pull/999

Change-Id: I4b4031c3d3d02399f55f9750237de61e5e90d179
(cherry picked from commit e1f3b43ad8b45afca3a7a363a41103f5f468f461)

3 months agoMerge "add nox support (but dont switch out fully)" into rel_2_0
Michael Bayer [Tue, 21 Oct 2025 17:30:19 +0000 (17:30 +0000)] 
Merge "add nox support (but dont switch out fully)" into rel_2_0

3 months agoadd nox support (but dont switch out fully)
Mike Bayer [Mon, 29 Sep 2025 03:44:41 +0000 (23:44 -0400)] 
add nox support (but dont switch out fully)

This backports the nox change from main/2.1 so that we have full
nox support available for the 2.0 series, however does not modify
any existing docs or test systems.

A noxfile.py has been added to allow testing with nox.  This is a direct
port of 2.1's move to nox, however leaves the tox.ini file in place and
retains all test documentation in terms of tox.   Version 2.1 will move to
nox fully, including deprecation warnings for tox and new testing
documentation.

Change-Id: I66639991e1dc3db582e2ff13f9348a7d6241916e
(cherry picked from commit df899e94cf7ba18f4e7151ef173393be78c56c3f)
(also cherry-picked from 1577c1d15b)

3 months agoFix missing back_populates in Note.item relationship in example code (#12925)
krave1986 [Mon, 20 Oct 2025 20:06:31 +0000 (04:06 +0800)] 
Fix missing back_populates in Note.item relationship in example code (#12925)

Without back_populates, the subsequent code would not automatically populate Item.notes or generate the key, which contradicts what the documentation intends to demonstrate.

(cherry picked from commit 1220858a0c5e85d4600b249dc3ae9412e01608ad)

3 months agore-document 12915 as not fully fixed
Mike Bayer [Fri, 17 Oct 2025 12:57:10 +0000 (08:57 -0400)] 
re-document 12915 as not fully fixed

The ORM side of this issue can't be fixed without rewriting
.params() which will be 2.1 only, so clarify changelog

References: #12915
Change-Id: I2e524d5390241aa289786f524b6a51f39bc09876
(cherry picked from commit b8906e62ceb122949f5dc9f49b1174986b64d503)

3 months agoMerge "fully copy_internals for AnnotatedFromClause for straight cloned traverse...
Michael Bayer [Wed, 15 Oct 2025 20:56:23 +0000 (20:56 +0000)] 
Merge "fully copy_internals for AnnotatedFromClause for straight cloned traverse" into rel_2_0

3 months agoUpdate collection_api.rst (#12912)
krave1986 [Wed, 15 Oct 2025 19:37:10 +0000 (03:37 +0800)] 
Update collection_api.rst (#12912)

In the Dictionary Collections section, the example code incorrectly calls .items() on the dictionary but shows dictionary output instead of the items() method's actual return value.

(cherry picked from commit d0651bde134c0038596893766a31498b6a6c3d8b)

3 months agofully copy_internals for AnnotatedFromClause for straight cloned traverse
Mike Bayer [Wed, 15 Oct 2025 18:47:38 +0000 (14:47 -0400)] 
fully copy_internals for AnnotatedFromClause for straight cloned traverse

Fixed issue where using :meth:`_sql.Select.params` to replace bound
parameters in a query could fail for some cases where the parameters
were embedded in subqueries or CTEs when ORM classes were involved,
due to issues with internal query traversal for these cases.

Fixes: #12915
Change-Id: Ib63bca786a541682f6b2144fd5dd43350411ae9d
(cherry picked from commit 03116b8cc90986a2e597d5423c490babf49c9913)

3 months agoSupport warnings in exclusions
Mike Bayer [Tue, 14 Oct 2025 21:19:26 +0000 (17:19 -0400)] 
Support warnings in exclusions

this adds a new feature to exclusions ``warns_if()`` which applies
the expect_warnings() context manager to a test method.  Additionally,
at the class level these requirements can be extracted from a
``__requirements__`` directive and also added to global Python warnings
filter using catch_warnings().

Change-Id: Ibe28d169106309a930731c77e201402152a38810
(cherry picked from commit 1a2d5cb8518e0b2ce81b2368e16fb470c27389be)

3 months agocreate real sections for PG table and constraint options
Mike Bayer [Tue, 14 Oct 2025 15:52:19 +0000 (11:52 -0400)] 
create real sections for PG table and constraint options

add new docs, clarify INDEX/UNIQUE for covering indexes which
was not clear at all previously

Change-Id: Ibc11b63b87cd8a939e074973b387e1a23fc236e5

3 months agoReflect collation in types on PostgreSQL
Denis Laxalde [Thu, 24 Jul 2025 19:35:09 +0000 (15:35 -0400)] 
Reflect collation in types on PostgreSQL

Added support for reflection of collation in types for PostgreSQL.
The ``collation`` will be set only if different from the default
one for the type.

References #6511
Closes: #12510
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/12510
Pull-request-sha: c0a390314eb8ff2a4f729babf25cb052b6268d0a

Change-Id: I269a194d526a0689a4b38f10456d28539c73cffb
(cherry picked from commit 78af7c4f0406df614adc65a460481406eb4b1073)

3 months agodoc tweaks
Mike Bayer [Sun, 12 Oct 2025 05:43:48 +0000 (01:43 -0400)] 
doc tweaks

Change-Id: I7d445cd98db7edefe705ee4eb2cd24cad72040f3
(cherry picked from commit 938d70ae82441ebd48cb0f059823b8b39529f0cb)

3 months agobump black, flake8
Mike Bayer [Sat, 11 Oct 2025 18:29:44 +0000 (14:29 -0400)] 
bump black, flake8

nothing seems to have changed...

Change-Id: I7d08b24dc2df0f8a67bd5e704c8d108392a34fa3
(cherry picked from commit fd191b9d4a1d0b4a472917bfc8464309f6439b4c)

3 months agoMerge "Complete type annotations of sqlalchemy.engine.cursor module" into rel_2_0
Federico Caselli [Fri, 10 Oct 2025 18:45:55 +0000 (18:45 +0000)] 
Merge "Complete type annotations of sqlalchemy.engine.cursor module" into rel_2_0

3 months agoMerge "Improve typing and code in cursor module" into rel_2_0
Federico Caselli [Fri, 10 Oct 2025 18:43:19 +0000 (18:43 +0000)] 
Merge "Improve typing and code in cursor module" into rel_2_0

3 months agoVersion 2.0.45 placeholder
Mike Bayer [Fri, 10 Oct 2025 14:39:32 +0000 (10:39 -0400)] 
Version 2.0.45 placeholder

3 months ago- 2.0.44 rel_2_0_44
Mike Bayer [Fri, 10 Oct 2025 14:29:58 +0000 (10:29 -0400)] 
- 2.0.44

3 months agochangelog edits
Mike Bayer [Fri, 10 Oct 2025 14:29:32 +0000 (10:29 -0400)] 
changelog edits

Change-Id: I2d72ee3d8640c45efb6e6feb0f97df8d38d2236a
(cherry picked from commit d0cdf1939a37e0712fd951cca82e95b7c170c851)

3 months agothe gc_intensive blocks will continue until builds improve
Mike Bayer [Fri, 10 Oct 2025 12:22:22 +0000 (08:22 -0400)] 
the gc_intensive blocks will continue until builds improve

Change-Id: Ie62a2371eb1512ecde3a886f11a4b3de6d6cde3d
(cherry picked from commit 833953138f355c5288cd0f5b037869c13011dbe5)

3 months agoComplete type annotations of sqlalchemy.engine.cursor module
Denis Laxalde [Sat, 4 Oct 2025 19:13:29 +0000 (15:13 -0400)] 
Complete type annotations of sqlalchemy.engine.cursor module

References: #6810
Closes: #12760
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/12760
Pull-request-sha: 2804f49e1922d3cdc67065b733d0dd6e06554905

Change-Id: I974f966b2cd8f984b872d0aa27bbbdab78c6c1d7
(cherry picked from commit 692dee952499bc9ed5abe31692c011b6e4847486)

3 months agomark more GC sensitive tests as not open for github
Mike Bayer [Thu, 9 Oct 2025 19:56:25 +0000 (15:56 -0400)] 
mark more GC sensitive tests as not open for github

Change-Id: Ib73ec54e4ed7ef2d8911bfe8ee7a719022c6cddd
(cherry picked from commit 0486e6eaf878568a1c3f53189a876cccf279fcdc)

3 months agoImprove typing and code in cursor module
Federico Caselli [Thu, 9 Oct 2025 18:45:26 +0000 (20:45 +0200)] 
Improve typing and code in cursor module

Change-Id: I56b89f303f03dfc7056c7174ac06bc1679319bb5
(cherry picked from commit 16be119cc04d9327df78e0891bec40765bfd5d4f)

3 months agoFix mssql index column order
Allen Chen [Fri, 3 Oct 2025 02:53:34 +0000 (22:53 -0400)] 
Fix mssql index column order

Fixed issue where the index reflection for SQL Server would
not correctly return the order of the column inside an index
when the order of the columns in the index did not match the
order of the columns in the table.
Pull request courtesy of Allen Chen.

Fixes: #12894
Closes: #12895
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/12895
Pull-request-sha: bd9bd43219f35a29eaeee81fedea452afc64eb5d

Change-Id: I45ed30bbd0fcfd4f67cb2b682ecb3a18029be2b7
(cherry picked from commit 3dc9720c365a8d03e7c173874db74a080752d24e)

3 months agodont generate skipped suite names
Mike Bayer [Thu, 9 Oct 2025 16:43:16 +0000 (12:43 -0400)] 
dont generate skipped suite names

For a suite that is ``__backend__``, if no tests will run, then
don't include that suite in the result at all, rather than
keeping them there and having them skip.  the skip suites are
producing lots of noise in junit files

Change-Id: If58af412b7d8f542d6e1903ca933745075f5c7d9
(cherry picked from commit 8bb6aaa01bb292ffa7cc8db61d1b6f9c44fb5fc3)

3 months agoMerge "correct for FK reflecting on PK / index col at the same time" into rel_2_0
Michael Bayer [Wed, 8 Oct 2025 16:22:15 +0000 (16:22 +0000)] 
Merge "correct for FK reflecting on PK / index col at the same time" into rel_2_0

3 months agoMerge "Add Executable traverse internals to Executable subclasses and turn tests...
Michael Bayer [Wed, 8 Oct 2025 15:11:36 +0000 (15:11 +0000)] 
Merge "Add Executable traverse internals to Executable subclasses and turn tests on" into rel_2_0

3 months agocorrect for FK reflecting on PK / index col at the same time
Mike Bayer [Wed, 8 Oct 2025 15:09:59 +0000 (11:09 -0400)] 
correct for FK reflecting on PK / index col at the same time

Fixed issue in the MSSQL dialect's foreign key reflection query where
duplicate rows could be returned when a foreign key column and its
referenced primary key column have the same name, and both the referencing
and referenced tables have indexes with the same name. This resulted in an
"ForeignKeyConstraint with duplicate source column references are not
supported" error when attempting to reflect such tables. The query has been
corrected to exclude indexes on the child table when looking for unique
indexes referenced by foreign keys.

Fixes: #12907
Change-Id: I435d4cf3bfa9e861cbb5e1e5c8c81bd59c9a9d58
(cherry picked from commit 652f610a35ca0ba5286b2603dd1de84528262ae2)

3 months agoMerge "Add type annotations to indexable extension code" into rel_2_0
Federico Caselli [Wed, 8 Oct 2025 12:57:58 +0000 (12:57 +0000)] 
Merge "Add type annotations to indexable extension code" into rel_2_0

3 months agoAdd Executable traverse internals to Executable subclasses and turn tests on
Mike Bayer [Tue, 7 Oct 2025 18:55:44 +0000 (14:55 -0400)] 
Add Executable traverse internals to Executable subclasses and turn tests on

Fixed a caching issue where :func:`_orm.with_loader_criteria` would
incorrectly reuse cached bound parameter values when used with
:class:`_sql.CompoundSelect` constructs such as :func:`_sql.union`. The
issue was caused by the cache key for compound selects not including the
execution options that are part of the :class:`_sql.Executable` base class,
which :func:`_orm.with_loader_criteria` uses to apply its criteria
dynamically. The fix ensures that compound selects and other executable
constructs properly include execution options in their cache key traversal.

Fixes: #12905
Change-Id: I24bbd96233cddabe42eb716f078eea4c84b1af05
(cherry picked from commit 148059ced691da5edf3504a1d999cb1ab638dc7b)

3 months agotrim down GH actions jobs
Mike Bayer [Wed, 8 Oct 2025 12:05:21 +0000 (08:05 -0400)] 
trim down GH actions jobs

- remove 3.13t, it's not really viable compared to 3.14t
- fully block test_memusage

Change-Id: I78ffcde329a78a9d720569a4b46a20c071e94a5c
(cherry picked from commit 3815469635a4378cd3b6653a403bee4cc5e31327)

3 months agoAdd type annotations to indexable extension code
Denis Laxalde [Fri, 3 Oct 2025 19:10:08 +0000 (15:10 -0400)] 
Add type annotations to indexable extension code

A typing test case (plain_files/ext/indexable.py) is also added.

In order to make the methods of index_property conform with type
definitions of `fget`, `fset` and `fdel` arguments of hybrid_property,
we need to make the signature of protocols
(e.g. `_HybridGetterType`) `__call__`) method positional only.

Related to #6810.

Closes: #12763
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/12763
Pull-request-sha: 896b9642629fb212a71e68ed3f08705d08407dbf

Change-Id: I42980ccf20ff9c992ebd616f38545e06ede57d36
(cherry picked from commit b2aa0e2575d3e779a9fc757b04896e9b61045aa8)

3 months agoMerge "update oracle profiles" into rel_2_0
Federico Caselli [Tue, 7 Oct 2025 21:41:03 +0000 (21:41 +0000)] 
Merge "update oracle profiles" into rel_2_0

3 months agoupdate oracle profiles
Federico Caselli [Tue, 7 Oct 2025 19:00:34 +0000 (21:00 +0200)] 
update oracle profiles

Change-Id: Ie1d5a8a6e655d7fc883f07348ee56a39fdc598da

3 months agoadd teardown to "run_n_times"
Mike Bayer [Tue, 7 Oct 2025 18:05:49 +0000 (14:05 -0400)] 
add teardown to "run_n_times"

Change-Id: Ibeeb90f7ea3bbd32ffd27b4eb2e2988018e87a5c
(cherry picked from commit 1ad77a925c4d34a6c6c4879803a79e7d6d10881b)

3 months agoremove mis-applied patch
Mike Bayer [Tue, 7 Oct 2025 13:35:26 +0000 (09:35 -0400)] 
remove mis-applied patch

some scratch tests got merged in 456727df50c7dc29ddc31c6f67c1b,
revert that part

Change-Id: I4e9d4a005f586dcc6fa1eb4a3a6fe886a21d6066
(cherry picked from commit ea78ff75bf4b43c417fe2ff4c37a8283f1de9ce5)

3 months agoadd 2.1 specific freethreading changelog
Mike Bayer [Tue, 7 Oct 2025 13:31:07 +0000 (09:31 -0400)] 
add 2.1 specific freethreading changelog

Change-Id: I9b4113d865938c164f119b6aef8648fd75ca6d5f
(cherry picked from commit 7015f7c4740efb3b99d64053ab629962ea365c5e)

3 months agoMerge "Add explicit multi-threaded tests and support free-threaded build" into rel_2_0
Michael Bayer [Tue, 7 Oct 2025 13:17:30 +0000 (13:17 +0000)] 
Merge "Add explicit multi-threaded tests and support free-threaded build" into rel_2_0

3 months agotype pysqlite
Pablo Estevez [Sat, 23 Aug 2025 12:33:47 +0000 (08:33 -0400)] 
type pysqlite

<!-- Provide a general summary of your proposed changes in the Title field above -->
type pysqlite from dialects.
type some related code on pysqlite.py

related to #6810

<!-- Describe your changes in detail -->

<!-- go over following points. check them with an `x` if they do apply, (they turn into clickable checkboxes once the PR is submitted, so no need to do everything at once)

-->

This pull request is:

- [ ] A documentation / typographical / small typing error fix
- Good to go, no issue or tests are needed
- [ ] A short code fix
- please include the issue number, and create an issue if none exists, which
  must include a complete example of the issue.  one line code fixes without an
  issue and demonstration will not be accepted.
- Please include: `Fixes: #<issue number>` in the commit message
- please include tests.   one line code fixes without tests will not be accepted.
- [ ] A new feature implementation
- please include the issue number, and create an issue if none exists, which must
  include a complete example of how the feature would look.
- Please include: `Fixes: #<issue number>` in the commit message
- please include tests.

**Have a nice day!**

Closes: #12789
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/12789
Pull-request-sha: 2c1ea7283d534dd625c8f0e4270247d2cc5ed40c

Change-Id: I4d691c4bb334957029cd47289463555034ebd866
(cherry picked from commit e833474db064df32a7c02e809893e71ac4df4996)

3 months agoAdd explicit multi-threaded tests and support free-threaded build
Lysandros Nikolaou [Fri, 26 Sep 2025 14:16:41 +0000 (10:16 -0400)] 
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)