]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/log
thirdparty/sqlalchemy/sqlalchemy.git
18 months agoImprove formatting of data_select.rst (#10931)
Umer Zia [Tue, 6 Feb 2024 17:56:09 +0000 (18:56 +0100)] 
Improve formatting of data_select.rst (#10931)

(cherry picked from commit 3a4e9063e47e660c2d49ba6e62d7f647a1b6e76a)

18 months agoAdd bullets (#10973)
Artem Smirnov [Tue, 6 Feb 2024 17:55:41 +0000 (19:55 +0200)] 
Add bullets (#10973)

* Add bullets

* Fix as suggested

(cherry picked from commit 70ee72b2cb1dbfa37f29628737ab7dccf2de0fa3)

18 months agoBump pypa/cibuildwheel from 2.16.2 to 2.16.5 (#10947)
dependabot[bot] [Tue, 6 Feb 2024 17:53:28 +0000 (18:53 +0100)] 
Bump pypa/cibuildwheel from 2.16.2 to 2.16.5 (#10947)

Bumps [pypa/cibuildwheel](https://github.com/pypa/cibuildwheel) from 2.16.2 to 2.16.5.
- [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.2...v2.16.5)

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

18 months agoupdate .git-blame-ignore-revs to exclude black update commit
Federico Caselli [Tue, 6 Feb 2024 17:51:14 +0000 (18:51 +0100)] 
update .git-blame-ignore-revs to exclude black update commit

Change-Id: Ia713fe6e880c3eba50386bcc1b04ca518160d7d5

18 months agoMerge "add additional IMV UUID tests, fix pymssql case" into rel_2_0
Michael Bayer [Tue, 6 Feb 2024 00:27:53 +0000 (00:27 +0000)] 
Merge "add additional IMV UUID tests, fix pymssql case" into rel_2_0

18 months agoMerge "Update black to 24.1.1" into rel_2_0
Michael Bayer [Mon, 5 Feb 2024 23:18:50 +0000 (23:18 +0000)] 
Merge "Update black to 24.1.1" into rel_2_0

18 months agoadd additional IMV UUID tests, fix pymssql case
Mike Bayer [Mon, 5 Feb 2024 17:02:19 +0000 (12:02 -0500)] 
add additional IMV UUID tests, fix pymssql case

Fixed an issue regarding the use of the :class:`.Uuid` datatype with the
:paramref:`.Uuid.as_uuid` parameter set to False, when using the pymssql
dialect. ORM-optimized INSERT statements (e.g. the "insertmanyvalues"
feature) would not correctly align primary key UUID values for bulk INSERT
statements, resulting in errors.

This change also adds a small degree of generalization to the
Uuid datatype by adding the native/non-native compilation conditional
to the base compiler.

Patch is originally part of Ib920871102b9b64f2cba9697f5cb72b6263e4ed8
which is implementing native UUID for mariadb in 2.1 only.

Change-Id: I96cbec5c0ece312b345206aa5a5db2ffcf732d41
(cherry picked from commit 9b1c9d5d2e2f9a1e83cf80ca5cd834de213e59ea)

18 months agorun postfetch_post_update for version_id_col even if delete
Mike Bayer [Mon, 5 Feb 2024 21:06:28 +0000 (16:06 -0500)] 
run postfetch_post_update for version_id_col even if delete

Fixed issue where using :meth:`_orm.Session.delete` along with the
:paramref:`_orm.Mapper.version_id_col` feature would fail to use the
correct version identifier in the case that an additional UPDATE were
emitted against the target object as a result of the use of
:paramref:`_orm.relationship.post_update` on the object.  The issue is
similar to :ticket:`10800` just fixed in version 2.0.25 for the case of
updates alone.

Fixes: #10967
Change-Id: I959e9a2cc3e750e86e8de7b12b28ee1e819ed6d8
(cherry picked from commit 367e0e27a2e6930c66f2f98fbe477f9b1f06e2ca)

18 months agoUpdate black to 24.1.1
Federico Caselli [Wed, 31 Jan 2024 22:20:26 +0000 (23:20 +0100)] 
Update black to 24.1.1

Change-Id: Iadaea7b798d8e99302e1acb430dc7b758ca61137

18 months agoExport array module from postgresql
Federico Caselli [Mon, 29 Jan 2024 19:09:56 +0000 (20:09 +0100)] 
Export array module from postgresql

Before this module was shadowed by same named array classe.

Change-Id: I6fc56795c9363a9a07466fd36fcd49d0fb9658f7
(cherry picked from commit 47716f5a45eb91361a5fdabb420144a1807ca8ae)

18 months agoMerge "suffix index names with "_history" just like tables" into rel_2_0
Michael Bayer [Sat, 27 Jan 2024 22:55:18 +0000 (22:55 +0000)] 
Merge "suffix index names with "_history" just like tables" into rel_2_0

18 months agore-establish section on why __init__ not called on load
Mike Bayer [Fri, 26 Jan 2024 14:17:31 +0000 (09:17 -0500)] 
re-establish section on why __init__ not called on load

this section got lost, leaving the FAQ to point to an
empty document.  Rewrite a new section introducing that
__init__ is not called on load, illustrate strategies.

I am not that happy with *where* this doc is, as this is
supposed to be "mapping styles" high level introductory
type stuff, but there's nowhere else for it.

References: https://github.com/sqlalchemy/sqlalchemy/discussions/10923
Change-Id: Ie9260e4076bc82da0ef6dc11349a85beb0223a33
(cherry picked from commit f7b40c0102c33faf350917f5b98c61d4c6fbec90)

18 months agoFix typo in a docstring (#10925)
Eugene Toder [Thu, 25 Jan 2024 22:19:44 +0000 (17:19 -0500)] 
Fix typo in a docstring (#10925)

* Fix typo in a docstring

It's "compiled_cache" not "query_cache".

* Update async engine as well

(cherry picked from commit e7cda85d81038cf390a15b93d5276754a8cc2514)

18 months agoMerge "Support specifying access method when creating Postgres tables" into rel_2_0
Michael Bayer [Wed, 24 Jan 2024 15:32:48 +0000 (15:32 +0000)] 
Merge "Support specifying access method when creating Postgres tables" into rel_2_0

18 months agoMerge "Correct type hint for FunctionElement.table_valued()" into rel_2_0
Michael Bayer [Wed, 24 Jan 2024 15:32:03 +0000 (15:32 +0000)] 
Merge "Correct type hint for FunctionElement.table_valued()" into rel_2_0

18 months agosuffix index names with "_history" just like tables
Mike Bayer [Tue, 23 Jan 2024 19:06:01 +0000 (14:06 -0500)] 
suffix index names with "_history" just like tables

Fixed regression in history_meta example where the use of
:meth:`_schema.MetaData.to_metadata` to make a copy of the history table
would also copy indexes (which is a good thing), but causing naming
conflicts indexes regardless of naming scheme used for those indexes. A
"_history" suffix is now added to these indexes in the same way as is
achieved for the table name.

Fixes: #10920
Change-Id: I78823650956ff979d500bedbdbce261048894ce9
(cherry picked from commit dab1da6049d210843c16d96b20ae0efc063eead3)

18 months agofix a docs typo (#10912)
Jeff Balogh [Tue, 23 Jan 2024 19:25:10 +0000 (13:25 -0600)] 
fix a docs typo (#10912)

The code following this declaration suggests the employee.type should be `sysadmin`

(cherry picked from commit abadb149597e5891551b84e47d3085c3f1753ef2)

18 months agoUpdate cascades.rst (#10918)
Gord Thompson [Tue, 23 Jan 2024 19:22:32 +0000 (12:22 -0700)] 
Update cascades.rst (#10918)

"delete-cascade" → "delete-orphan"

(cherry picked from commit d0bcf95cb022934d101aa94411f320c4e3bfb6aa)

18 months agoCorrect type hint for FunctionElement.table_valued()
Martijn Pieters [Tue, 16 Jan 2024 12:03:09 +0000 (07:03 -0500)] 
Correct type hint for FunctionElement.table_valued()

### Description

The documentation and the type annotations for `TableValueType()` clearly
state that both strings and column expression arguments are accepted
but the annotation omits `str`, which is the most common use case.

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

Closes: #10886
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/10886
Pull-request-sha: 624a97f051b378516518a30d88e7f216456d1c50

Change-Id: I2a1d2eb9b70815c33a27dd238ff2a9f11e5f5a64
(cherry picked from commit 48d3ad2d90308905709d886fb38dc1de2e2e2478)

18 months agoParse NOT NULL for MySQL generated columns
Georg Wicke-Arndt [Mon, 22 Jan 2024 15:22:43 +0000 (10:22 -0500)] 
Parse NOT NULL for MySQL generated columns

Fixed issue where NULL/NOT NULL would not be properly reflected from a
MySQL column that also specified the VIRTUAL or STORED directives.  Pull
request courtesy Georg Wicke-Arndt.

Fixes: #10850
Closes: #10851
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/10851
Pull-request-sha: fb9a81020c393231ca90a1e88342b11cf64414a1

Change-Id: I9a80d0db722c15682e18f0390a7b58e5979e73a1
(cherry picked from commit 14f30b85c7bea7839111bbe54576b290457e3a8d)

18 months agoSupport specifying access method when creating Postgres tables
Edgar Ramírez Mondragón [Mon, 22 Jan 2024 07:29:44 +0000 (02:29 -0500)] 
Support specifying access method when creating Postgres tables

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

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

- [ ] 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.
- [x] 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.

Fixes #10904

**Have a nice day!**

Closes: #10905
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/10905
Pull-request-sha: 85f232a303a5543725dac42206cb2395fc34109e

Change-Id: I5e2fc05a696eb6da71bbd695f0466e8552d203b6
(cherry picked from commit 46899918a6dda07cca07e30af2526134f9c38809)

18 months agouse sequence instead of list in result docs
Federico Caselli [Sat, 20 Jan 2024 17:33:28 +0000 (18:33 +0100)] 
use sequence instead of list in result docs

Change-Id: Iaed8505c495455f0d82e4b0cbcc7dffd2d833408
(cherry picked from commit 9fe5f4fcf2f36e35c7a6865bbaa29dc05617d01e)

18 months agoremove loader depth warning, replace with logging message
Mike Bayer [Thu, 18 Jan 2024 02:15:37 +0000 (21:15 -0500)] 
remove loader depth warning, replace with logging message

Replaced the "loader depth is excessively deep" warning with a shorter
message added to the caching badge within SQL logging, for those statements
where the ORM disabled the cache due to a too-deep chain of loader options.
The condition which this warning highlights is difficult to resolve and is
generally just a limitation in the ORM's application of SQL caching. A
future feature may include the ability to tune the threshold where caching
is disabled, but for now the warning will no longer be a nuisance.

Fixes: #10896
Change-Id: Ic3be2086d1db16f9a75390323f00a43ef72aca12
(cherry picked from commit 90f8ff08a4b15c7706778eb10088cd239591e4cc)

18 months agoOracle default arraysize is now set by the driver
Federico Caselli [Fri, 12 Jan 2024 18:17:30 +0000 (19:17 +0100)] 
Oracle default arraysize is now set by the driver

Changed the default arraysize of the Oracle dialects so that the value set
by the driver is used, that is 100 at the time of writing for both
cx_oracle and oracledb. Previously the value was set to 50 by default.

Fixes: #10877
Change-Id: Ie4c53f42437d3d7dbbad36398d7883472577f367
(cherry picked from commit c8214ad4389284dc9508e49aeca701e5bf164454)

18 months agouse ensure_closed() for async close, close() for terminate
Gord Thompson [Sun, 14 Jan 2024 16:49:11 +0000 (09:49 -0700)] 
use ensure_closed() for async close, close() for terminate

Fixed issue in asyncio dialects asyncmy and aiomysql, where their
``.close()`` method is apparently not a graceful close.  replace with
non-standard ``.ensure_closed()`` method that's awaitable and move
``.close()`` to the so-called "terminate" case.

Fixes: #10893
Change-Id: I33d871e67854d85f770c46f699e41a6e73b6fbe0
(cherry picked from commit 4201b90210dcf60f9830df299be016dee315753b)

18 months agoFix type of CASE expressions which include NULLs
David Evans [Mon, 15 Jan 2024 15:13:53 +0000 (10:13 -0500)] 
Fix type of CASE expressions which include NULLs

Fixed issues in :func:`_sql.case` where the logic for determining the
type of the expression could result in :class:`.NullType` if the last
element in the "whens" had no type, or in other cases where the type
could resolve to ``None``.  The logic has been updated to scan all
given expressions so that the first non-null type is used, as well as
to always ensure a type is present.  Pull request courtesy David Evans.

updates to test suite to use modern fixture patterns by Mike

Fixes: #10843
Closes: #10847
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/10847
Pull-request-sha: 4fd5c39ab56de046e68c08f6c20cd1f7b2cb0e0d

Change-Id: I40f905ac336a8a42b617ff9473dbd9c22ac57505
(cherry picked from commit 8f4ac0c0f07509d2f8a4bce9cbb07ac08ad04044)

18 months agoadd Identity() for remaining examples
Mike Bayer [Fri, 12 Jan 2024 14:29:28 +0000 (09:29 -0500)] 
add Identity() for remaining examples

Fixed the performance example scripts in examples/performance to mostly
work with the Oracle database, by adding the :class:`.Identity` construct
to all the tables and allowing primary generation to occur on this backend.
A few of the "raw DBAPI" cases still are not compatible with Oracle.

Change-Id: I7ce19645ea78736dddfda6f33b9356ad75dee68f
(cherry picked from commit 6e0a35dfd8bbd12c999abcae3309fe22e83b0444)

18 months agoSupport reflecting no inherit check constraint in pg.
Ellis Valentiner [Mon, 8 Jan 2024 16:16:21 +0000 (11:16 -0500)] 
Support reflecting no inherit check constraint in pg.

Added support for reflection of PostgreSQL CHECK constraints marked with
"NO INHERIT", setting the key ``no_inherit=True`` in the reflected data.
Pull request courtesy Ellis Valentiner.

Fixes: #10777
Closes: #10778
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/10778
Pull-request-sha: 058082ff6297f9ccdc4977e65ef024e9a093426e

Change-Id: Ia33e29c0c57cf0076e8819311f4628d712fdc332
(cherry picked from commit 890b84e1693ce702ef0e20046cadc6e741274013)

18 months agoMerge "remove unnecessary execution_options.merge_with in _execute_ddl" into rel_2_0
Michael Bayer [Thu, 11 Jan 2024 16:54:57 +0000 (16:54 +0000)] 
Merge "remove unnecessary execution_options.merge_with in _execute_ddl" into rel_2_0

18 months agocatch OSError (base of ConnectionError) and asyncpg errors for terminate
Mike Bayer [Thu, 11 Jan 2024 03:31:59 +0000 (22:31 -0500)] 
catch OSError (base of ConnectionError) and asyncpg errors for terminate

Fixed regression in the asyncpg dialect caused by :ticket:`10717` in
release 2.0.24 where the change that now attempts to gracefully close the
asyncpg connection before terminating would not fall back to
``terminate()`` for other potential connection-related exceptions other
than a timeout error, not taking into account cases where the graceful
``.close()`` attempt fails for other reasons such as connection errors.

Fixes: #10863
Change-Id: If1791bce26803f92547cdf26fb641996c7f638fa
(cherry picked from commit eff3aa8ad6bf74181280a85bf03d401126c65b01)

18 months agoremove unnecessary execution_options.merge_with in _execute_ddl
Federico Caselli [Wed, 10 Jan 2024 18:30:53 +0000 (19:30 +0100)] 
remove unnecessary execution_options.merge_with in _execute_ddl

Change-Id: Idcd886bf6ad5db28c4dc581a7f1e91e12f6f9a05
(cherry picked from commit 396b1e621f0576b2df9da8b728a21abc99951901)

18 months agoAdd note that password parameter is not to be url encoded
Mike Bayer [Tue, 9 Jan 2024 18:45:52 +0000 (13:45 -0500)] 
Add note that password parameter is not to be url encoded

References: #10852
Change-Id: Ifa44513ce315214fa5d1b55d3e92b53889caeacc
(cherry picked from commit d9ed5cb521d5e7a2b62646b43eaebc1ccf084b40)

18 months agofix code typo in doc:faq:sqlexpressions on `in_()` (#10845)
Xiaokui Shu [Mon, 8 Jan 2024 18:44:53 +0000 (13:44 -0500)] 
fix code typo in doc:faq:sqlexpressions on `in_()` (#10845)

(cherry picked from commit 66cb236856cb458f34b5aa1e4f2ec737e1e45f76)

18 months agoFix typo in 'Mapping Table Columns' documentation (#10842)
Mateusz Bączek [Mon, 8 Jan 2024 18:44:18 +0000 (19:44 +0100)] 
Fix typo in 'Mapping Table Columns' documentation (#10842)

Co-authored-by: Mateusz Bączek <mateusz.baczek@creotech.pl>
(cherry picked from commit f309674e14072d27aaf1eae521acf4eb7f79a842)

18 months agoDBAPIConnection can be None for checkin event
Mike Bayer [Mon, 8 Jan 2024 14:15:17 +0000 (09:15 -0500)] 
DBAPIConnection can be None for checkin event

Fixed the type signature for the :meth:`.PoolEvents.checkin` event to
indicate that the given :class:`.DBAPIConnection` argument may be ``None``
in the case where the connection has been invalidated.

Change-Id: I4c6f0cf999f2ffb730909e2688eb3b0794ecf2ab
(cherry picked from commit 071d3e2d2b11a96fc5a143530357244177259189)

19 months agoVersion 2.0.26 placeholder
Mike Bayer [Wed, 3 Jan 2024 02:22:17 +0000 (21:22 -0500)] 
Version 2.0.26 placeholder

19 months ago- 2.0.25 rel_2_0_25
Mike Bayer [Wed, 3 Jan 2024 01:40:54 +0000 (20:40 -0500)] 
- 2.0.25

19 months agochangelog fixes
Mike Bayer [Wed, 3 Jan 2024 01:40:16 +0000 (20:40 -0500)] 
changelog fixes

Change-Id: Ie0e1d5d2df93e26f31004aff11196043fc665679
(cherry picked from commit 2328b5164125cb0fdb90e85f36d99ef1aa7e3705)

19 months agocherry-pick changelog update for 1.4.52
Mike Bayer [Wed, 3 Jan 2024 01:32:39 +0000 (20:32 -0500)] 
cherry-pick changelog update for 1.4.52

(cherry picked from commit 966c45280825e24904b7adebe4fc10f81ea26347)

19 months agocherry-pick changelog from 1.4.51
Mike Bayer [Wed, 3 Jan 2024 01:32:38 +0000 (20:32 -0500)] 
cherry-pick changelog from 1.4.51

(cherry picked from commit cd6d80e52b07e7c9858e55cfa2e5f32f5dee4b53)

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

Change-Id: Icf6e75119321e07311ae00e708a27239f0205106

19 months agoallow literals for function arguments
Mike Bayer [Tue, 2 Jan 2024 18:03:40 +0000 (13:03 -0500)] 
allow literals for function arguments

* Fixed the argument types passed to functions so that literal expressions
like strings and ints are again interpreted correctly (:ticket:`10818`)

this includes a reformatting of the changelog message from #10801
to read as a general "fixed regressions" list.

Fixes: #10818
Change-Id: I65ad86e096241863e833608d45f0bdb6069f5896
(cherry picked from commit cc26af00e7483289cb2c2fb7c03e2d0c8fb63362)

19 months agoMerge "refactor any_ / all_" into rel_2_0
Michael Bayer [Tue, 2 Jan 2024 23:48:40 +0000 (23:48 +0000)] 
Merge "refactor any_ / all_" into rel_2_0

19 months agoMerge "Add oracledb_async driver support" into rel_2_0
Michael Bayer [Tue, 2 Jan 2024 21:43:58 +0000 (21:43 +0000)] 
Merge "Add oracledb_async driver support" into rel_2_0

19 months agorefactor any_ / all_
Mike Bayer [Tue, 2 Jan 2024 16:16:13 +0000 (11:16 -0500)] 
refactor any_ / all_

Improved compilation of :func:`_sql.any_` / :func:`_sql.all_` in the
context of a negation of boolean comparison, will now render ``NOT (expr)``
rather than reversing the equality operator to not equals, allowing
finer-grained control of negations for these non-typical operators.

Fixes: #10817
Change-Id: If0b324b1220ad3c7f053af91e8a61c81015f312a
(cherry picked from commit f3ca2350a5d0a34d86ceb934682798438f769e59)

19 months agoFix typo in dataclasses docs (#10809)
Paul McMillan [Tue, 2 Jan 2024 19:51:48 +0000 (11:51 -0800)] 
Fix typo in dataclasses docs (#10809)

(cherry picked from commit e1cb7496485549e6548c0ea0806011415cf6137c)

19 months agoAdd oracledb_async driver support
Federico Caselli [Thu, 21 Dec 2023 22:41:56 +0000 (23:41 +0100)] 
Add oracledb_async driver support

Added support for :ref:`oracledb` in async mode.
The current implementation has some limitation, preventing
the support for :meth:`_asyncio.AsyncConnection.stream`.
Improved support if planned for the 2.1 release of SQLAlchemy.

Fixes: #10679
Change-Id: Iff123cf6241bcfa0fbac57529b80f933951be0a7
(cherry picked from commit dca7673fb6c0fd8292ce26676ec479527b52015a)

19 months agoforce uselist=False for all collection class not present
Mike Bayer [Tue, 2 Jan 2024 16:36:20 +0000 (11:36 -0500)] 
force uselist=False for all collection class not present

Fixed issue where ORM Annotated Declarative would mis-interpret the left
hand side of a relationship without any collection specified as
uselist=True if the left type were given as a class and not a string,
without using future-style annotations.

Fixes: #10815
Change-Id: I85daccec03f7e6ea3b49eb07c06e0f85e361a1c0
(cherry picked from commit c1139c2e5d2f14738798d3c0deb876286014c808)

19 months agoMerge "ensure correct lock type propagated in pool recreate" into rel_2_0
Michael Bayer [Tue, 2 Jan 2024 14:57:43 +0000 (14:57 +0000)] 
Merge "ensure correct lock type propagated in pool recreate" into rel_2_0

19 months agoadd new notes on viewonly section
jonathan vanasco [Fri, 24 Sep 2021 21:48:09 +0000 (17:48 -0400)] 
add new notes on viewonly section

Updated join_conditions documentation to explain the limits of mutation
tracking on advanced relationships and illustrate potential ways to
remedy the situation.

Instead of simply writing a note, the (functional) code from the original
issue was turned into a tutorial that explains the various approaches.

Fixes: #4201
Change-Id: Id8bd163777688efd799d9b41f1c9edfce2f4dfad
(cherry picked from commit 6f08bb70c6908061636ab01c3b579812cbd9f06c)

19 months agoMerge "2024 setup" into rel_2_0
Michael Bayer [Tue, 2 Jan 2024 14:01:22 +0000 (14:01 +0000)] 
Merge "2024 setup" into rel_2_0

19 months agoMerge "support pep695 when resolving type map types" into rel_2_0
Michael Bayer [Tue, 2 Jan 2024 01:11:56 +0000 (01:11 +0000)] 
Merge "support pep695 when resolving type map types" into rel_2_0

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

19 months ago2024 setup
Mike Bayer [Mon, 1 Jan 2024 22:04:05 +0000 (17:04 -0500)] 
2024 setup

Change-Id: I2853d99bbc19c94227e2b88d450873197013bdfb

19 months agoadd a generic argument to _HasClauseElement
Mike Bayer [Mon, 1 Jan 2024 17:49:10 +0000 (12:49 -0500)] 
add a generic argument to _HasClauseElement

Further enhancements to pep-484 typing to allow SQL functions from
:attr:`_sql.func` derived elements to work more effectively with ORM-mapped
attributes.

Fixes: #10801
Change-Id: Ib8222d888a2d8c3fbeab0d1bf5edb535916d4721
(cherry picked from commit 74a31c56ed931921f89026faf50768c86801376f)

19 months agosupport pep695 when resolving type map types
Mike Bayer [Sat, 30 Dec 2023 15:36:40 +0000 (10:36 -0500)] 
support pep695 when resolving type map types

Added preliminary support for Python 3.12 pep-695 type alias structures,
when resolving custom type maps for ORM Annotated Declarative mappings.

Fixes: #10807
Change-Id: Ia28123ce1d6d1fd6bae5e8a037be4754c890f281
(cherry picked from commit 692525492986a109877d881b2f2936b610b9066f)

19 months agoMerge "pop prefetch values from committed_state when they are available" into rel_2_0
Michael Bayer [Sat, 30 Dec 2023 17:08:03 +0000 (17:08 +0000)] 
Merge "pop prefetch values from committed_state when they are available" into rel_2_0

19 months agofix typo in session.reset docs
Federico Caselli [Fri, 29 Dec 2023 23:14:39 +0000 (00:14 +0100)] 
fix typo in session.reset docs

Change-Id: I6073cc623f216ffad8c18396001191b38eccc129
(cherry picked from commit 02472e8b65ac4062f2c3e7cee19608c801fba14c)

19 months agodocument alternative relationship to AC patterns
Mike Bayer [Fri, 29 Dec 2023 16:45:55 +0000 (11:45 -0500)] 
document alternative relationship to AC patterns

using event hook to defer construction

this is for 2.0 and above only as it includes a typed mapping
recipe as well.

Fixes: #4660
Change-Id: I9478c7f451c0e58096cca60c0725396fed339abf
(cherry picked from commit b44018d46b0b306bae04e0b0ea2e11ca78ef64e9)

19 months agoRemove unused method in SimpleResultMetaData
Federico Caselli [Thu, 28 Dec 2023 22:50:20 +0000 (23:50 +0100)] 
Remove unused method in SimpleResultMetaData

Change-Id: I859c52613da84519bacbf55a105e3a16bb8e9728
(cherry picked from commit 0da6e5dd22c33d57fc206825f58dccc3d7c3b61c)

19 months agopop prefetch values from committed_state when they are available
Mike Bayer [Thu, 28 Dec 2023 21:02:48 +0000 (16:02 -0500)] 
pop prefetch values from committed_state when they are available

Fixed issue where when making use of the
:paramref:`_orm.relationship.post_update` feature at the same time as using
a mapper version_id_col could lead to a situation where the second UPDATE
statement emitted by the post-update feature would fail to make use of the
correct version identifier, assuming an UPDATE was already emitted in that
flush which had already bumped the version counter.

Fixes: #10800
Change-Id: I3fccdb26ebbd2d987bb4f0e894449b7413556054
(cherry picked from commit 46ec57e5cc5c66616087453a090754f4d0853c0c)

19 months agoVersion 2.0.25 placeholder
Mike Bayer [Thu, 28 Dec 2023 16:23:13 +0000 (11:23 -0500)] 
Version 2.0.25 placeholder

19 months ago- 2.0.24 rel_2_0_24
Mike Bayer [Thu, 28 Dec 2023 16:19:39 +0000 (11:19 -0500)] 
- 2.0.24

19 months agochangelog formatting fixes
Mike Bayer [Thu, 28 Dec 2023 16:17:52 +0000 (11:17 -0500)] 
changelog formatting fixes

Change-Id: Ie6a975b9750fbf99c553f9b4f48a0305cf912443

19 months agochangelog edits
Mike Bayer [Thu, 28 Dec 2023 16:10:26 +0000 (11:10 -0500)] 
changelog edits

Change-Id: I115807ccca74e55e96389d7bb723da3893bcc965
(cherry picked from commit 1a2748152b0f2feb527c6a04054f88d4a659a818)

19 months agoMerge "Deprecate async_fallback mode" into rel_2_0
Michael Bayer [Wed, 27 Dec 2023 21:35:08 +0000 (21:35 +0000)] 
Merge "Deprecate async_fallback mode" into rel_2_0

19 months agoDeprecate async_fallback mode
Federico Caselli [Tue, 5 Dec 2023 22:18:57 +0000 (23:18 +0100)] 
Deprecate async_fallback mode

Deprecate the async_fallback mode and await_fallback function.

Additionally, this commit modifies the use of athrow
to no longer use the "util" compat function which is removed;
this has since been determined that it's not needed.

Change-Id: I37e37400b6954f5ac7c957790932838862930453

19 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 agouse a standard function to check for iterable collections
Mike Bayer [Wed, 20 Dec 2023 15:56:18 +0000 (10:56 -0500)] 
use a standard function to check for iterable collections

Fixed 2.0 regression in :class:`.MutableList` where a routine that detects
sequences would not correctly filter out string or bytes instances, making
it impossible to assign a string value to a specific index (while
non-sequence values would work fine).

Fixes: #10784
Change-Id: I829cd2a1ef555184de8e6a752f39df65f69f6943
(cherry picked from commit 99da5ebab36da61b7bfa0b868f50974d6a4c4655)

19 months agoensure Bundle / DML RETURNING has test support, full impl
Mike Bayer [Tue, 19 Dec 2023 14:00:03 +0000 (09:00 -0500)] 
ensure Bundle / DML RETURNING has test support, full impl

Ensured the use case of :class:`.Bundle` objects used in the
``returning()`` portion of ORM-enabled INSERT, UPDATE and DELETE statements
is tested and works fully.   This was never explicitly implemented or
tested previously and did not work correctly in the 1.4 series; in the 2.0
series, ORM UPDATE/DELETE with WHERE criteria was missing an implementation
method preventing :class:`.Bundle` objects from working.

Fixes: #10776
Change-Id: I32298e65ac590a12b47dd6ba00b7d56038b8a450
(cherry picked from commit 6e089c3dbf7e7348da84dfc62cc1c6100a257fd4)

19 months agoFix engine connect example in migration guide (#10757)
Iuri de Silvio [Sun, 17 Dec 2023 17:39:28 +0000 (18:39 +0100)] 
Fix engine connect example in migration guide (#10757)

You can't fetchall after connection was closed.

(cherry picked from commit ca9adf3028095ff28bdef823d6f6cefc12815b3c)

19 months agoMerge "Replace custom URL-encoding method with quote" into rel_2_0
Michael Bayer [Wed, 13 Dec 2023 16:01:27 +0000 (16:01 +0000)] 
Merge "Replace custom URL-encoding method with quote" into rel_2_0

19 months agocopy stack related elements to str compiler
Mike Bayer [Tue, 12 Dec 2023 19:57:38 +0000 (14:57 -0500)] 
copy stack related elements to str compiler

Fixed issue in stringify for SQL elements, where a specific dialect is not
passed,  where a dialect-specific element such as the PostgreSQL "on
conflict do update" construct is encountered and then fails to provide for
a stringify dialect with the appropriate state to render the construct,
leading to internal errors.

Fixed issue where stringifying or compiling a :class:`.CTE` that was
against a DML construct such as an :func:`_sql.insert` construct would fail
to stringify, due to a mis-detection that the statement overall is an
INSERT, leading to internal errors.

Fixes: #10753
Change-Id: I783eca3fc7bbc1794fedd325d58181dbcc7e0b75
(cherry picked from commit 0248efb761bec4bdcea76bc6bbe3c09934f6b527)

19 months agorestore ValueError when greenlet not installed
Mike Bayer [Mon, 11 Dec 2023 15:55:25 +0000 (10:55 -0500)] 
restore ValueError when greenlet not installed

continuing for #10747, add a test asserting we dont get an
endless loop and get a clean ValueError instead when greenlet not
installed and async functions are used.

Fixes: #10747
Change-Id: I54dffe8577025e2ef3a59f5ca9ab7f4362d4d91f
(cherry picked from commit 35a0854cae1e23271963e7781c65495e9c84f872)

19 months agoensure test suite runs w/o greenlet
Mike Bayer [Sat, 9 Dec 2023 15:43:37 +0000 (10:43 -0500)] 
ensure test suite runs w/o greenlet

This is a reopen of #6136 essentially that repaired the
test suite to run without greenlet but now this has regressed.
add a tox target that explicitly uninstalls greenlet, will
add to CI.

This also changes 2.0 in that the full tox target will
omit dbdrivers that require greenlet.

Fixes: #10747
Change-Id: Ia7d786d781e591539a388bfbe17b00a59f0e86d9
(cherry picked from commit 0bd686df43f572cec658c586082f299ab2cd756f)

19 months agofix(attribute_keyed_dict): using Any instead of TypeVar (#10746)
Mehdi GMIRA [Fri, 8 Dec 2023 10:54:11 +0000 (11:54 +0100)] 
fix(attribute_keyed_dict): using Any instead of TypeVar (#10746)

Co-authored-by: Mehdi Gmira <mgmira@wiremind.io>
(cherry picked from commit 86f335c29e9f4d9a8e2b28dd75301f28f5f9f4f1)

19 months agoBump actions/setup-python from 4 to 5 (#10737)
dependabot[bot] [Fri, 8 Dec 2023 09:52:38 +0000 (10:52 +0100)] 
Bump actions/setup-python from 4 to 5 (#10737)

Bumps [actions/setup-python](https://github.com/actions/setup-python) from 4 to 5.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-major
...

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

20 months agoMerge "Forward `**kw` in `__init_subclass__()` to super" into rel_2_0
Michael Bayer [Thu, 7 Dec 2023 14:37:34 +0000 (14:37 +0000)] 
Merge "Forward `**kw` in `__init_subclass__()` to super" into rel_2_0

20 months agoUpdate `TZDateTime` type decorator example to align with python docs
Kevin Kirsche [Mon, 4 Dec 2023 18:25:24 +0000 (13:25 -0500)] 
Update `TZDateTime` type decorator example to align with python docs

This change updates the `TZDateTime` type decorator to use the timezone awareness checks described in the Python documentation located here:

https://docs.python.org/3/library/datetime.html#determining-if-an-object-is-aware-or-naive

The specific lines state:

> A [`datetime`](https://docs.python.org/3/library/datetime.html#datetime.datetime) object `d` is aware if both of the following hold:
>
> `d.tzinfo is not None`
>
> `d.tzinfo.utcoffset(d)` does not return `None`
>
> Otherwise, `d` is naive.

Closes: #10719
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/10719
Pull-request-sha: bb30cb3cfe57f326addec21a6cae5f81184c2e74

Change-Id: I1ac51c1ec2820c3f224a79b7af5057fe2b3a55e2
(cherry picked from commit e1477c152c5a1e097399300883fcd6b23a6dfabf)

20 months agoReplace custom URL-encoding method with quote
Mike Bayer [Wed, 6 Dec 2023 19:10:28 +0000 (14:10 -0500)] 
Replace custom URL-encoding method with quote

Fixed URL-encoding of the username and password components of
:class:`.engine.URL` objects when converting them to string using the
:meth:`_engine.URL.render_as_string` method, by using Python standard
library ``urllib.parse.quote`` while allowing for plus signs and spaces to
remain unchanged as supported by SQLAlchemy's non-standard URL parsing,
rather than the legacy home-grown routine from many years ago. Pull request
courtesy of Xavier NUNN.

Fixes: #10662
Closes: #10726
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/10726
Pull-request-sha: 82219041b8f73d8c932cc40e87c002b3b853e02e
Change-Id: Iedca4929579d4d26ef8cce083252dcd1e476286b
(cherry picked from commit 4438883c9703affa3f441be9a230a5f751905a05)

20 months agoForward `**kw` in `__init_subclass__()` to super
Michael Oliver [Tue, 5 Dec 2023 22:24:17 +0000 (17:24 -0500)] 
Forward `**kw` in `__init_subclass__()` to super

Modified the ``__init_subclass__()`` method used by
:class:`_orm.MappedAsDataclass`, :class:`_orm.DeclarativeBase`` and
:class:`_orm.DeclarativeBaseNoMeta` to accept arbitrary ``**kw`` and to
propagate them to the ``super()`` call, allowing greater flexibility in
arranging custom superclasses and mixins which make use of
``__init_subclass__()`` keyword arguments.  Pull request courtesy Michael
Oliver.

Fixes: #10732
Closes: #10733
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/10733
Pull-request-sha: 7fdeec1f3224f48213c9c9af5f3e7e5d0904dafa

Change-Id: I955a735d4e23502b5a6b22ac093e391b378edc87
(cherry picked from commit ceeaaecd2401d2407b60c22708f58a8ae0898d85)

20 months agoMerge "try to gracefully close even in terminate" into rel_2_0
Michael Bayer [Wed, 6 Dec 2023 15:55:07 +0000 (15:55 +0000)] 
Merge "try to gracefully close even in terminate" into rel_2_0

20 months agoImprove session after_begin even documentation
Federico Caselli [Thu, 30 Nov 2023 21:40:43 +0000 (22:40 +0100)] 
Improve session after_begin even documentation

Change-Id: Ie2a1e6bdf5960208921dc76e372fe51d3b280f1a
References: #10687
(cherry picked from commit 842b3ebb4b9e40ce3f6aa4257bd5e585c42e51d2)

20 months agoDocument limitation in dataclass mapping styles
Federico Caselli [Mon, 4 Dec 2023 20:14:45 +0000 (21:14 +0100)] 
Document limitation in dataclass mapping styles

Document that using default and init=False on a dataclass field mapped
imperatively or using imperative table will not work.

Change-Id: Id2e27e4f7f0cafc60be3f97b7945983360c0a7d2
References: #9879
(cherry picked from commit 06c5c8e955402af6c09b8a3c55cbdee3cd0e0393)

20 months agoSpelling dml.rst (#10730)
Kai [Mon, 4 Dec 2023 18:23:43 +0000 (19:23 +0100)] 
Spelling dml.rst (#10730)

Really a very minor spelling correction.

(cherry picked from commit f43b428d2baf6f6fc01c8e3028743cd96c05986e)

20 months agoNeed to escape # in tox v4
Federico Caselli [Mon, 27 Nov 2023 20:39:31 +0000 (21:39 +0100)] 
Need to escape # in tox v4

See https://tox.wiki/en/latest/upgrading.html#changed-ini-rules

Change-Id: I3022538e3f919f5bc977411042d82c62260645a1
(cherry picked from commit aa7145caa1927d8c70f6c5029c3c04528b86c7b0)

20 months agoNormalize all file headers to have consistent format
Federico Caselli [Thu, 30 Nov 2023 21:16:11 +0000 (22:16 +0100)] 
Normalize all file headers to have consistent format

Change-Id: Idfa5f699280990aed3f6e46225d4202539d9e900

20 months agotry to gracefully close even in terminate
Mike Bayer [Thu, 30 Nov 2023 14:11:25 +0000 (09:11 -0500)] 
try to gracefully close even in terminate

Adjusted the asyncpg dialect such that when the ``terminate()`` method is
used to discard an invalidated connection, the dialect will first attempt
to gracefully close the conneciton using ``.close()`` with a timeout, if
the operation is proceeding within an async event loop context only. This
allows the asyncpg driver to attend to finalizing a ``TimeoutError``
including being able to close a long-running query server side, which
otherwise can keep running after the program has exited.

Fixes: #10717
Change-Id: Iaba0aeb67873a7a2b3981d43f4eb663005057309
(cherry picked from commit e70a0b0a0e52945e5b588b5cffec619a3f3e78a1)

20 months agofreshen up callcounts for py311
Mike Bayer [Tue, 28 Nov 2023 02:35:41 +0000 (21:35 -0500)] 
freshen up callcounts for py311

move the oracle tests to use oracledb (because i dont feel like
installing OCI on my laptops anymore)

Change-Id: I8ca7ceb5083dbf2510ec02dc40f202a8e0eaf3dc
(cherry picked from commit 82690b1cfc1e76e5deb622a9afefbcf3be299962)

20 months agoremove errant print statement
Mike Bayer [Sun, 26 Nov 2023 20:16:08 +0000 (15:16 -0500)] 
remove errant print statement

Change-Id: I9cb1571995f078c359a9c2793670a017effe4be2

20 months agoadd MARS connection for aioodbc
Mike Bayer [Sun, 26 Nov 2023 15:02:47 +0000 (10:02 -0500)] 
add MARS connection for aioodbc

on jenkins main we are getting a lot of connection busy with
other results, which we assume is due to the thread-pool based approach
of aioodbc not being very solid.

MARS is described at:

https://stackoverflow.com/questions/9017264/why-only-some-users-get-the-error-connection-is-busy-with-results-for-another
https://learn.microsoft.com/en-us/sql/relational-databases/native-client/features/using-multiple-active-result-sets-mars?view=sql-server-ver16

not clear why the name of the parameter is different in those two
articles. using a totally made up parameter doesn't raise any error,
so it's not clear if this works at all.

Change-Id: I8e437e9f46c1c070c5102a24d7d82a912e8b5145

20 months agoAdd type annotations for Function.filter
Martijn Pieters [Sat, 18 Nov 2023 21:36:08 +0000 (16:36 -0500)] 
Add type annotations for Function.filter

This includes all methods / properties on the returned FunctionFilter
object.

This contributes towards #6810

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.

Closes: #10643
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/10643
Pull-request-sha: 6137b7b995b6ea0bd4e4195c5693d2312fa26639

Change-Id: I2af1af7617d0cd3fd30b262d36ff982464bac011
(cherry picked from commit 52452ec39d18567126673eeef4cf0dd12039043b)

20 months agofully type functions.py
Mike Bayer [Fri, 24 Nov 2023 20:20:31 +0000 (15:20 -0500)] 
fully type functions.py

Completed pep-484 typing for the ``sqlalchemy.sql.functions`` module.
:func:`_sql.select` constructs made against ``func`` elements should now
have filled-in return types.

References: #6810
Change-Id: I5121583c9c5b6f7151f811348c7a281c446cf0b8
(cherry picked from commit 045732a738a10891b85be8e286eab3e5b756a445)

20 months agofully update to flake8 6.1.0
Mike Bayer [Fri, 24 Nov 2023 21:27:03 +0000 (16:27 -0500)] 
fully update to flake8 6.1.0

I updated flake8 in pre-commit a few days ago but forgot to do it in
tox.

this flake seems to be picking inside of f-strings, which black does
not fix, so fix these manually.

Change-Id: I9a641a99e280fbba9d893a6f1f051b5039d5d4eb
(cherry picked from commit 7bc33ca55144d2716b175c733c0d6865572787aa)

20 months agoMerge "backport importlib mypy fix" into rel_2_0
mike bayer [Fri, 24 Nov 2023 20:24:52 +0000 (20:24 +0000)] 
Merge "backport importlib mypy fix" into rel_2_0

20 months agoMerge "Fix pre-ping regression in old PyMySQL versions." into rel_2_0
mike bayer [Fri, 24 Nov 2023 15:43:35 +0000 (15:43 +0000)] 
Merge "Fix pre-ping regression in old PyMySQL versions." into rel_2_0

20 months agobackport importlib mypy fix
Mike Bayer [Fri, 24 Nov 2023 13:55:44 +0000 (08:55 -0500)] 
backport importlib mypy fix

this is the fix that was part of f5f08c28fb, this is otherwise
failing for some environments with mypy 6

Change-Id: Ic8b410c4fa1858c98e9299e062f1ff040c2d3576

20 months agoUpgrade to Oracle Database 23c Free
Gerald Venzl [Thu, 23 Nov 2023 19:42:52 +0000 (14:42 -0500)] 
Upgrade to Oracle Database 23c Free

### Description
This PR updates the unittest ReadMe and `setup.cfg` to use Oracle Database Free, the successor to Oracle Database XE.

### Checklist

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

Change-Id: Id37f6607572c1fdb12d507cd9336800d4d8b0cf3
(cherry picked from commit 44771ab0c32730d1ecefac21af13f113b1b19726)

20 months agodocs: fix type annotation in Self-Referential Many-to-Many Relationsh…
François Voron [Thu, 23 Nov 2023 15:53:07 +0000 (10:53 -0500)] 
docs: fix type annotation in Self-Referential Many-to-Many Relationsh…

A type annotation was wrong in the [Self-Referential Many-to-Many Relationship](https://docs.sqlalchemy.org/en/20/orm/join_conditions.html#self-referential-many-to-many-relationship) code example.

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

### Description

The type annotation was `right_nodes: Mapped[List["None"]]`. I changed it to `Node` since we refer to the ORM class we're looking at.

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

Change-Id: Iab1535c3d00747eb8c9e9a17aea50606febedbf9
(cherry picked from commit 7157d16e3ba521c119958a727af51790ebdf3f34)

20 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