]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/log
thirdparty/sqlalchemy/sqlalchemy.git
14 months agomutate lists in place for return_defaults=True
Mike Bayer [Thu, 1 Aug 2024 13:49:55 +0000 (09:49 -0400)] 
mutate lists in place for return_defaults=True

Fixed regression from version 1.4 in
:meth:`_orm.Session.bulk_insert_mappings` where using the
:paramref:`_orm.Session.bulk_insert_mappings.return_defaults` parameter
would not populate the passed in dictionaries with newly generated primary
key values.

Fixes: #11661
Change-Id: I331d81a5b04456f107eb868f882d67773b3eec38
(cherry picked from commit 7001429a7561b3c55dd52b96dfa419004e535743)

14 months agoFixed compilation of bitwise operators on oracle and sqlite.
Federico Caselli [Mon, 29 Jul 2024 21:52:04 +0000 (23:52 +0200)] 
Fixed compilation of bitwise operators on oracle and sqlite.

Implemented bitwise operators for Oracle which was previously
non-functional due to a non-standard syntax used by this database.
Oracle's support for bitwise "or" and "xor" starts with server version 21.
Additionally repaired the implementation of "xor" for SQLite.

As part of this change, the dialect compliance test suite has been enhanced
to include support for server-side bitwise tests; third party dialect
authors should refer to new "supports_bitwise" methods in the
requirements.py file to enable these tests.

Fixes: #11663
Change-Id: I41040bd67992b6c89ed3592edca8965d5d59be9e
(cherry picked from commit ce60f93a68f312c7401802820dd17f5d91f73a2c)

14 months agoadd CTE cache elements for CompoundSelect, more verify tests
Federico Caselli [Fri, 14 Jun 2024 22:06:46 +0000 (00:06 +0200)] 
add CTE cache elements for CompoundSelect, more verify tests

Follow up of :ticket:`11471` to fix caching issue where using the
:meth:`.CompoundSelectState.add_cte` method of the
:class:`.CompoundSelectState` construct would not set a correct cache key
which distinguished between different CTE expressions. Also added tests
that would detect issues similar to the one fixed in :ticket:`11544`.

Fixes: #11471
Change-Id: Iae6a91077c987d83cd70ea826daff42855491330
(cherry picked from commit 881be0a21633b3fee101cb34cc611904b8cba618)

14 months agoImport all legacy classes by sqlalchemy.orm.collections.*
Takashi Kajinami [Mon, 29 Jul 2024 16:01:04 +0000 (12:01 -0400)] 
Import all legacy classes by sqlalchemy.orm.collections.*

Restored legacy class names removed from
``sqlalalchemy.orm.collections.*``, including
:class:`_orm.MappedCollection`, :func:`_orm.mapped_collection`,
:func:`_orm.column_mapped_collection`,
:func:`_orm.attribute_mapped_collection`. Pull request courtesy Takashi
Kajinami.

Fixes: #11435
Closes: #11432
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/11432
Pull-request-sha: 66f20a8e2069f48665299d1ee220dfe57aedf79e

Change-Id: I05172669fc9a44e737b3714001d1317bbbf0012f
(cherry picked from commit b6e9ca40bddbd6e670d40bc4ae952e1ee67d8816)

14 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)

14 months agobackport 1.4 changelogs
Mike Bayer [Mon, 29 Jul 2024 15:33:58 +0000 (11:33 -0400)] 
backport 1.4 changelogs

we have a few issues that were fixed only in 1.4, not yet released.
backport the changelog so that release mechanics proceed without issue

Change-Id: I376aa5c854314e86134c8f935b80d6c0dd083033
(cherry picked from commit 50fbde72d0e6efe0862f780f14a72eb916ea630c)

14 months agorestore transfer of mapper.local_table to DML for some cases
Mike Bayer [Sat, 20 Jul 2024 02:59:35 +0000 (22:59 -0400)] 
restore transfer of mapper.local_table to DML for some cases

Fixed regression appearing in 2.0.21 caused by :ticket:`10279` where using
a :func:`_sql.delete` or :func:`_sql.update` against an ORM class that is
the base of an inheritance hierarchy, while also specifying that subclasses
should be loaded polymorphically, would leak the polymorphic joins into the
UPDATE or DELETE statement as well creating incorrect SQL.

This re-introduces logic to set the `.table` of an ORM update or delete
back to `mapper.local_table` that was removed in d18ccdc997185b74 by
:ticket:`10279`; the logic is qualified to only take place for a
statement that's directly against a mapper and not one that's against
an aliased object.

Fixes: #11625
Change-Id: Ia228c99809370733f111925554167e39bcd6be1d
(cherry picked from commit e82660aba0b9ced0b3c65fd8fc4496e4e371fce0)

14 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

Fixed internal typing issues to establish compatibility with mypy 1.11.0.
Note that this does not include issues which have arisen with the
deprecated mypy plugin used by SQLAlchemy 1.4-style code; see the addiional
change note for this plugin indicating revised compatibility.

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 156fef61135a55c6ad17765b64155801f1dbea66)

14 months agofix test for oracledb 2.3.0
Mike Bayer [Sat, 27 Jul 2024 03:28:57 +0000 (23:28 -0400)] 
fix test for oracledb 2.3.0

Separate from adding support for 2pc for oracledb, get the test
suite to pass cleanly for all oracledb versions first

Change-Id: I39ba91e81f2afe5e9610a65fdcc88025f207089b
(cherry picked from commit a40aeef5c553212fa227b315c7da7d32fbef933c)

14 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)

14 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)

14 months agoinclude nulls_first, nulls_last in order_by_label_element
Mike Bayer [Wed, 10 Jul 2024 14:32:44 +0000 (10:32 -0400)] 
include nulls_first, nulls_last in order_by_label_element

Fixed bug where the :meth:`.Operators.nulls_first()` and
:meth:`.Operators.nulls_last()` modifiers would not be treated the same way
as :meth:`.Operators.desc()` and :meth:`.Operators.asc()` when determining
if an ORDER BY should be against a label name already in the statement. All
four modifiers are now treated the same within ORDER BY.

Fixes: #11592
Change-Id: I1de1aff679c56af1abfdfd07f9bcbc45ecc5a8cc
(cherry picked from commit 96f1172812f858fead45cdc7874abac76f45b339)

15 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)

15 months agoalter the collation of string type for collate()
Mike Bayer [Fri, 5 Jul 2024 13:30:10 +0000 (09:30 -0400)] 
alter the collation of string type for collate()

Fixed issue where the :func:`_sql.collate` construct, which explicitly sets
a collation for a given expression, would maintain collation settings for
the underlying type object from the expression, causing SQL expressions to
have both collations stated at once when used in further expressions for
specific dialects that render explicit type casts, such as that of asyncpg.
The :func:`_sql.collate` construct now assigns its own type to explicitly
include the new collation, assuming it's a string type.

Fixes: #11576
Change-Id: I6fc8904d2bcbc21f11bbca57e4a451ed0edbd879
(cherry picked from commit 35c178c405c44798810ceac540faf8385b4632c4)

15 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)

15 months agoMerge "Fix table reflection on oracle <10.2" into rel_2_0
Michael Bayer [Fri, 5 Jul 2024 14:24:08 +0000 (14:24 +0000)] 
Merge "Fix table reflection on oracle <10.2" into rel_2_0

15 months agoMerge "Allow flat for join with name" into rel_2_0
Federico Caselli [Thu, 4 Jul 2024 20:30:35 +0000 (20:30 +0000)] 
Merge "Allow flat for join with name" into rel_2_0

15 months agoAdded valid types to server_onupdate (#11555)
opkna [Thu, 4 Jul 2024 20:13:10 +0000 (22:13 +0200)] 
Added valid types to server_onupdate (#11555)

* Added valid types to server_onupdate and mapped_column kwargs mypy tests
* Joined mapped_column test files
* Set _ServerOnUpdateArgument to _ServerDefaultArgument

Fixes: #11546
(cherry picked from commit f979aff468a4bdc32aad7b073583823cddf8f21c)

15 months agoAllow flat for join with name
Eric Atkin [Wed, 3 Jul 2024 20:05:04 +0000 (16:05 -0400)] 
Allow flat for join with name

The :paramref:`_orm.aliased.name` parameter to :func:`_orm.aliased` may now
be combined with the :paramref:`_orm.aliased.flat` parameter, producing
per-table names based on a name-prefixed naming convention.  Pull request
courtesy Eric Atkin.

Fixes: #11575
Closes: #11531
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/11531
Pull-request-sha: f85535464be7b04d5f9745848d28f87dcd248b86

Change-Id: If79679c7a9598fffe99c033894b7dffecef13939
(cherry picked from commit 0e40962bf300bb26c873d00d80813a735fb7447f)

15 months agoMerge "handle DBAPI error for fetchall()" into rel_2_0
Michael Bayer [Thu, 4 Jul 2024 14:43:58 +0000 (14:43 +0000)] 
Merge "handle DBAPI error for fetchall()" into rel_2_0

15 months agoMerge "call iter() on detached/transient dynamic session" into rel_2_0
Michael Bayer [Wed, 3 Jul 2024 13:07:43 +0000 (13:07 +0000)] 
Merge "call iter() on detached/transient dynamic session" into rel_2_0

15 months agoBump pypa/cibuildwheel from 2.19.1 to 2.19.2 (#11561)
dependabot[bot] [Tue, 2 Jul 2024 20:18:06 +0000 (22:18 +0200)] 
Bump pypa/cibuildwheel from 2.19.1 to 2.19.2 (#11561)

Bumps [pypa/cibuildwheel](https://github.com/pypa/cibuildwheel) from 2.19.1 to 2.19.2.
- [Release notes](https://github.com/pypa/cibuildwheel/releases)
- [Changelog](https://github.com/pypa/cibuildwheel/blob/main/docs/changelog.md)
- [Commits](https://github.com/pypa/cibuildwheel/compare/v2.19.1...v2.19.2)

---
updated-dependencies:
- dependency-name: pypa/cibuildwheel
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
(cherry picked from commit fb388a18fb45025150b2c64cdb2a08694d993c97)

15 months agoFix table reflection on oracle <10.2
Sergio Oller Moreno [Tue, 2 Jul 2024 08:39:00 +0000 (04:39 -0400)] 
Fix table reflection on oracle <10.2

Fixed table reflection on Oracle 10.2 and older where compression options
are not supported.

Fixes: #11557
Closes: #11558
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/11558
Pull-request-sha: 44e4f51a3616388f39b0f5edee3124d389765da3

Change-Id: I34c6a367bef158a0c6cf01f185e18392552b7cc7
(cherry picked from commit e4aa3bedf83a0325f747eca187e623f48f036c9d)

15 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 d9d98eacca11490b7df878ef399b92fbb2df2f47)

15 months agohandle DBAPI error for fetchall()
Mike Bayer [Fri, 28 Jun 2024 20:30:57 +0000 (16:30 -0400)] 
handle DBAPI error for fetchall()

Fixed issue in "insertmanyvalues" feature where a particular call to
``cursor.fetchall()`` were not wrapped in SQLAlchemy's exception wrapper,
which apparently can raise a database exception during fetch when using
pyodbc.

Fixes: #11532
Change-Id: Ic07d3e79dd597e18d87a56b45ddffa25e762beb9
(cherry picked from commit fb47dbbc74f59d0be3411d52bc27155095b50631)

15 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

### Description
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)

### Checklist
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)

15 months agoMerge "Warn if an engine bind left an open transaction" into rel_2_0
Michael Bayer [Fri, 28 Jun 2024 16:29:34 +0000 (16:29 +0000)] 
Merge "Warn if an engine bind left an open transaction" into rel_2_0

15 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)

15 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"

### Description
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

### Checklist
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)

15 months agoadd additional test cases re: #11371
Mike Bayer [Wed, 26 Jun 2024 16:13:28 +0000 (12:13 -0400)] 
add additional test cases re: #11371

Just want to make sure aliased() and with_polymorphic() still
work in the of_type() context here, since that's likely why we
had Any for this parameter in the first place

Change-Id: I0a2c4445bc3b91039b3446d31b4a02db28feaee7
(cherry picked from commit 9b631dff45bbf4539c78eb73529b960acda80efd)

15 months agoMerge "set type of type_of to be same as input argument" into rel_2_0
Michael Bayer [Wed, 26 Jun 2024 16:10:25 +0000 (16:10 +0000)] 
Merge "set type of type_of to be same as input argument" into rel_2_0

15 months agoHandle "SSL SYSCALL error: Success" in psycopg2
David H. Irving [Sun, 23 Jun 2024 09:37:24 +0000 (05:37 -0400)] 
Handle "SSL SYSCALL error: Success" in psycopg2

Added "SSL SYSCALL error: Success" to the list of exceptions
that are considered a "disconnect" in psycopg2.

Fixes: #11522
Closes: #11523
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/11523
Pull-request-sha: 63ad54e49dc3daa459caa29da8cffcb3e47a3f8c

Change-Id: I0db49d5c4db418a8e634f5370c76b99aaa3d3af6
(cherry picked from commit 03d2832fbfd053b6f58f0879e823920ca9d71cbb)

15 months agoset type of type_of to be same as input argument
Wouter Kayser [Sun, 23 Jun 2024 10:18:05 +0000 (06:18 -0400)] 
set type of type_of to be same as input argument

Fixes: #11371
Fixes the of_type method so that it does not return a class with unset generic.
See the original issue for a more detailed explanation.

Closes: #11416
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/11416
Pull-request-sha: ed8d0edebb6b84b9dcffcf24c52f113c37e7fedd

Change-Id: I35637491d6d9c573825f6d13299712626dd521c5
(cherry picked from commit 7d8dfa10df3be8d138dd954708efca7d6ed0e503)

15 months agoWarn if an engine bind left an open transaction
Federico Caselli [Fri, 15 Mar 2024 18:15:27 +0000 (19:15 +0100)] 
Warn if an engine bind left an open transaction

Added a warning noting when an
:meth:`_engine.ConnectionEvents.engine_connect` event may be leaving
a transaction open, which can alter the behavior of a
class:`_orm.Session` using such an engine as bind.
On SQLAlchemy 2.1 :paramref:`_orm.Session.join_transaction_mode` will
instead be ignored in all cases when the session bind is
an :class:`_engine.Engine`.

Fixes: #11163
Change-Id: I10147876d07352f2dab898d615e98a9acd6eb91b
(cherry picked from commit 69a2d0903e427e99acceedcd4e29a17d0b012bbe)

15 months agocreate JoinedDispatcher subclasses up front
Mike Bayer [Mon, 24 Jun 2024 19:07:41 +0000 (15:07 -0400)] 
create JoinedDispatcher subclasses up front

Fixed additional issues in the event system triggered by unpickling of a
:class:`.Enum` datatype, continuing from :ticket:`11365` and
:ticket:`11360`,  where dynamically generated elements of the event
structure would not be present when unpickling in a new process.

Fixes: #11530
Change-Id: Ie1f2b3453d4891051f8719f6d3f6703302d5a86e
(cherry picked from commit dffd96e7545348d6d1830cdfc4fcf231237010d2)

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

15 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)

15 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)

15 months agoBump pypa/cibuildwheel from 2.19.0 to 2.19.1 (#11491)
dependabot[bot] [Sun, 23 Jun 2024 10:08:31 +0000 (12:08 +0200)] 
Bump pypa/cibuildwheel from 2.19.0 to 2.19.1 (#11491)

Bumps [pypa/cibuildwheel](https://github.com/pypa/cibuildwheel) from 2.19.0 to 2.19.1.
- [Release notes](https://github.com/pypa/cibuildwheel/releases)
- [Changelog](https://github.com/pypa/cibuildwheel/blob/main/docs/changelog.md)
- [Commits](https://github.com/pypa/cibuildwheel/compare/v2.19.0...v2.19.1)

---
updated-dependencies:
- dependency-name: pypa/cibuildwheel
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
(cherry picked from commit a98eed3c6288b197a2d1f26daaac1a8bc194f81e)

15 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)

15 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

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

15 months agoVersion 2.0.32 placeholder
Mike Bayer [Tue, 18 Jun 2024 21:39:11 +0000 (17:39 -0400)] 
Version 2.0.32 placeholder

15 months ago- 2.0.31 rel_2_0_31
Mike Bayer [Tue, 18 Jun 2024 19:04:17 +0000 (15:04 -0400)] 
- 2.0.31

15 months agoMerge "Use deque for the asnycio cursors" into rel_2_0
Michael Bayer [Tue, 18 Jun 2024 18:16:21 +0000 (18:16 +0000)] 
Merge "Use deque for the asnycio cursors" into rel_2_0

15 months agoMerge "restore declared_attr consumption for __table__" into rel_2_0
Michael Bayer [Tue, 18 Jun 2024 16:32:03 +0000 (16:32 +0000)] 
Merge "restore declared_attr consumption for __table__" into rel_2_0

15 months agoImprove the documentation of json.as method
Federico Caselli [Wed, 27 Mar 2024 21:00:00 +0000 (22:00 +0100)] 
Improve the documentation of json.as method

Mention that these method are more like ``type_coerce`` than
``cast``.

Fixes: #11065
Change-Id: Ia5bd4f6d5f48be9557d0504f628202e1e6ddf6d1
(cherry picked from commit 312f2e017dfcd9f4d9132e76705bd8420a130fb4)

15 months agoMerge "Correct 'Session.is_modified' method documentation" into rel_2_0
Michael Bayer [Tue, 18 Jun 2024 16:29:04 +0000 (16:29 +0000)] 
Merge "Correct 'Session.is_modified' method documentation" into rel_2_0

15 months agorestore declared_attr consumption for __table__
Mike Bayer [Tue, 18 Jun 2024 02:45:16 +0000 (22:45 -0400)] 
restore declared_attr consumption for __table__

Fixed bug in ORM Declarative where the ``__table__`` directive could not be
declared as a class function with :func:`_orm.declared_attr` on a
superclass, including an ``__abstract__`` class as well as coming from the
declarative base itself.  This was a regression since 1.4 where this was
working, and there were apparently no tests for this particular use case.

Fixes: #11509
Change-Id: I82ef0f93d00cb7a43b0b1b16ea28f1a9a79eba3b
(cherry picked from commit 30ec43440168fa79a4d45db64c387562ef8f97e6)

15 months agoCorrect 'Session.is_modified' method documentation
Roman Druzhkov [Sun, 16 Jun 2024 18:48:30 +0000 (14:48 -0400)] 
Correct 'Session.is_modified' method documentation

Correct 'Session.is_modified' method documentation.

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

### Description
Correct documentation according to discussion: https://github.com/sqlalchemy/sqlalchemy/discussions/11481#discussioncomment-9759171

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

Change-Id: Ia8be0e3865190f0667de006c3006ecf646ef8422

15 months agoadd greenlet support for py313
Mike Bayer [Sun, 16 Jun 2024 15:26:41 +0000 (11:26 -0400)] 
add greenlet support for py313

based on vstinners patch

Change-Id: I3e852796b49fe51db51c030d03d17cfb6baa7484
(cherry picked from commit 5360cd115422d560b65456794cd700c7c87bfca6)

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

15 months agostrongly discourage noload
Mike Bayer [Thu, 13 Jun 2024 14:04:01 +0000 (10:04 -0400)] 
strongly discourage noload

Change-Id: I54a1c1d29b33091838b7f3fcd46eeec48bbd498b

15 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)

15 months agoMerge "include HasCTE traversal elements in TextualSelect" into rel_2_0
Michael Bayer [Thu, 13 Jun 2024 13:26:20 +0000 (13:26 +0000)] 
Merge "include HasCTE traversal elements in TextualSelect" into rel_2_0

15 months agoBump pypa/cibuildwheel from 2.17.0 to 2.19.0 (#11474)
dependabot[bot] [Tue, 11 Jun 2024 21:59:19 +0000 (23:59 +0200)] 
Bump pypa/cibuildwheel from 2.17.0 to 2.19.0 (#11474)

Bumps [pypa/cibuildwheel](https://github.com/pypa/cibuildwheel) from 2.17.0 to 2.19.0.
- [Release notes](https://github.com/pypa/cibuildwheel/releases)
- [Changelog](https://github.com/pypa/cibuildwheel/blob/main/docs/changelog.md)
- [Commits](https://github.com/pypa/cibuildwheel/compare/v2.17.0...v2.19.0)

---
updated-dependencies:
- dependency-name: pypa/cibuildwheel
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
(cherry picked from commit b320b04af2eb247c3466ac446f138add5eddb3b6)

15 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)

15 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)

15 months agoMerge "add additional contextual path info when splicing eager joins" into rel_2_0
Michael Bayer [Sat, 8 Jun 2024 14:43:52 +0000 (14:43 +0000)] 
Merge "add additional contextual path info when splicing eager joins" into rel_2_0

16 months agoMerge "Document InstanceState modified and expired." into rel_2_0
Michael Bayer [Thu, 6 Jun 2024 13:53:08 +0000 (13:53 +0000)] 
Merge "Document InstanceState modified and expired." into rel_2_0

16 months agoadd additional contextual path info when splicing eager joins
Mike Bayer [Tue, 4 Jun 2024 14:56:26 +0000 (10:56 -0400)] 
add additional contextual path info when splicing eager joins

Fixed very old issue involving the :paramref:`_orm.joinedload.innerjoin`
parameter where making use of this parameter mixed into a query that also
included joined eager loads along a self-referential or other cyclical
relationship, along with complicating factors like inner joins added for
secondary tables and such, would have the chance of splicing a particular
inner join to the wrong part of the query.  Additional state has been added
to the internal method that does this splice to make a better decision as
to where splicing should proceed.

Fixes: #11449
Change-Id: Ie8f0e8d9bb7958baac33c7c2231e4afae15cf5b1
(cherry picked from commit c4c57237b76f3992a62c6eb5c23fd4e1919f1e4a)

16 months agoexpand entity_isa to include simple "isa" in poly case
Mike Bayer [Mon, 3 Jun 2024 18:50:25 +0000 (14:50 -0400)] 
expand entity_isa to include simple "isa" in poly case

Fixed issue where the :func:`_orm.selectinload` and
:func:`_orm.subqueryload` loader options would fail to take effect when
made against an inherited subclass that itself included a subclass-specific
:paramref:`_orm.Mapper.with_polymorphic` setting.

Fixes: #11446
Change-Id: I2df3ebedbe4aa9da58af99d7729e5f3052ad6abc
(cherry picked from commit 63a903b918343ca312aaded93b7e9af7a88fa3a8)

16 months agoMerge "Add missing function element methods" into rel_2_0
Michael Bayer [Mon, 3 Jun 2024 14:25:01 +0000 (14:25 +0000)] 
Merge "Add missing function element methods" into rel_2_0

16 months agoMerge "Make `FunctionFilter.filter` generative" into rel_2_0
Michael Bayer [Mon, 3 Jun 2024 14:19:12 +0000 (14:19 +0000)] 
Merge "Make `FunctionFilter.filter` generative" into rel_2_0

16 months agoDocument InstanceState modified and expired.
Federico Caselli [Sun, 2 Jun 2024 09:51:31 +0000 (11:51 +0200)] 
Document InstanceState modified and expired.

Fixes: #11431
Change-Id: Iff762b0c14db5b8851ea8fa20f4304c0cc6657de
(cherry picked from commit c1cc8793388214351ab0ccead9616c80458c5bb9)

16 months agoMake `FunctionFilter.filter` generative
Federico Caselli [Wed, 29 May 2024 19:39:08 +0000 (21:39 +0200)] 
Make `FunctionFilter.filter` generative

Fixed bug in :meth:`_sql.FunctionFilter.filter` that would mutate
the existing function in-place. It now behaves like the rest of the
SQLAlchemy API, returning a new instance instead of mutating the
original one.

Fixes: #11426
Change-Id: I46ffebaed82426cfb1623db066686cfb911055a1
(cherry picked from commit fe2ced9e79b9640f3ca135f8d3782dd41ca16782)

16 months agoAdd missing function element methods
Federico Caselli [Wed, 29 May 2024 20:18:50 +0000 (22:18 +0200)] 
Add missing function element methods

Added missing methods :meth:`_sql.FunctionFilter.within_group`
and :meth:`_sql.WithinGroup.filter`

Fixes: #11423
Change-Id: I4bafd9e3cab5883b28b2b997269df239739a2212
(cherry picked from commit 57bba096599ff10be008283261054e46c9d08d0b)

16 months agoMerge "Add test for issue 11412" into rel_2_0
Michael Bayer [Thu, 30 May 2024 17:36:59 +0000 (17:36 +0000)] 
Merge "Add test for issue 11412" into rel_2_0

16 months agoFix Over serialization
Federico Caselli [Wed, 29 May 2024 20:03:17 +0000 (22:03 +0200)] 
Fix Over serialization

Fixed issue when serializing an :func:`_sql.over` clause with
unbounded range or rows.

Fixes: #11422
Change-Id: I52a9f72205fd9c7ef5620596c83551e73d5cee5b
(cherry picked from commit 9f4f84ffdc1be487930b00d0b190bd492d302ca1)

16 months agoskip dunders for langhelper symbol redefine; update tox
Mike Bayer [Sun, 26 May 2024 15:34:27 +0000 (11:34 -0400)] 
skip dunders for langhelper symbol redefine; update tox

Set up full Python 3.13 support to the extent currently possible, repairing
issues within internal language helpers as well as the serializer extension
module.

update tox for what will be a regular condition: greenlet is
not available (and possibly other things like pymssql):

1. dont use "sqlalchemy[asyncio]" in pyproejct.toml as an extra; this
   goes out to pypi and ignores the local file
2. add py{3,38,39,...} qualifiers for asyncio deps in tox.ini.   After
   many attempts I seem to have something that's fairly non-repetetive
   though I'd still prefer a single variable for this, somehow

Fixes: #11417
Change-Id: Ib2ceccd9583d8776700f0da5b591906efcfe6e6f
(cherry picked from commit 577b53c70993a496aa4149adc477e0732310dd7d)

16 months agoUse deque for the asnycio cursors
Federico Caselli [Sat, 4 May 2024 20:06:12 +0000 (22:06 +0200)] 
Use deque for the asnycio cursors

Uniform the implementation of the asyncio adapted cursors to
consistently use a deque as the internal row buffer.

Change-Id: If074f06c672569dbdd326cdf7a75800c45336d66

16 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)

16 months agoMerge "Improve implementation of server side cursor in asyncpg" into rel_2_0
Michael Bayer [Wed, 22 May 2024 15:28:14 +0000 (15:28 +0000)] 
Merge "Improve implementation of server side cursor in asyncpg" into rel_2_0

16 months agoMerge "Add ``SET DEFAULT`` reflection option" into rel_2_0
Michael Bayer [Wed, 22 May 2024 15:20:51 +0000 (15:20 +0000)] 
Merge "Add ``SET DEFAULT`` reflection option" into rel_2_0

16 months agoMerge "Optimize has_intersection func" into rel_2_0
Michael Bayer [Wed, 22 May 2024 15:19:33 +0000 (15:19 +0000)] 
Merge "Optimize has_intersection func" into rel_2_0

16 months agoOptimize has_intersection func
Semyon Pupkov [Sat, 11 May 2024 12:41:06 +0000 (08:41 -0400)] 
Optimize has_intersection func

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

Optimize `has_intersection` function.  It uses in few places, but even so it might be optimized. New version:
1. Does not allocate new set
2. A bit of performance speedup
```
from sqlalchemy import util

import timeit
import functools

a = {1, 2, 3}
b = [2, 3, 4]

t1 = timeit.Timer(functools.partial(util.has_intersection, a, b))
t2 = timeit.Timer(functools.partial(util.has_intersection2, a, b))

print("old", t1.timeit())
print("new", t2.timeit())

old 0.37196154199773446
new 0.29704541599494405

old 0.37331208398973104
new 0.29647241700149607
```

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

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

Change-Id: Ic1ec1448641304eba4751f55f1e3c2b217f7f352
(cherry picked from commit 5b43687da6820884c75531e89d6347bf285a3b2c)

16 months agoAdd ``insert_default`` to ``Column``.
Federico Caselli [Thu, 9 May 2024 20:21:11 +0000 (22:21 +0200)] 
Add ``insert_default`` to ``Column``.

Added :paramref:`_schema.Column.insert_default` as an alias of
:paramref:`_schema.Column.default` for compatibility with
func:`_orm.mapped_column`.

Fixes: #11374
Change-Id: I5509b6cbac7b37ac37430a88442b1319cc9c1024
(cherry picked from commit c87572b60cbcb869c41a7b4283a11c5c14ef048c)

16 months agoAdd ``SET DEFAULT`` reflection option
roche-quentin [Wed, 8 May 2024 10:48:09 +0000 (06:48 -0400)] 
Add ``SET DEFAULT`` reflection option

Added missing foreign key reflection option ``SET DEFAULT``
in the MySQL and MariaDB dialects.

Fixes: #11285
Closes: #11368
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/11368
Pull-request-sha: dbd9c239c60b8f4f2be66967825ee15c1f7941b0

Change-Id: If61d3365fc4271432d5591d1b50e10f4a1da9290
(cherry picked from commit 323a7dcb5e70ae555e771beb63e3a58158f003a2)

16 months agosetup JoinedDispatch to support pickling
Mike Bayer [Tue, 7 May 2024 22:03:51 +0000 (18:03 -0400)] 
setup JoinedDispatch to support pickling

Fixed issue where a :class:`.MetaData` collection would not be
serializable, if an :class:`.Enum` or :class:`.Boolean` datatype were
present which had been adapted. This specific scenario in turn could occur
when using the :class:`.Enum` or :class:`.Boolean` within ORM Annotated
Declarative form where type objects frequently get copied.

Fixes: #11365
Change-Id: Iaaa64baad79c41075d37cf53dade744d79e600a3
(cherry picked from commit 93cfb49572ac56bc320a09b82285bf8ef8cdff57)

17 months agoAdd name parameter to with_polymorphic.
Federico Caselli [Mon, 6 May 2024 21:10:46 +0000 (23:10 +0200)] 
Add name parameter to with_polymorphic.

Added missing parameter :paramref:`_orm.with_polymorphic.name` that
allows specifying the name of returned :class:`_orm.AliasedClass`.

Fixes: #11361
Change-Id: I1eae550452526d85da1377207c5fa5e93ac673c3
(cherry picked from commit 02001e9458802ebb512a140aa24e663b364dc3ad)

17 months agoImprove implementation of server side cursor in asyncpg
Federico Caselli [Sat, 4 May 2024 20:12:28 +0000 (22:12 +0200)] 
Improve implementation of server side cursor in asyncpg

Change-Id: I36d0ff5ccea7fbf46cabcfeae1492b9a90b7f68b
(cherry picked from commit e3571e1d4b4d34a250886a8967a9b1339f0c68a7)

17 months agoVersion 2.0.31 placeholder
Mike Bayer [Sun, 5 May 2024 18:04:18 +0000 (14:04 -0400)] 
Version 2.0.31 placeholder

17 months ago- 2.0.30 rel_2_0_30
Mike Bayer [Sun, 5 May 2024 17:52:32 +0000 (13:52 -0400)] 
- 2.0.30

17 months agotypo fixes
Mike Bayer [Sun, 5 May 2024 17:15:57 +0000 (13:15 -0400)] 
typo fixes

Change-Id: I8f3a1d755d03e6c11fa1f783f111977b7ddc22fb
(cherry picked from commit 96a50e381ed97dfa92900e3212e1598bc99123a7)

17 months agoMerge "Updated typing for self_group()" into rel_2_0
Michael Bayer [Sun, 5 May 2024 15:43:12 +0000 (15:43 +0000)] 
Merge "Updated typing for self_group()" into rel_2_0

17 months agoMerge "Add overload for ColumnCollection.get(col, default)" into rel_2_0
Michael Bayer [Sun, 5 May 2024 15:32:40 +0000 (15:32 +0000)] 
Merge "Add overload for ColumnCollection.get(col, default)" into rel_2_0

17 months agorevise approach for bundle deduping
Mike Bayer [Sat, 4 May 2024 14:38:48 +0000 (10:38 -0400)] 
revise approach for bundle deduping

Revise the approach from 7d6d7ef73 to make a special case for
Bundle-targeted columns entirely, and don't involve the
_label_convention() callable.   Add tests for select() with
tablename labeling convention.

Fixes: #11347
Change-Id: I1d15523de5709d45b2b69bc17724831ac3425791
(cherry picked from commit 83f8dd53e362c3ea7562c0076add044740d2c4cc)

17 months agoUpdated typing for self_group()
Federico Caselli [Sat, 4 May 2024 09:23:52 +0000 (11:23 +0200)] 
Updated typing for self_group()

Fixes: #10939
Closes: #11037
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/11037
Pull-request-sha: 3ebf4db506ffef629f938f4f36fc76d6671b98e1

Change-Id: I22218286b0dac7bafaaf6955557e25f99a6aefe1
(cherry picked from commit 7173b047788f8a4230647bfc252037c6e227c708)

17 months agoAdd overload for ColumnCollection.get(col, default)
Mark Elliot [Mon, 29 Apr 2024 21:50:10 +0000 (17:50 -0400)] 
Add overload for ColumnCollection.get(col, default)

### Description
Fixes #11328 by adding an overload to ColumnCollection when a non-None default is provided.

### Checklist
This pull request is:

- [ ] A documentation / typographical / small typing error fix
- Good to go, no issue or tests are needed
- [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.
- [ ] 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.

Closes: #11329
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/11329
Pull-request-sha: 32db849e0df1db357df79df3a0dc2263a755d04e

Change-Id: I8bef91c423fb7048ec8d4a7c99f70f0b1588c37a
(cherry picked from commit ab6df37dad5cccbd0328e83ed55c7cfed91344cb)

17 months agoMerge "disable col deduping inside of Bundle" into rel_2_0
Federico Caselli [Sat, 4 May 2024 08:11:00 +0000 (08:11 +0000)] 
Merge "disable col deduping inside of Bundle" into rel_2_0

17 months agoBump pypa/cibuildwheel from 2.16.5 to 2.17.0 (#11148)
dependabot[bot] [Sat, 4 May 2024 08:09:30 +0000 (10:09 +0200)] 
Bump pypa/cibuildwheel from 2.16.5 to 2.17.0 (#11148)

Bumps [pypa/cibuildwheel](https://github.com/pypa/cibuildwheel) from 2.16.5 to 2.17.0.
- [Release notes](https://github.com/pypa/cibuildwheel/releases)
- [Changelog](https://github.com/pypa/cibuildwheel/blob/main/docs/changelog.md)
- [Commits](https://github.com/pypa/cibuildwheel/compare/v2.16.5...v2.17.0)

---
updated-dependencies:
- dependency-name: pypa/cibuildwheel
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
(cherry picked from commit 8e1e980b50b0be71f641bca7d81d32fef6565612)

17 months agoUpdate index.rst to include MariaDB (#11337)
Robert Silén [Sat, 4 May 2024 08:06:32 +0000 (11:06 +0300)] 
Update index.rst to include MariaDB (#11337)

Changing title of link to "dialects/mysql" to read "MySQL and MariaDB" to match the actual title of the page. (before link says just MySQL)

(cherry picked from commit 000f1832700fc28cae5fe9f3d7356835095052bb)

17 months agoMerge "improve pep-695 inference including Enum support" into rel_2_0
Federico Caselli [Sat, 4 May 2024 07:31:15 +0000 (07:31 +0000)] 
Merge "improve pep-695 inference including Enum support" into rel_2_0

17 months agoMerge "ensure result_map objects collection is non-empty" into rel_2_0
Michael Bayer [Thu, 2 May 2024 22:55:01 +0000 (22:55 +0000)] 
Merge "ensure result_map objects collection is non-empty" into rel_2_0

17 months agoimprove pep-695 inference including Enum support
Alc-Alc [Thu, 25 Apr 2024 19:42:34 +0000 (15:42 -0400)] 
improve pep-695 inference including Enum support

Fixed issue in ORM Annotated Declarative where typing issue where literals
defined using :pep:`695` type aliases would not work with inference of
:class:`.Enum` datatypes. Pull request courtesy of Alc-Alc.

Fixes: #11305
Closes: #11313
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/11313
Pull-request-sha: 090f0d865c4129cffffbce6a6ce3db9b91602460

Change-Id: Iac63302ad74fd7018a34a50c80ec3aeb87dc94a4
(cherry picked from commit ce26cfa5d5253345a5f962359e5c742ea039c211)

17 months agoMerge "Improve typing to the count function." into rel_2_0
Michael Bayer [Thu, 2 May 2024 22:34:53 +0000 (22:34 +0000)] 
Merge "Improve typing to the count function." into rel_2_0

17 months agodisable col deduping inside of Bundle
Mike Bayer [Thu, 2 May 2024 15:45:31 +0000 (11:45 -0400)] 
disable col deduping inside of Bundle

Fixed issue where attribute key names in :class:`_orm.Bundle` would not be
correct when using ORM enabled :class:`_sql.select` vs.
:class:`_orm.Query`, when the statement contained duplicate column names.

Fixed issue in typing for :class:`_orm.Bundle` where creating a nested
:class:`_orm.Bundle` structure were not allowed.

Fixes: #11347
Change-Id: I24b37c99f83068c668736caaaa06e69a6801ff50
(cherry picked from commit 7d6d7ef73a680d1502ac675b9ae53a6c335b723e)

17 months agoMerge "Ignore all dunders when checking attributes in `sqlalchemy.util.langhelpers...
Michael Bayer [Wed, 1 May 2024 15:51:37 +0000 (15:51 +0000)] 
Merge "Ignore all dunders when checking attributes in `sqlalchemy.util.langhelpers.TypingOnly`" into rel_2_0

17 months agoensure result_map objects collection is non-empty
Mike Bayer [Tue, 30 Apr 2024 19:41:04 +0000 (15:41 -0400)] 
ensure result_map objects collection is non-empty

Fixed issue in cursor handling which affected handling of duplicate
:class:`_sql.Column` or similar objcts in the columns clause of
:func:`_sql.select`, both in combination with arbitary :func:`_sql.text()`
clauses in the SELECT list, as well as when attempting to retrieve
:meth:`_engine.Result.mappings` for the object, which would lead to an
internal error.

Fixes: #11306
Change-Id: I418073b2fdba86b2121b6d00eaa40b1805b69bb8
(cherry picked from commit fbb7172c69402d5f0776edc96d1c23a7cfabd3d0)

17 months agoMerge "only consider column / relationship attrs for subclass IN" into rel_2_0
Michael Bayer [Tue, 30 Apr 2024 16:16:00 +0000 (16:16 +0000)] 
Merge "only consider column / relationship attrs for subclass IN" into rel_2_0

17 months agoMerge "Fix issue in bulk_save_objects" into rel_2_0
Michael Bayer [Tue, 30 Apr 2024 16:14:49 +0000 (16:14 +0000)] 
Merge "Fix issue in bulk_save_objects" into rel_2_0