]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/log
thirdparty/sqlalchemy/sqlalchemy.git
4 days agoMerge "1.4: Fix running tests with Python 3.14" into rel_1_4 rel_1_4
Michael Bayer [Thu, 3 Jul 2025 16:18:47 +0000 (16:18 +0000)] 
Merge "1.4: Fix running tests with Python 3.14" into rel_1_4

13 days agouse zzzeeksphinx 1.6.1 and we arent' really using this doc mod
Mike Bayer [Tue, 24 Jun 2025 22:26:44 +0000 (18:26 -0400)] 
use zzzeeksphinx 1.6.1 and we arent' really using this doc mod

Change-Id: Ib53111444598331290bde1788f5f2617562d250c
(cherry picked from commit 5394c75bcac270905a58a0fb7cd5f0d6643f78fd)

3 weeks ago1.4: Fix running tests with Python 3.14
Nils Philippsen [Thu, 12 Jun 2025 13:32:48 +0000 (09:32 -0400)] 
1.4: Fix running tests with Python 3.14

Backported to SQLAlchemy 1.4 an improvement to the test suite with regards
to how asyncio related tests are run, now using the newer Python 3.11
``asyncio.Runner`` or a backported equivalent, rather than relying on the
previous implementation based on ``asyncio.get_event_loop()``.  This allows
the SQLAlchemy 1.4 codebase to run on Python 3.14 which has removed this
method.  Pull request courtesy Nils Philippsen.

Cleaned up some old cruft in tox.ini and added py314 markers.

backported adef933f8d12938 from 2.0 to update test_memusage to use
the "fork" context

Fixes: #12668
Closes: #12666
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/12666
Pull-request-sha: 6f0f4d6cca4cfcb60bd4ed09323eae5e5bd04958

Change-Id: I1f9682f945836e1e347cf1693eb30ff43ebe6e30

2 months agoFix issues in versioning.rst (#12567)
krave1986 [Mon, 5 May 2025 19:38:19 +0000 (03:38 +0800)] 
Fix issues in versioning.rst (#12567)

(cherry picked from commit e1f2f204c1b2967486d160b19a8ddf21c0b698bf)

2 months agochore: Fix typo of psycopg2 in comment (#12526)
Matt John [Tue, 15 Apr 2025 19:05:36 +0000 (20:05 +0100)] 
chore: Fix typo of psycopg2 in comment (#12526)

This is the first example in the documentation of a particular connector, which mgith result in copy+pastes, resulting in an error

(cherry picked from commit f2a9ecde29bb9d5daadd0626054ff8b54865c781)
Change-Id: I493f7d4ac780ac61c6ae17695de71bab19e67a46

3 months agodocument sqlite truncate_microseconds in DATETIME and TIME
Federico Caselli [Wed, 26 Mar 2025 20:43:10 +0000 (21:43 +0100)] 
document sqlite truncate_microseconds in DATETIME and TIME

Change-Id: I93412d951b466343f2cf9b6d513ad46d17f5d8ee
(cherry picked from commit a9b37199133eea81ebdf062439352ef2745d3c00)

5 months agoupdate logging_name doc
Mike Bayer [Mon, 13 Jan 2025 13:14:14 +0000 (08:14 -0500)] 
update logging_name doc

engine logging has not used hex-strings in a very long time

Change-Id: I77131e3eb2f72129fde1d9ab6dd4b4e40bc313c6
(cherry picked from commit 214088c42ad61794e315174c41ee92a3c408ae6c)

6 months agofix failing tests in github actions
Federico Caselli [Sat, 4 Jan 2025 17:28:26 +0000 (18:28 +0100)] 
fix failing tests in github actions

Change-Id: Ia37a7bcaafcc5fa8e1fe4783706d1185351cd14e

6 months agoavoid using ubuntu 24 since it's currently having issues
Federico Caselli [Fri, 3 Jan 2025 19:56:37 +0000 (20:56 +0100)] 
avoid using ubuntu 24 since it's currently having issues

Change-Id: I53ca096258988e5a7e76c46c5a5881c662a58d39

6 months ago2025
Mike Bayer [Thu, 2 Jan 2025 21:41:57 +0000 (16:41 -0500)] 
2025

Change-Id: Ifb33b8df2f838851f329415fa70f494acb4ccde5

8 months agoUpdate bigquery dialect link (#12048)
Gord Thompson [Wed, 30 Oct 2024 17:30:40 +0000 (11:30 -0600)] 
Update bigquery dialect link (#12048)

(cherry picked from commit 58822b9e2412dfefdced95164943fdb515e2f52c)

8 months agoremove fully tested in ci reference since it's confusing
Federico Caselli [Thu, 10 Oct 2024 20:25:39 +0000 (22:25 +0200)] 
remove fully tested in ci reference since it's confusing

Change-Id: I5d1c14b2c2b3bcbb55861e1c4a90ffafe8ee00fa
(cherry picked from commit 8684c8dda6cde2f470ad16827b09eb6d4bb1c6d8)

8 months agofix typo in mapper doc string
Federico Caselli [Tue, 8 Oct 2024 21:22:20 +0000 (23:22 +0200)] 
fix typo in mapper doc string

Change-Id: I10fd7bdb0f0564a5beadfe3fa9fbb7e5ea88362c
(cherry picked from commit 74a8e2ced922183d6ad072eced904cb989113fa2)

9 months agoRemove test warning in python 3.13
Federico Caselli [Tue, 17 Sep 2024 18:22:11 +0000 (20:22 +0200)] 
Remove test warning in python 3.13

Change-Id: Ib098754ef6d157e8dd1eac32b3cb114a9ca66e4a
(cherry picked from commit 0cca754f2101cf0e63f0c67b0220e7a4eb3a0f9c)

9 months agoupdate MonetDB dialect information (#11884)
Yunus Koning [Tue, 17 Sep 2024 18:05:09 +0000 (20:05 +0200)] 
update MonetDB dialect information (#11884)

(cherry picked from commit 8da20140fe2d57584211d85de589cbce7172a2da)

10 months agoVersion 1.4.55 placeholder
Mike Bayer [Thu, 5 Sep 2024 15:54:33 +0000 (11:54 -0400)] 
Version 1.4.55 placeholder

10 months ago- 1.4.54 rel_1_4_54
Mike Bayer [Thu, 5 Sep 2024 15:50:20 +0000 (11:50 -0400)] 
- 1.4.54

10 months agoremove setuptools test, backport issue #11818
Mike Bayer [Thu, 5 Sep 2024 13:44:32 +0000 (09:44 -0400)] 
remove setuptools test, backport issue #11818

to support our release tools we need to fully move 1.4 into
modern setuptools territory in order to continue releasing.

Fixes: #11818
Change-Id: Idb512a4990b002062f0c02ad22ee488c97c18ef4

10 months agomove py313 tests to greenlet main
Mike Bayer [Thu, 5 Sep 2024 14:06:36 +0000 (10:06 -0400)] 
move py313 tests to greenlet main

vstinner's branch merged and was immediately deleted from
that repo.  greenlet still not released.  so keep on
chasing it :/

Change-Id: I79927061566db75b4e26b3dbc39b817786531db6
(cherry picked from commit 88dd18cd89598d0569d761db206d4559e8cd57be)
(cherry picked from commit 4a72df72cd2bb890034a9843b27a51e662ceccf7)

10 months agoInclude operators in postgres JSONB documentation (#11828)
Jimmy AUDEBERT [Wed, 4 Sep 2024 17:23:53 +0000 (19:23 +0200)] 
Include operators in postgres JSONB documentation (#11828)

(cherry picked from commit 06ca61066ee312a5198cf1db869f388255212559)
Change-Id: I3e432a8b14309314f4c56d43841cba464518b125

10 months agofix typo in `elect.slice` docs
Federico Caselli [Wed, 4 Sep 2024 17:10:31 +0000 (19:10 +0200)] 
fix typo in `elect.slice` docs

Change-Id: I859b48e320a04cedc6084d067cb20b89ac5d76bb
(cherry picked from commit 6d0379f0565db1b6bf3aa7bead44d759407abadc)

10 months agodont erase transaction if rollback/commit failed outside of asyncpg
Mike Bayer [Mon, 2 Sep 2024 14:37:29 +0000 (10:37 -0400)] 
dont erase transaction if rollback/commit failed outside of asyncpg

Fixed critical issue in the asyncpg driver where a rollback or commit that
fails specifically for the ``MissingGreenlet`` condition or any other error
that is not raised by asyncpg itself would discard the asyncpg transaction
in any case, even though the transaction were still idle, leaving to a
server side condition with an idle transaction that then goes back into the
connection pool.   The flags for "transaction closed" are now not reset for
errors that are raised outside of asyncpg itself.  When asyncpg itself
raises an error for ``.commit()`` or ``.rollback()``, asyncpg does then
discard of this transaction.

Fixes: #11819
Change-Id: I12f0532788b03ea63fb47a7af21e07c37effb070
(cherry picked from commit a1f220cb4d1a04412a53200f454fbfc706e136b3)
(cherry picked from commit ca69db7e1ff6dabbbd57b1bca3387d0321da19a5)

10 months agode-memoize _proxy_key when new annotations are added
Mike Bayer [Mon, 12 Aug 2024 23:50:05 +0000 (19:50 -0400)] 
de-memoize _proxy_key when new annotations are added

Fixed regression from 1.3 where the column key used for a hybrid property
might be populated with that of the underlying column that it returns, for
a property that returns an ORM mapped column directly, rather than the key
used by the hybrid property itself.

Fixes: #11728
Change-Id: Ifb298e46a20f90f6b6a717674f142a87cbceb468
(cherry picked from commit ffc7e8d73b30ea45fb03e0727b9fe96b6b8d4cfa)
(cherry picked from commit 5b1758a9bb8952adca91a95483ec1d11a66ad1e2)

10 months agoturn off pyodbc pooling
Mike Bayer [Sun, 11 Aug 2024 19:41:36 +0000 (15:41 -0400)] 
turn off pyodbc pooling

new updates of unixodbc are turning this on in CI revealing
that our isolation level tests assume no pooling takes place,
so disable this, which is only at global module level for pyodbc

Change-Id: I971dfddc90d248281e8ca8677a3a41af6de28b86
(cherry picked from commit 896dbdb5920ffb645a8948c254f73dd0fcb0d3c0)

11 months agofix wheel pipeline
Federico Caselli [Mon, 29 Jul 2024 19:53:47 +0000 (21:53 +0200)] 
fix wheel pipeline

Change-Id: Ib38c1fc369be77ebb27504a0b9ca0f6778368d0f
(cherry picked from commit fbf35e9b71e744079b65a717f00b126707cc9b36)

11 months agoVersion 1.4.54 placeholder
Mike Bayer [Mon, 29 Jul 2024 16:34:35 +0000 (12:34 -0400)] 
Version 1.4.54 placeholder

11 months ago- 1.4.53 rel_1_4_53
Mike Bayer [Mon, 29 Jul 2024 16:18:22 +0000 (12:18 -0400)] 
- 1.4.53

11 months agoadd missing forwards port versions
Mike Bayer [Mon, 29 Jul 2024 15:58:38 +0000 (11:58 -0400)] 
add missing forwards port versions

I totally forgot these meaning they wont show up in 2.0
changelogs, so this is a big mistake i have to stop making

Change-Id: I5f998eecbfa8aceab3ee247bb3a00e13820af872
(cherry picked from commit 1ba11863398153760952261adff08d544a508c3a)

11 months agoupdate typing for mypy 1.11; pin plugin to <1.11
Federico Caselli [Mon, 22 Jul 2024 21:17:45 +0000 (23:17 +0200)] 
update typing for mypy 1.11; pin plugin to <1.11

(1.4 specific notes)

The legacy mypy plugin is no longer fully functional with the latest series
of mypy 1.11.0, as changes in the mypy interpreter are no longer compatible
with the approach used by the plugin.  If code is dependent on the legacy
mypy plugin with sqlalchemy2-stubs, it's recommended to pin mypy to be
below the 1.11.0 series.    Seek upgrading to the 2.0 series of SQLAlchemy
and migrating to the modern type annotations.

Change-Id: Ib8fef93ede588430dc0f7ed44ef887649a415821
cherry picked from commit 0741fe45f62f89845b15d7faea209b26a652a174)

Change-Id: I61f50539cda851b98178060410fedaa70971d01a

11 months agoadd missing changelog for #11544
Mike Bayer [Sat, 20 Jul 2024 03:05:43 +0000 (23:05 -0400)] 
add missing changelog for #11544

Fixes: #11544
Change-Id: Ibf57f6ee0fee105672b03c2bf6690cad6bb0932d
(cherry picked from commit 800932af467109f06c0196c42ae86272a5d7f96a)

11 months agoremove redundant(?) Isolation / isolation
Mike Bayer [Mon, 15 Jul 2024 13:15:36 +0000 (09:15 -0400)] 
remove redundant(?) Isolation / isolation

References: https://github.com/sqlalchemy/sqlalchemy/discussions/11609
Change-Id: I8ada4b8ed64a6d6b9cb923503fda6d7b4888f429
(cherry picked from commit e44e805506fa71318e23a2bfad733fbbf5a9ee59)

11 months agoImprove generated reflection in sqlite
Federico Caselli [Sun, 7 Jul 2024 09:56:56 +0000 (11:56 +0200)] 
Improve generated reflection in sqlite

Fixed reflection of computed column in SQLite to properly account
for complex expressions.

Fixes: #11582
Change-Id: I8e9fdda3e47c04b376973ee245b3175374a08f56
(cherry picked from commit e67a0b77a82667e2199e333bae0606d143fa228e)

12 months agoensure intro to "functions have types" is not misleading
Mike Bayer [Sat, 6 Jul 2024 16:24:51 +0000 (12:24 -0400)] 
ensure intro to "functions have types" is not misleading

make sure it's clear that there is normally not a return type
for SQL functions

Fixes: #11578
Change-Id: Ia0b66e7fe685dad427822345dd232eb47a0fc44f
(cherry picked from commit e9d3e49601d011f9a3471921729728ca688e04b9)
(cherry picked from commit 5e495e16da87644bcb07aa76c9021d486053b81d)

12 months agocall iter() on detached/transient dynamic session
Mike Bayer [Tue, 2 Jul 2024 17:57:47 +0000 (13:57 -0400)] 
call iter() on detached/transient dynamic session

Fixed regression going back to 1.4 where accessing a collection using the
"dynamic" strategy on a transient object and attempting to query would
raise an internal error rather than the expected :class:`.NoResultFound`
that occurred in 1.3.

Fixes: #11562
Change-Id: I650305963a17592413520d8d1049c601761a0acc
(cherry picked from commit 4208993938302e34a67e57af710be7d98ff37659)
(cherry picked from commit 1ad8edb9e168bf2f7de88114f7bb6e25c8155b69)

12 months agoDocs: simplify language in getting a connection & committing changes
lonkeknol [Fri, 28 Jun 2024 16:27:33 +0000 (12:27 -0400)] 
Docs: simplify language in getting a connection & committing changes

Simplifies language use in [Getting a Connection](https://docs.sqlalchemy.org/en/20/tutorial/dbapi_transactions.html#getting-a-connection) and [Committing Changes](https://docs.sqlalchemy.org/en/20/tutorial/dbapi_transactions.html#committing-changes)

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: #11542
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/11542
Pull-request-sha: d706e69fb6058d3483fce98cfacbbf36ca12d78e

Change-Id: I7788f2a16a5127b3c9623f7b00f06f649b04e0fb
(cherry picked from commit 82d14a7515187ad744037ca9017ced1782314854)

12 months agocache key share; support correct traverse of 'of'
Mike Bayer [Thu, 27 Jun 2024 22:17:47 +0000 (18:17 -0400)] 
cache key share; support correct traverse of 'of'

Fixed caching issue where the
:paramref:`_sql.Select.with_for_update.key_share` element of
:meth:`_sql.Select.with_for_update` was not considered as part of the cache
key, leading to incorrect caching if different variations of this parameter
were used with an otherwise identical statement.

Also repairs a traversal issue where the ``of`` element of
``ForUpdateArg`` when set to ``None`` cannot be compared against a
non-None element because the traversal defines it as a clauselist.
Traversal in this case is adjusted to accommodate for this case so that
we dont need to create a risky-to-backport change to ``ForUpdateArg``
itself.

Fixes: #11544
Change-Id: Ie8a50716df06977af58b0c22a8c10e1b64d972b9
(cherry picked from commit 6d2f43e14f2fe25cdc811355b7bd6d11f8eee381)
(cherry picked from commit 522baa306fc788cf02acf29bf08e86a431a7050e)

12 months agoDocs: simplify language use for "Working with Transactions and the DBAPI"
lonkeknol [Thu, 27 Jun 2024 13:03:30 +0000 (09:03 -0400)] 
Docs: simplify language use for "Working with Transactions and the DBAPI"

This is my first pull request to sqlalchemy. It changes the writing style of two paragraphs in the unified tutorial [here](https://docs.sqlalchemy.org/en/20/tutorial/dbapi_transactions.html#working-with-transactions-and-the-dbapi). My goals were to.
1. Make them easier to read
2. Not change the meaning of the text.
3. Get feedback on whether this type of contribution is considered useful for sqlalchemy.

If this is a useful type of contribution, it might be good to discuss some general guidelines for me to adhere to as I continue. For instance:
- Prefer using present simple tense
- Remove superfluous words where possible
- Keep the pull requests to one or two h2 sections at a time, to make the review easier

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.

I'm curious to hear what you all think. **Have a nice day!**

Closes: #11541
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/11541
Pull-request-sha: 3179690e6a5b47de99a4486a7a15cffbfacd380b

Change-Id: I9b47f6ce4fd00c44c4b0e19957acf250f5e46d2f
(cherry picked from commit fc2cb4496d35c0b8bb7d59aa74b553f07210eded)

12 months agoMerge "use literal execute for SQL Server frame parameters" into rel_1_4
Michael Bayer [Sun, 23 Jun 2024 18:17:37 +0000 (18:17 +0000)] 
Merge "use literal execute for SQL Server frame parameters" into rel_1_4

12 months agofix default label style doc
Mike Bayer [Sun, 23 Jun 2024 14:18:47 +0000 (10:18 -0400)] 
fix default label style doc

Change-Id: I793f7b62c6c0b551ab1957cabcff685885b6e51c
(cherry picked from commit c43238252f96a1f9370d1bc7ff440897b751b2b8)

12 months agoDocumentation: Update package name for CrateDB dialect (#11503)
Andreas Motl [Sun, 23 Jun 2024 10:14:15 +0000 (12:14 +0200)] 
Documentation: Update package name for CrateDB dialect (#11503)

The CrateDB SQLAlchemy dialect needs more love, so it was separated from
the DBAPI HTTP driver.

The new canonical package for the SQLAlchemy CrateDB dialect on PyPI is:

  https://pypi.org/project/sqlalchemy-cratedb/

(cherry picked from commit d4b28a4409ca233039896225f4e882a8b07e5b56)
(cherry picked from commit b685bc7d211515711a3885fcdac4654de16db407)

12 months agouse literal execute for SQL Server frame parameters
Mike Bayer [Wed, 19 Jun 2024 15:03:25 +0000 (11:03 -0400)] 
use literal execute for SQL Server frame parameters

Fixed issue where SQL Server drivers don't support bound parameters when
rendering the "frame specification" for a window function, e.g. "ROWS
BETWEEN", etc.

Fixes: #11514
Change-Id: I0664f4076a2a8266434a4670949b8b44cd261f44
(cherry picked from commit c088b6426f1d73efe7de3e42b3e86f8027076bc3)
(cherry picked from commit 9524e4bffc9c8545fdb8698ef029c420374ac00f)

12 months agoSQLAlchemy 1.4: Fix building the C extension on Python 3.13
Benjamin A. Beasley [Thu, 20 Jun 2024 15:02:39 +0000 (11:02 -0400)] 
SQLAlchemy 1.4: Fix building the C extension on Python 3.13

Adjustments to the C extensions, which are specific to the SQLAlchemy 1.x
series, to work under Python 3.13.  Pull request courtesy Ben Beasley.

Fixes: #11499
Closes: #11500
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/11500
Pull-request-sha: 8a5888b147022b4586d30dcd7159e4fa6a31ec0e

Change-Id: I1943eb387f9b075bf07e179f7a24762236e234bf

12 months agolower setuptools lower bound to suit python 2.7
Mike Bayer [Thu, 20 Jun 2024 16:26:10 +0000 (12:26 -0400)] 
lower setuptools lower bound to suit python 2.7

looks like 44.x is the latest for 2.7.

not sure how this passed on CI when we had it at 60?

Change-Id: I9d351ef855de9d84482c458f22118b4f7b40f763

12 months agoMerge "backport of applicable 3.13 fixes" into rel_1_4
Michael Bayer [Thu, 20 Jun 2024 15:02:04 +0000 (15:02 +0000)] 
Merge "backport of applicable 3.13 fixes" into rel_1_4

12 months agopin setuptools below 69.3 and prepare for "build" for releases
Mike Bayer [Wed, 19 Jun 2024 15:44:54 +0000 (11:44 -0400)] 
pin setuptools below 69.3 and prepare for "build" for releases

for 1.4, we introduce the build-system entry so that we can use
"build" for releases

Change-Id: Ib70446cc3c7d7d8acb264ffa2237a0c7aac5a0f5
(cherry picked from commit f6283dd6d902fd0d8b5a7ecc6c37c4ebde4d93f3)
(cherry picked from commit 4b7ffd28e5bbc942c18b0c9b3bc9e50265ef15a1)

12 months agobackport of applicable 3.13 fixes
Mike Bayer [Sun, 26 May 2024 15:34:27 +0000 (11:34 -0400)] 
backport of applicable 3.13 fixes

Fixes: #11417
Change-Id: Ib2ceccd9583d8776700f0da5b591906efcfe6e6f
(cherry picked from commit 754804635bc922c20d0b0075e0ed2da0add38742)

12 months agoMerge "open up async greenlet for third parties" into rel_1_4
Michael Bayer [Thu, 13 Jun 2024 17:33:39 +0000 (17:33 +0000)] 
Merge "open up async greenlet for third parties" into rel_1_4

12 months agoopen up async greenlet for third parties
Mike Bayer [Wed, 12 Jun 2024 16:42:29 +0000 (12:42 -0400)] 
open up async greenlet for third parties

Modified the internal representation used for adapting asyncio calls to
greenlets to allow for duck-typed compatibility with third party libraries
that implement SQLAlchemy's "greenlet-to-asyncio" pattern directly.
Running code within a greenlet that features the attribute
``__sqlalchemy_greenlet_provider__ = True`` will allow calls to
:func:`sqlalchemy.util.await_only` directly.

Change-Id: I79c67264e1a642b9a80d3b46dc64bdda80acf0aa
(cherry picked from commit c1e2d9180a14c74495b712e08d8156b92f907ac0)
(cherry picked from commit 1a6ff466b29ad3a114a27f2776538d8d998db2dd)

12 months agoinclude HasCTE traversal elements in TextualSelect
Mike Bayer [Tue, 11 Jun 2024 02:59:49 +0000 (22:59 -0400)] 
include HasCTE traversal elements in TextualSelect

Fixed caching issue where using the :meth:`.TextualSelect.add_cte` method
of the :class:`.TextualSelect` construct would not set a correct cache key
which distinguished between different CTE expressions.

Fixes: #11471
Change-Id: Ia9ce2c8cfd128f0f130aa9b26448dc23d994c324
(cherry picked from commit faecebc9df2a57173ee720973ba44ada370b682f)
(cherry picked from commit 228d98e43a0bba1f33cd46f92f14851ecccbb728)

12 months agofix macos tests
Federico Caselli [Tue, 11 Jun 2024 21:59:02 +0000 (23:59 +0200)] 
fix macos tests

Change-Id: I15cd4f541d88082fe16af121726f8ea5dd73fd97

12 months agoloosen up hash_limit test
Mike Bayer [Tue, 11 Jun 2024 13:16:26 +0000 (09:16 -0400)] 
loosen up hash_limit test

hash_limit_string works by doing a modulus of a hash value so that
the range of possible numbers is 0-N.  however, there's a chance
we might not populate every 0-N value in unusual cases on CI,
even after iterating 500 times apparently.  Loosen the change by making
sure we got at least N/2 unique hash messages but not greater
than N.

Change-Id: I5cd2845697ec0a718ddca1c95fbc4867b06eabee
(cherry picked from commit ef04a401100ff37915c281c412ed3d784565e429)

13 months agoAdd test for issue 11412
Mike Bayer [Fri, 24 May 2024 14:58:02 +0000 (10:58 -0400)] 
Add test for issue 11412

Issue #10365 was found to also fix an issue where
single-inheritance criteria would not be correctly applied to a
subclass entity that only appeared in the ``select_from()`` list.

Fixes: #11412
Change-Id: Ic865737a3d075fceee346eea8044345233038f72
(cherry picked from commit 61d227a7d4f7be7b1f6fa72171d01c60e571939e)
(cherry picked from commit a0a52e79eec780206bc014f301d301f345ec57a0)

14 months agoUpdate links from initd.org to psycopg.org (#11244)
Stefan Wojcik [Mon, 8 Apr 2024 19:23:19 +0000 (15:23 -0400)] 
Update links from initd.org to psycopg.org (#11244)

(cherry picked from commit ac7d70dea89dfaf8e061bc8dd03a1ed7825069fc)

15 months agowork around boldface concerns
Mike Bayer [Tue, 19 Mar 2024 14:51:01 +0000 (10:51 -0400)] 
work around boldface concerns

Change-Id: I99ed117bb0f1bdc1a8750bd13db5a69d5c398ae0
(cherry picked from commit 697dcc94e412e013aba298e17613ee097f423e04)

15 months agoadd notes clarifying the role of "$user" in pg search_path
Mike Bayer [Tue, 19 Mar 2024 12:35:00 +0000 (08:35 -0400)] 
add notes clarifying the role of "$user" in pg search_path

references: https://github.com/sqlalchemy/alembic/discussions/1447
Change-Id: I2ef55813699f84ac7fbca6de7522f0d3d78e6029
(cherry picked from commit 58a50c06836792da201bb610ee2f0463ac1bb073)

15 months agoadd missing cache_ok directive to MyEpochType
Mike Bayer [Mon, 18 Mar 2024 14:22:06 +0000 (10:22 -0400)] 
add missing cache_ok directive to MyEpochType

Change-Id: Ic4da52b02a4ba36d87d73974fe428b91d9d7915c
(cherry picked from commit 4ef36de359449abd49b90726a1d06aef9a4084e7)

16 months agoVersion 1.4.53 placeholder
Mike Bayer [Mon, 4 Mar 2024 13:30:04 +0000 (08:30 -0500)] 
Version 1.4.53 placeholder

16 months ago- 1.4.52 rel_1_4_52
Mike Bayer [Mon, 4 Mar 2024 13:24:31 +0000 (08:24 -0500)] 
- 1.4.52

16 months agoEnsure loader criteria used for ORM join with expression condition
Mike Bayer [Tue, 19 Sep 2023 12:58:52 +0000 (08:58 -0400)] 
Ensure loader criteria used for ORM join with expression condition

Fixed bug where ORM :func:`_orm.with_loader_criteria` would not apply
itself to a :meth:`_sql.Select.join` where the ON clause were given as a
plain SQL comparison, rather than as a relationship target or similar.

Fixes: #10365
Change-Id: Ie6d08fb01a3079b7c3ccd3a8241031d46a56e19d
(cherry picked from commit f8086a809bba358790cff032d745814b186ab8cb)

16 months agoFix mysql dialect text docstring, length is interpreted as byte size
Zhong Zheng [Fri, 16 Feb 2024 17:20:59 +0000 (12:20 -0500)] 
Fix mysql dialect text docstring, length is interpreted as byte size

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

### Description
The `Text` and its variant types in MySQL are bytes size limited, not character length, so fixing the doctoring where the upper limit uses the `characters` as the unit instead of `bytes`

https://dev.mysql.com/doc/refman/5.7/en/storage-requirements.html
https://dev.mysql.com/doc/refman/8.0/en/storage-requirements.html

<img width="878" alt="Screenshot 2024-02-15 at 17 27 59" src="https://github.com/sqlalchemy/sqlalchemy/assets/5219229/29731769-f57e-46f9-858b-46feda0ae83c">

### 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 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: #11018
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/11018
Pull-request-sha: 13fa52917efea9a229c7abf19a3be40e24a79cb9

Change-Id: Iea903a6dc4b52ee4b7b5d2d64256c69abbd1f8aa
(cherry picked from commit 1c58fe53b6fd069cbb82955ddaf9eb5405076146)
(cherry picked from commit 51011db22b0d51b5560d55b97671631cadc10265)

17 months agofix wheel on windows-mac
Federico Caselli [Thu, 11 Jan 2024 18:57:25 +0000 (19:57 +0100)] 
fix wheel on windows-mac

Change-Id: Id759f1f533cff5691332441455ff3f23fbabbe55
(cherry picked from commit a9416a9e73331dc330e30343f26631b29108373b)
(cherry picked from commit a8cdc8f53816d3156e1f8b4032c3375b91dba825)

18 months agoVersion 1.4.52 placeholder
Mike Bayer [Wed, 3 Jan 2024 01:32:38 +0000 (20:32 -0500)] 
Version 1.4.52 placeholder

18 months ago- 1.4.51 rel_1_4_51
Mike Bayer [Wed, 3 Jan 2024 01:08:42 +0000 (20:08 -0500)] 
- 1.4.51

18 months agohappy new year, continued
Mike Bayer [Wed, 3 Jan 2024 01:07:42 +0000 (20:07 -0500)] 
happy new year, continued

Change-Id: I9cbd176d73c29c7975ead644367560a24f267de7

18 months agofix big scary setuptools warning about license_files
Mike Bayer [Wed, 3 Jan 2024 01:03:35 +0000 (20:03 -0500)] 
fix big scary setuptools warning about license_files

Change-Id: Ic84b769be748d410ed89539ffd798ea91d00af54

18 months agoMerge "ensure correct lock type propagated in pool recreate" into rel_1_4
Michael Bayer [Tue, 2 Jan 2024 14:58:24 +0000 (14:58 +0000)] 
Merge "ensure correct lock type propagated in pool recreate" into rel_1_4

18 months agoensure correct lock type propagated in pool recreate
Mike Bayer [Mon, 1 Jan 2024 21:54:58 +0000 (16:54 -0500)] 
ensure correct lock type propagated in pool recreate

Fixed critical issue in asyncio version of the connection pool where
calling :meth:`_asyncio.AsyncEngine.dispose` would produce a new connection
pool that did not fully re-establish the use of asyncio-compatible mutexes,
leading to the use of a plain ``threading.Lock()`` which would then cause
deadlocks in an asyncio context when using concurrency features like
``asyncio.gather()``.

Fixes: #10813
Change-Id: I95ec698b6a1ba79555aa0b28e6bce65fedf3b1fe
(cherry picked from commit 2ed32bbf891b8f7e6c151071b4711319d9aa84f0)
(cherry picked from commit c65e4f4471cd10051476caaadcc92d7a7eb557b4)

18 months ago2024 setup / backport normalize files, tool setup
Mike Bayer [Mon, 1 Jan 2024 22:11:11 +0000 (17:11 -0500)] 
2024 setup / backport normalize files, tool setup

also bumps flake8 in pre-commit to match that of
2.0

Change-Id: I2853d99bbc19c94227e2b88d450873197013bdfb

18 months agoUse a copy of `self.contents` in this list comprehension.
Yilei Yang [Thu, 21 Dec 2023 07:47:03 +0000 (02:47 -0500)] 
Use a copy of `self.contents` in this list comprehension.

Improved a fix first implemented for :ticket:`3208` released in version
0.9.8, where the registry of classes used internally by declarative could
be subject to a race condition in the case where individual mapped classes
are being garbage collected at the same time while new mapped classes are
being constructed, as can happen in some test suite configurations or
dynamic class creation environments.   In addition to the weakref check
already added, the list of items being iterated is also copied first to
avoid "list changed while iterating" errors.  Pull request courtesy Yilei
Yang.

Fixes: #10782
Closes: #10783
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/10783
Pull-request-sha: 354e97b640430120d0c193a4efe487f293d4768b

Change-Id: I04ccc92472bf1004dad0fb785e16b180f58f101d
(cherry picked from commit 0fe5d3ca51884b85b4059ed05b53f02172325e70)

19 months agoFix pre-ping regression in old PyMySQL versions.
Federico Caselli [Wed, 22 Nov 2023 21:04:03 +0000 (22:04 +0100)] 
Fix pre-ping regression in old PyMySQL versions.

Fixed regression introduced by the fix in ticket :ticket:`10492` when using
pool pre-ping with PyMySQL version older than 1.0.

Fixes: #10650
Change-Id: Ic0744c8b6f91cc39868e31c3bfddb8df20c7dfbb

19 months agoMerge "Properly document ARRAY.contains. #10587" into rel_1_4
Federico Caselli [Sun, 12 Nov 2023 17:50:13 +0000 (17:50 +0000)] 
Merge "Properly document ARRAY.contains. #10587" into rel_1_4

19 months agoFix a typo (#10620)
Aleksandr Kiliushin [Sun, 12 Nov 2023 09:32:05 +0000 (13:32 +0400)] 
Fix a typo (#10620)

(cherry picked from commit fc6c2b19fd7f5cb89e0c405f5aa3b3360e4c4a93)

19 months agoProperly document ARRAY.contains. #10587
Federico Caselli [Sat, 4 Nov 2023 20:32:16 +0000 (21:32 +0100)] 
Properly document ARRAY.contains. #10587

Change-Id: I86e4f01f5d897b257246fe5f970b78e3444aca3e
(cherry picked from commit 1bb9c4b94483a25057bad3d78cf9956e8f292330)

19 months agoFix lint error
Federico Caselli [Wed, 8 Nov 2023 20:49:06 +0000 (21:49 +0100)] 
Fix lint error

Change-Id: Ifb53e125fc9fd759938908710b2474656dbf1ef9
(cherry picked from commit 1da3f3455dc97ad095d7abd10add7f12efe6c1c7)

19 months agoremove . in sys.path
Mike Bayer [Wed, 8 Nov 2023 20:20:24 +0000 (15:20 -0500)] 
remove . in sys.path

this should not be needed and is causing problems in python
3.12 due to the presence of the "changelog" directory

(cherry picked from commit 8faa17d4316772340295a677c54eccf647a221c9)

20 months agoAdd trove classifier for 3.12 (#10599)
Jack McIvor [Tue, 7 Nov 2023 17:55:18 +0000 (17:55 +0000)] 
Add trove classifier for 3.12 (#10599)

(cherry picked from commit 8a583ad7bf65d5d9bf05568279723bc516de3ae3)

20 months agoVersion 1.4.51 placeholder
Mike Bayer [Sun, 29 Oct 2023 20:32:30 +0000 (16:32 -0400)] 
Version 1.4.51 placeholder

20 months ago- 1.4.50 rel_1_4_50
Mike Bayer [Sun, 29 Oct 2023 20:21:48 +0000 (16:21 -0400)] 
- 1.4.50

20 months agochangelog edits
Mike Bayer [Sun, 29 Oct 2023 20:20:40 +0000 (16:20 -0400)] 
changelog edits

Change-Id: I98b1541948407ee7e2d17b6032ba271df2163919

20 months agoMerge "revise argument to mysqlclient/pymysql ping" into rel_1_4
mike bayer [Tue, 24 Oct 2023 14:42:55 +0000 (14:42 +0000)] 
Merge "revise argument to mysqlclient/pymysql ping" into rel_1_4

20 months agoFix identity column reflection failure
Gord Thompson [Fri, 20 Oct 2023 14:19:42 +0000 (08:19 -0600)] 
Fix identity column reflection failure

Fixes: #10504
Fix reflection failure for bigint identity column with
a large identity start value (more than 18 digits).

Change-Id: I8a7ec114e4596b1710d789a4a4fb08013edd80ce
(cherry picked from commit 4c46ed6a9f6f93abd5abe5ba4b95c4c1e8f52a4c)

20 months agorevise argument to mysqlclient/pymysql ping
Mike Bayer [Tue, 17 Oct 2023 22:54:23 +0000 (18:54 -0400)] 
revise argument to mysqlclient/pymysql ping

Repaired a new incompatibility in the MySQL "pre-ping" routine where the
``False`` argument passed to ``connection.ping()``, which is intended to
disable an unwanted "automatic reconnect" feature,  is being deprecated in
MySQL drivers and backends, and is producing warnings for some versions of
MySQL's native client drivers.  It's removed for mysqlclient, whereas for
PyMySQL and drivers based on PyMySQL, the parameter will be deprecated and
removed at some point, so API introspection is used to future proof against
these various stages of removal.

Fixes: #10492
Change-Id: I8a52428c6f93a03b66a605cb0b85cc5924803d6d
references: #10489
(cherry picked from commit 0790c612b3d13761b04b55a5fdd7f6affd852320)

20 months agodont mis-render value from previous loop iteration
Mike Bayer [Thu, 19 Oct 2023 15:21:26 +0000 (11:21 -0400)] 
dont mis-render value from previous loop iteration

Fixed issue where using the same bound parameter more than once with
``literal_execute=True`` in some combinations with other literal rendering
parameters would cause the wrong values to render due to an iteration
issue.

Fixes: #10142
Change-Id: Idde314006568e3445558f0104aed9d2f4af72b56
(cherry picked from commit 9fe7c291921540df9173820d3a06b949d7a3d949)

20 months agofix 1.4 test suite
Mike Bayer [Thu, 19 Oct 2023 13:59:34 +0000 (09:59 -0400)] 
fix 1.4 test suite

add some recent fixes so we can get new 1.4 fixes merged

Change-Id: I692c8adb6b22f10629b9d797c1a64334d43f13b3

21 months agoupdate pipelines to include 3.12
Federico Caselli [Thu, 5 Oct 2023 19:16:14 +0000 (21:16 +0200)] 
update pipelines to include 3.12

Change-Id: I894a03089e4b7eedb3e42de9554c19f9ffea8ce1

22 months agoremove ancient engine.execute() reference from main engine doc
Mike Bayer [Thu, 7 Sep 2023 22:28:32 +0000 (18:28 -0400)] 
remove ancient engine.execute() reference from main engine doc

Change-Id: I51a30c2e53ad7da3e1209b5623388dd2aea7589c
(cherry picked from commit c16ed9dd24a091dbaba4683ae2f04a3f199416bf)

22 months agoFix rendering of order in sequences and identity columns.
Federico Caselli [Wed, 9 Aug 2023 21:27:21 +0000 (23:27 +0200)] 
Fix rendering of order in sequences and identity columns.

Fixes the rendering of the Oracle only ``order`` attribute in
Sequence and Identity that was passed also when rendering
the DDL in PostgreSQL.

Fixes: #10207
Change-Id: I5b918eab38ba68fa10a213a79e2bd0cc48401a02
(cherry picked from commit 5615ab52c81e2343330069f91ec3544840519956)

22 months agofix test for mysql
Mike Bayer [Tue, 15 Aug 2023 13:41:50 +0000 (09:41 -0400)] 
fix test for mysql

Change-Id: Ib05d950a4284412d2daf9b315314c46a70d9cdc7

22 months agoupdate CI supported DB versions
Mike Bayer [Mon, 14 Aug 2023 18:20:12 +0000 (14:20 -0400)] 
update CI supported DB versions

Change-Id: I6f7991242eebc2b25df96e6779881882d29eb7a1
(cherry picked from commit 41cb8f7c05c51b9ceb28dab16d348652e4bc7d82)

22 months agosafe annotate QueryableAttribute inside of join() condition
Mike Bayer [Thu, 10 Aug 2023 22:26:45 +0000 (18:26 -0400)] 
safe annotate QueryableAttribute inside of join() condition

Fixed fundamental issue which prevented some forms of ORM "annotations"
from taking place for subqueries which made use of :meth:`_sql.Select.join`
against a relationship target.  These annotations are used whenever a
subquery is used in special situations such as within
:meth:`_orm.PropComparator.and_` and other ORM-specific scenarios.

Fixes: #10223
Change-Id: I40f04265a6caa0fdcbc9f1b121a35561ab4b1fcf
(cherry picked from commit 6cfdc0743b7d1ebee3582f612a4f8acaa6ab42f9)

22 months agoMerge "implement custom setstate to work around implicit type/comparator" into rel_1_4
mike bayer [Thu, 10 Aug 2023 21:04:40 +0000 (21:04 +0000)] 
Merge "implement custom setstate to work around implicit type/comparator" into rel_1_4

22 months agore-add aiomysql to the ci, remove unmaintained note
Federico Caselli [Sat, 5 Aug 2023 10:02:53 +0000 (12:02 +0200)] 
re-add aiomysql to the ci, remove unmaintained note

References: #6893
Change-Id: Ifb70975f686eef2b7239ca266e9dbfff1f1007cb
(cherry picked from commit 8bacaad859b63418c1dd6099b4a8c7f00727c23e)

22 months agoimplement custom setstate to work around implicit type/comparator
Mike Bayer [Wed, 9 Aug 2023 14:17:35 +0000 (10:17 -0400)] 
implement custom setstate to work around implicit type/comparator

Fixed issue where unpickling of a :class:`_schema.Column` or other
:class:`_sql.ColumnElement` would fail to restore the correct "comparator"
object, which is used to generate SQL expressions specific to the type
object.

Fixes: #10213
Change-Id: I74e805024bcc0d93d549bd94757c2865b3117d72
(cherry picked from commit 9d2b83740ad5c700b28cf4ca7807c09c7338c36a)

22 months agoupdate for latest flake8
Mike Bayer [Wed, 9 Aug 2023 21:26:54 +0000 (17:26 -0400)] 
update for latest flake8

Change-Id: Ic0282fd1de889d1dcf22a1aad6e09fe3aa074dc2

23 months agofix typo in test pipeline
Federico Caselli [Mon, 10 Jul 2023 20:25:13 +0000 (22:25 +0200)] 
fix typo in test pipeline

Change-Id: I596c38cfcf56552deb913b494dd10ee4b1d68462

2 years agorepair pipelines for 2.7
Federico Caselli [Thu, 6 Jul 2023 20:49:05 +0000 (22:49 +0200)] 
repair pipelines for 2.7

Change-Id: Id4766704e4f7e4da2495ebdd8f44e4618a695df5

2 years agoVersion 1.4.50 placeholder
Mike Bayer [Wed, 5 Jul 2023 17:56:40 +0000 (13:56 -0400)] 
Version 1.4.50 placeholder

2 years ago- 1.4.49 rel_1_4_49
Mike Bayer [Wed, 5 Jul 2023 17:45:01 +0000 (13:45 -0400)] 
- 1.4.49

2 years agochangelog updates
Mike Bayer [Wed, 5 Jul 2023 17:37:25 +0000 (13:37 -0400)] 
changelog updates

Change-Id: If3baf79906d062e1e046d7c31b38eeeefdc984bf
(cherry picked from commit 0346da63f009740df2f3c1c94b80f995168d5d9e)

2 years agoupdate mypy warnings / deprecation
Mike Bayer [Wed, 5 Jul 2023 14:04:08 +0000 (10:04 -0400)] 
update mypy warnings / deprecation

Change-Id: Ib89f80568427833561f644894791f7d68caada0d