]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/log
thirdparty/sqlalchemy/sqlalchemy.git
3 years agopop the stack that we pushed
Mike Bayer [Tue, 8 Mar 2022 18:40:12 +0000 (13:40 -0500)] 
pop the stack that we pushed

Fixed regression caused by :ticket:`7760` where the new capabilities of
:class:`.TextualSelect` were not fully implemented within the compiler
properly, leading to issues with composed INSERT constructs such as "INSERT
FROM SELECT" and "INSERT...ON CONFLICT" when combined with CTE and textual
statements.

Fixes: #7798
Change-Id: Ia2ce92507e574dd36fd26dd38ec9dd2713584467
(cherry picked from commit c36965ab211183764357456fff1640418586ed97)

3 years agoMerge "support selectin_polymorphic w/ no fixed polymorphic_on" into rel_1_4
mike bayer [Tue, 8 Mar 2022 15:21:07 +0000 (15:21 +0000)] 
Merge "support selectin_polymorphic w/ no fixed polymorphic_on" into rel_1_4

3 years agosupport selectin_polymorphic w/ no fixed polymorphic_on
Mike Bayer [Mon, 7 Mar 2022 20:11:29 +0000 (15:11 -0500)] 
support selectin_polymorphic w/ no fixed polymorphic_on

Fixed issue where the :func:`_orm.polymorphic_selectin` loader option would
not work with joined inheritance mappers that don't have a fixed
"polymorphic_on" column.   Additionally added test support for a wider
variety of usage patterns with this construct.

Fixed bug where :func:`_orm.composite` attributes would not work in
conjunction with the :func:`_orm.selectin_polymorphic` loader strategy for
joined table inheritance.

Fixes: #7799
Fixes: #7801
Change-Id: I7cfe32dfe844b188403b39545930c0aee71d0119
(cherry picked from commit 47509a2916ad1ca09b62d44ffabd66e7bda1827d)

3 years agotest sqlite w/ savepoint workaround in session fixture test
Mike Bayer [Mon, 7 Mar 2022 16:17:47 +0000 (11:17 -0500)] 
test sqlite w/ savepoint workaround in session fixture test

Fixes: #7795
Change-Id: Ib790581555656c088f86c00080c70d19ca295a03
(cherry picked from commit fbacb1991585202a5bf22acb0d36b5c979bcfad8)

3 years agoVersion 1.4.33 placeholder
Mike Bayer [Sun, 6 Mar 2022 22:43:26 +0000 (17:43 -0500)] 
Version 1.4.33 placeholder

3 years ago- 1.4.32 rel_1_4_32
Mike Bayer [Sun, 6 Mar 2022 22:28:39 +0000 (17:28 -0500)] 
- 1.4.32

3 years ago1.4.32 changelog edits
Mike Bayer [Sun, 6 Mar 2022 18:18:59 +0000 (13:18 -0500)] 
1.4.32 changelog edits

Change-Id: I3f62ba9c8ff35c8ae1d0bd611db92521da38dff0

3 years agoMerge "warn for enum length silently ignored" into rel_1_4
mike bayer [Fri, 4 Mar 2022 23:58:17 +0000 (23:58 +0000)] 
Merge "warn for enum length silently ignored" into rel_1_4

3 years agoMerge "fix type string formatting calls" into rel_1_4
mike bayer [Fri, 4 Mar 2022 23:31:58 +0000 (23:31 +0000)] 
Merge "fix type string formatting calls" into rel_1_4

3 years agoadd missing changelog for #7045
Mike Bayer [Fri, 4 Mar 2022 23:30:40 +0000 (18:30 -0500)] 
add missing changelog for #7045

was missed in d2815b4ac39b42a38dff4cc21ec100c72b9f3cae

Fixes: #7045
Change-Id: Id4836690daabf7e547c278a4e538d39579e5f2a2
(cherry picked from commit 825f555a81e55b541ba33e84ee8131d8c0de6d47)

3 years agowarn for enum length silently ignored
Mike Bayer [Fri, 4 Mar 2022 23:27:24 +0000 (18:27 -0500)] 
warn for enum length silently ignored

the "length" parameter is silently ignored when native_enum
is not passed as False.  if native_enum is True, a non-native
VARCHAR can still be generated.   Warn for this silent ignore
right now, consider having "length" used in all cases where
non-native enum is rendered likely in 2.0.

Change-Id: Ibceedd4e3aa3926f3268c0c39d94ab73d17a9bdc
(cherry picked from commit 18683f474b285b4d7e16c38c0a570276912e1081)

3 years agoMerge "add length to enum repr params" into rel_1_4
mike bayer [Fri, 4 Mar 2022 23:04:49 +0000 (23:04 +0000)] 
Merge "add length to enum repr params" into rel_1_4

3 years agotry fixing github actions again
Federico Caselli [Fri, 25 Feb 2022 21:08:09 +0000 (22:08 +0100)] 
try fixing github actions again

Change-Id: Iaf801a028510f276cf94b4999f129de8f4eb590c
(cherry picked from commit 9e7c068d669b209713da62da5748579f92d98129)

3 years agofix type string formatting calls
Mike Bayer [Fri, 4 Mar 2022 22:17:53 +0000 (17:17 -0500)] 
fix type string formatting calls

Fixed type-related error messages that would fail for values that were
tuples, due to string formatting syntax, including compile of unsupported
literal values and invalid boolean values.

Fixes: #7721
Change-Id: I6775721486ef2db2d0738b9aa08b9f2570f55659
(cherry picked from commit a261a78894c4f835b5da7fcbfb3d466a687bc11b)

3 years agoadd length to enum repr params
Mike Bayer [Fri, 4 Mar 2022 22:30:21 +0000 (17:30 -0500)] 
add length to enum repr params

This amends the fix for #7789.

Fixes: #7598
Change-Id: I067a081d743f1efaf8288601bec0400712012265
(cherry picked from commit a26a522648af14ffb9388d8d306bd98523bef1c9)

3 years agocorrect for pytest discovery
Mike Bayer [Fri, 4 Mar 2022 21:28:31 +0000 (16:28 -0500)] 
correct for pytest discovery

Made corrections to the default pytest configuration so that test discovery
runs correctly; previously, a configuration error had the effect of
discovery locating the wrong files if a super-directory of the current
directory were named "test".

Fixes: #7045
Change-Id: I2e1f63a35f80ae3f53008f327d83c8342fa7f2f6
(cherry picked from commit d2815b4ac39b42a38dff4cc21ec100c72b9f3cae)

3 years agoMerge "Fix repr for MySQL SET, generic Enum" into rel_1_4
mike bayer [Fri, 4 Mar 2022 20:51:17 +0000 (20:51 +0000)] 
Merge "Fix repr for MySQL SET, generic Enum" into rel_1_4

3 years agoAdd LongAsMax note to mssql+pyodbc dialect docs
Gord Thompson [Fri, 4 Mar 2022 18:13:14 +0000 (11:13 -0700)] 
Add LongAsMax note to mssql+pyodbc dialect docs

Change-Id: I4491b188bae49ac615f8691dd9b7a8a341428ce7
(cherry picked from commit 8316e21e3821f678cf4c0ecbc9df5e360ddb5668)

3 years agoFix repr for MySQL SET, generic Enum
petit87 [Sat, 26 Feb 2022 21:46:32 +0000 (16:46 -0500)] 
Fix repr for MySQL SET, generic Enum

Fixed issues in :class:`_mysql.SET` datatype as well as :class:`.Enum`
where the ``__repr__()`` method would not render all optional parameters in
the string output, impacting the use of these types in Alembic
autogenerate. Pull request for MySQL courtesy Yuki Nishimine.

Fixes: #7720
Fixes: #7789
Closes: #7772
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/7772
Pull-request-sha: d58845479f497f6b2e12d7df2e9eb2d6ac22109b
Co-authored-by: Mike Bayer <mike_mp@zzzcomputing.com>
Change-Id: Idcec23eab4258511d9f32f4e3d78e511ea6021f1
(cherry picked from commit a926dea6b78c91b627f0f0b86cdc6a9279872e99)

3 years agoMerge "improve error raise for dialect/pool events w/ async engine" into rel_1_4
mike bayer [Fri, 4 Mar 2022 17:43:50 +0000 (17:43 +0000)] 
Merge "improve error raise for dialect/pool events w/ async engine" into rel_1_4

3 years agoVersion 1.4.32 placeholder
Mike Bayer [Fri, 4 Mar 2022 16:29:54 +0000 (11:29 -0500)] 
Version 1.4.32 placeholder

Mike cherry-picking this manually as it appears
I forgot to run post_update when I released 1.4.31

(cherry picked from commit 758f2b96d336c7ba5382e89bfd421f986b5ef846)

3 years agoquick doc adjustments
Mike Bayer [Thu, 3 Mar 2022 15:33:14 +0000 (10:33 -0500)] 
quick doc adjustments

tweet thread:  https://twitter.com/zzzeek/status/1499397255089909762

Change-Id: I5556ef707c2285e7b64c91ae5c58af52efcf4770
(cherry picked from commit f68a51c549754637bd59213101025f1ee63e4865)

3 years agoimprove error raise for dialect/pool events w/ async engine
Mike Bayer [Thu, 3 Mar 2022 02:43:53 +0000 (21:43 -0500)] 
improve error raise for dialect/pool events w/ async engine

Fixed issues where a descriptive error message was not raised for some
classes of event listening with an async engine, which should instead be a
sync engine instance.

Change-Id: I00b9f4fe9373ef5fd5464fac10651cc4024f648e
(cherry picked from commit e893ce1196a1fb02ad53576fd75ffd40e5d9dd89)

3 years agoremove incorrect deprecation message
Mike Bayer [Sun, 27 Feb 2022 19:27:54 +0000 (14:27 -0500)] 
remove incorrect deprecation message

this message likely referred to ResultProxy,
no idea how it referred to CursorResult, that's a very confusing
issue.  ResultProxy -> CursorResult is mostly a name
change as far as backwards compat is concerned so there's
not much "deprecated" here.

Change-Id: Ic06bdde65a120101b2f9db22483bf3be6ff3556c

3 years agorepair GH actions syntax
Mike Bayer [Fri, 25 Feb 2022 18:26:02 +0000 (13:26 -0500)] 
repair GH actions syntax

the commit in 51e6a62ab371897d646a5
included a comment that appears to not be accepted

Change-Id: I1e56293e0e75c0440073bff7190b4961cfebc353
(cherry picked from commit 96e197f3d0348fd7d79fdd126f989490b51fd9ef)

3 years agoblock pypy for now
Mike Bayer [Fri, 25 Feb 2022 17:40:21 +0000 (12:40 -0500)] 
block pypy for now

the most recent pypy 7.3.8 series (3.7 and 3.9 included, likely
3.8 as well) have installed a 9 year old version of SQLite,
and additionally seem to have some other behavioral changes
like formatting of exception messages that is breaking
some tests.  as we are waiting on a response at [1]
remove pypy testing for now.

[1] https://foss.heptapod.net/pypy/pypy/-/issues/3690

Change-Id: I66650635111e71241b5c45a778954544c8d2490e
(cherry picked from commit 51e6a62ab371897d646a5986b9139838402c57df)

3 years agoMerge "support cx_Oracle DPI disconnect codes" into rel_1_4
mike bayer [Thu, 24 Feb 2022 14:44:48 +0000 (14:44 +0000)] 
Merge "support cx_Oracle DPI disconnect codes" into rel_1_4

3 years agosupport cx_Oracle DPI disconnect codes
Mike Bayer [Wed, 23 Feb 2022 18:43:03 +0000 (13:43 -0500)] 
support cx_Oracle DPI disconnect codes

Added support to parse "DPI" error codes from cx_Oracle exception objects
such as ``DPI-1080`` and ``DPI-1010``, both of which now indicate a
disconnect scenario as of cx_Oracle 8.3.

Fixes: #7748
Change-Id: I4a10d606d512c0d7f9b4653c47ea5734afffb8a5
(cherry picked from commit 8f9e971f10dee0614054671e0c284f0acace2d04)

3 years agosupport add_cte() for TextualSelect
Mike Bayer [Wed, 23 Feb 2022 17:50:36 +0000 (12:50 -0500)] 
support add_cte() for TextualSelect

Fixed issue where the :meth:`.HasCTE.add_cte` method as called upon a
:class:`.TextualSelect` instance was not being accommodated by the SQL
compiler. The fix additionally adds more "SELECT"-like compiler behavior to
:class:`.TextualSelect` including that DML CTEs such as UPDATE and INSERT
may be accommodated.

Fixes: #7760
Change-Id: Id97062d882e9b2a81b8e31c2bfaa9cfc5f77d5c1
(cherry picked from commit bef67e58121704a9836e1e5ec2d361cd2086036c)

3 years agoMerge "improve reflection of inline UNIQUE constraints" into rel_1_4
mike bayer [Mon, 21 Feb 2022 02:29:06 +0000 (02:29 +0000)] 
Merge "improve reflection of inline UNIQUE constraints" into rel_1_4

3 years agoimprove reflection of inline UNIQUE constraints
Mike Bayer [Sun, 20 Feb 2022 14:51:22 +0000 (09:51 -0500)] 
improve reflection of inline UNIQUE constraints

Fixed issue where SQLite unique constraint reflection would not work
for an inline UNIQUE constraint where the column name had an underscore
in its name.

Added support for reflecting SQLite inline unique constraints where
the column names are formatted with SQLite "escape quotes" ``[]``
or `` ` ``, which are discarded by the database when producing the
column name.

Fixes: #7736
Change-Id: I635003478dc27193995f7d7a6448f9333a498706
(cherry picked from commit 834af17a469fd1893acf20225e8400c0c908053f)

3 years agoremove never-used get_result_cursor_strategy() method
Mike Bayer [Sat, 19 Feb 2022 18:51:22 +0000 (13:51 -0500)] 
remove never-used get_result_cursor_strategy() method

This method I would assume got committed during the
1.4 engine refactor, where we moved from different kinds of
ResultProxy implementations to different strategy
classes instead.   These strategies are set up by
dialects by setting "self.cursor_fetch_strategy"
in the execution context.   The method here was
likely a previous iteration of that which got merged
but was never used.

Change-Id: Iec292428f41c2c245bf7ae78beaa14786c28846c
(cherry picked from commit ec4a4910aa9ecc516cf3b096cb053fd9be7f82cc)

3 years agoupdates for mariadb connector 1.0.10
Mike Bayer [Sat, 19 Feb 2022 19:11:19 +0000 (14:11 -0500)] 
updates for mariadb connector 1.0.10

Fixed regression in mariadbconnector dialect as of mariadb connector 1.0.10
where the DBAPI no longer pre-buffers cursor.lastrowid. The dialect now
fetches this value proactively for situations where it applies.

test_invalidate_on_results seems to pass for mariadbconnector now.
the driver has likely changed how it buffers result sets.  This is
a major change for them to make in a point release so we might
want to watch this in case they reverse course again.

Fixes: #7738
Change-Id: I9610aae01d1ae42fa92ffbc7123a6948e40ec9dd
(cherry picked from commit e120837b682a3a822c2dff136ad48b1ca9fb6ce2)

3 years agoclarify SQLAlchemy version 2.0 constructs are not yet available
Mike Bayer [Thu, 17 Feb 2022 20:13:41 +0000 (15:13 -0500)] 
clarify SQLAlchemy version 2.0 constructs are not yet available

Fixes: #7726
Change-Id: I30646b9da5d4de6a075dedb4b42fd00b3ed7d969
(cherry picked from commit 86e42fbc83c78a577c1b7079f0aae7cbac5b29d5)
(cherry picked from commit c5756b11a0eceb6ba4c868b52daf676652940835)

3 years agocorrect for non-deterministic gc artifacts
Mike Bayer [Tue, 15 Feb 2022 15:53:07 +0000 (10:53 -0500)] 
correct for non-deterministic gc artifacts

Observed the tests here have different profiling
counts when run individually vs. as a group, and
this seems to be due to whether or not results of
each query are garbage collected or not.  for
all but one test, ensuring results stay between
query runs seems to meet the current profiling
counts.

Change-Id: I5aca5db08936757ad2a6055c5fc077cc58979bdd
(cherry picked from commit bcd4e36ab466e8e300bd704dd3b7e6e8470a2972)

3 years agoadd note reiterating do_orm_execute() is for ORM statements only
Mike Bayer [Tue, 15 Feb 2022 13:37:44 +0000 (08:37 -0500)] 
add note reiterating do_orm_execute() is for ORM statements only

Fixes: #7707
Change-Id: I7216f63d9f4269059438e41ad8dd3dffc25a5d03
(cherry picked from commit 619abb52b6f1ee023db0f85fd96ba9f88c8efa7b)

3 years agoRaise and re-catch NameError from _ModNS
Mike Bayer [Sat, 12 Feb 2022 15:50:45 +0000 (10:50 -0500)] 
Raise and re-catch NameError from _ModNS

Fixed issue where using a fully qualified path for the classname in
:func:`_orm.relationship` that nonetheless contained an incorrect name for
path tokens that were not the first token, would fail to raise an
informative error and would instead fail randomly at a later step.

Fixes: #7697
Change-Id: I5e1a3aa4c2a6ea5b123be14666f589aec43f4b60
(cherry picked from commit 260ade78a70d51378de9e7b9456bfe6218859b6c)

3 years agoMerge "update zimports" into rel_1_4
mike bayer [Thu, 10 Feb 2022 03:56:28 +0000 (03:56 +0000)] 
Merge "update zimports" into rel_1_4

3 years agodoc fixes
Mike Bayer [Thu, 10 Feb 2022 02:59:43 +0000 (21:59 -0500)] 
doc fixes

* clarify merge behavior for non-present attributes,
  references #7687
* fix AsyncSession in async_scoped_session documentation,
  name the scoped session AsyncScopedSession, fixes: #7671
* Use non-deprecated execute() style in sqltypes JSON examples,
  fixes: #7633
* Add note regarding mitigation for
  https://github.com/MagicStack/asyncpg/issues/727,
  fixes #7245

Fixes: #7671
Fixes: #7633
Fixes: #7245
Change-Id: Ic40b4378ca321367a912864f4eddfdd9714fe217
(cherry picked from commit 449389a45f358300ba95f7d03c7b94b64703e31a)

3 years agoupdate zimports
Mike Bayer [Wed, 9 Feb 2022 20:39:44 +0000 (15:39 -0500)] 
update zimports

includes new fix for formatting like black does.

also runs black on a few outliers.

Change-Id: I67446660a6bc10b73eb710389ae6d3f122af9302
(cherry picked from commit 2579ed2b8f295c7e0ad3d875bf57535623f8df0d)

3 years agoupdate Mypy plugin status
Mike Bayer [Wed, 9 Feb 2022 15:00:24 +0000 (10:00 -0500)] 
update Mypy plugin status

The Mypy plugin is not maintainable long-term and will be replaced
by new APIs that allow for typing to work inline without the need
for plugins.

Change-Id: Icc7a203df1d0b19bde2fd852719b7b7215774c58
References: #7535
(cherry picked from commit 491e8507fa46e4312302419149d180769c84696e)

3 years agoAccommodate escaped_bind_names for defaults/insert params
Mike Bayer [Tue, 8 Feb 2022 15:12:33 +0000 (10:12 -0500)] 
Accommodate escaped_bind_names for defaults/insert params

Fixed issue in Oracle dialect where using a column name that requires
quoting when written as a bound parameter, such as ``"_id"``, would not
correctly track a Python generated default value due to the bound-parameter
rewriting missing this value, causing an Oracle error to be raised.

Fixes: #7676
Change-Id: I5a54426d24f2f9b336e3597d5595fb3e031aad97
(cherry picked from commit c2aa6374f3965c28aa2d56cbddf6dab3e1de18a2)

3 years agoamend verbiage for #7667's changelog message
Mike Bayer [Fri, 4 Feb 2022 20:46:41 +0000 (15:46 -0500)] 
amend verbiage for #7667's changelog message

clarify this applies to async calling styles only.

Change-Id: I42286fe2651be13bd472fac981df9de276ed9bb1
(cherry picked from commit 88bc4f2f66cffe82ed039a622027abd54897280a)

3 years agoMerge "ensure exception raised for all stream w/ sync result" into rel_1_4
mike bayer [Fri, 4 Feb 2022 20:42:26 +0000 (20:42 +0000)] 
Merge "ensure exception raised for all stream w/ sync result" into rel_1_4

3 years agoensure exception raised for all stream w/ sync result
Mike Bayer [Fri, 4 Feb 2022 14:04:49 +0000 (09:04 -0500)] 
ensure exception raised for all stream w/ sync result

Fixed issue where the :meth:`_asyncio.AsyncSession.execute` method failed
to raise an informative exception if the ``stream_results`` execution
option were used, which is incompatible with a sync-style
:class:`_result.Result` object. An exception is now raised in this scenario
in the same way one is already raised when using ``stream_results`` in
conjunction with the :meth:`_asyncio.AsyncConnection.execute` method.
Additionally, for improved stability with state-sensitive dialects such as
asyncmy, the cursor is now closed when this error condition is raised;
previously with the asyncmy dialect, the connection would go into an
invalid state with unconsumed server side results remaining.

Fixes: #7667
Change-Id: I6eb7affe08584889b57423a90258295f8b7085dc
(cherry picked from commit faa9ef2cff53bde291df5ac3b5c4ed8f665ecd8c)

3 years agofall back to SHOW VARIABLES for MySQL < 5.6
Mike Bayer [Fri, 4 Feb 2022 02:58:14 +0000 (21:58 -0500)] 
fall back to SHOW VARIABLES for MySQL < 5.6

Fixed regression caused by :ticket:`7518` where changing the syntax "SHOW
VARIABLES" to "SELECT @@" broke compatibility with MySQL versions older
than 5.6, including early 5.0 releases. While these are very old MySQL
versions, a change in compatibility was not planned, so version-specific
logic has been restored to fall back to "SHOW VARIABLES" for MySQL server
versions < 5.6.

includes unrelated orm/test_expire ordering issue , only showing
up on 1.4 / py2.7 but seems to be passing by luck otherwise

Fixes: #7518
Change-Id: Ia554080af742f2c3437f88cf3f7a4827b5e55da8
(cherry picked from commit 9f1ed1c68af05eab5851ffd038011e3e3bd36b63)

3 years agoadd pg14 to supported implementations
Mike Bayer [Mon, 31 Jan 2022 14:50:57 +0000 (09:50 -0500)] 
add pg14 to supported implementations

Fixes: #7647
Change-Id: I071f1a53714ebb0dc838fddc665640d46666318f
(cherry picked from commit 5087dd2a02c6a142146944126022cec735a6f54d)

3 years agosplit out declarative varieties into the declarative mapping section
Mike Bayer [Sun, 30 Jan 2022 19:25:36 +0000 (14:25 -0500)] 
split out declarative varieties into the declarative mapping section

specific declarative styles like those for dataclasses and attrs
should be in the more reference-oriented "declarative_mapping"
section rather than the more introduction-oriented mapping_styles.

this will also make it easier for us to add still more ways of
mapping declaratively for 2.0.

for the cherry-pick, also remove the misleading line about
stubs.

Fixes: #7575
Change-Id: I2700c2c2b34db9680f9cbe6ed6197add773a6a5d
(cherry picked from commit 6bfd428eea7bf712d962a0c4c6a7fb15e14955f6)

3 years agoFix up Python logging metadata
Markus Gerstel [Wed, 26 Jan 2022 09:56:40 +0000 (04:56 -0500)] 
Fix up Python logging metadata

Adjusted the logging for key SQLAlchemy components including
:class:`_engine.Engine`, :class:`_engine.Connection` to establish an
appropriate stack level parameter, so that the Python logging tokens
``funcName`` and ``lineno`` when used in custom logging formatters will
report the correct information, which can be useful when filtering log
output; supported on Python 3.8 and above. Pull request courtesy Markus
Gerstel.

Fixes: #7612
Closes: #7615
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/7615
Pull-request-sha: cf9567beb06680df320cb12dde1f15baa68e1eb5

Change-Id: Iff23c92ef3453ac93cbd0d190e7efbf8ea4457a2
(cherry picked from commit f24a34140f6007cada900a8ae5ed03fe40ce2631)

3 years agoAdd compiler support for PostgreSQL "NOT VALID" constraints.
Gilbert Gilb's [Sun, 23 Jan 2022 18:00:35 +0000 (13:00 -0500)] 
Add compiler support for PostgreSQL "NOT VALID" constraints.

Added compiler support for the PostgreSQL ``NOT VALID`` phrase when rendering
DDL for the :class:`.CheckConstraint`, :class:`.ForeignKeyConstraint`
and :class:`.ForeignKey` schema constructs.  Pull request courtesy
Gilbert Gilb's.

Fixes: #7600
Closes: #7601
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/7601
Pull-request-sha: 78eecd55fd9fad07030d963f5fd6713c4af60e80

Change-Id: I84bfe84596856eeea2bcca45c04ad23d980a75ec
(cherry picked from commit 77dd6808f250e0431f9bce824f46f6e1ef63eef3)

3 years agoreplace "e.g.::" with more context regarding attribute events example
Mike Bayer [Tue, 25 Jan 2022 14:14:32 +0000 (09:14 -0500)] 
replace "e.g.::" with more context regarding attribute events example

Fixes: #7613
Change-Id: I28a9577587399c41afd53fbd026003667654c3fc
(cherry picked from commit 5e3357c70e419c244156ac3885b2cf784b5b3fc0)

3 years agoMerge "dont test squelched warnings against the filter" into rel_1_4
mike bayer [Sun, 23 Jan 2022 15:18:50 +0000 (15:18 +0000)] 
Merge "dont test squelched warnings against the filter" into rel_1_4

3 years agofix bullet indentation, clarify insert independent of DDL
Mike Bayer [Sun, 23 Jan 2022 14:41:52 +0000 (09:41 -0500)] 
fix bullet indentation, clarify insert independent of DDL

Change-Id: I3b6f2b7e23044148e837afdbe4fef66773e42777
(cherry picked from commit 3fc5d28b7999cafc5111ce999a218cd5cd9329a2)

3 years agodont test squelched warnings against the filter
Mike Bayer [Sun, 23 Jan 2022 14:28:22 +0000 (09:28 -0500)] 
dont test squelched warnings against the filter

I spent days on Ibcf09af25228d39ee5a943fda82d8a9302433726
reading it over and over again and noticed this slight inaccuracy
10 seconds after I merged it.

the assert_warns_message() and assert_warns() functions should
not consider a mismatched warning class as valid for a match.

Change-Id: Ib8944dd95bcec1a7e4963917a5f4829e2ba27732
(cherry picked from commit f653d5eb169e3d0371eae388aecb0db0cb0b8c11)

3 years agoMerge "dont use exception catches for warnings; modernize xdist detection" into rel_1_4
mike bayer [Sun, 23 Jan 2022 14:24:55 +0000 (14:24 +0000)] 
Merge "dont use exception catches for warnings; modernize xdist detection" into rel_1_4

3 years agomake the autoincrement doc a lot more clear
Mike Bayer [Sun, 23 Jan 2022 14:14:00 +0000 (09:14 -0500)] 
make the autoincrement doc a lot more clear

I saw it saying "this parameter has no effect when
Identity is in use", which is not accurate, so I've expanded
this way out with bullets to make the current situation
as clear as possible.

Change-Id: I77001cc81cd90a6b867686e2975aed682e539347
(cherry picked from commit 8fa6a1b9cc86bf1a580bc0f30a02cd4028051cf4)

3 years agodont use exception catches for warnings; modernize xdist detection
Mike Bayer [Fri, 21 Jan 2022 23:46:37 +0000 (18:46 -0500)] 
dont use exception catches for warnings; modernize xdist detection

Improvements to the test suite's integration with pytest such that the
"warnings" plugin, if manually enabled, will not interfere with the test
suite, such that third parties can enable the warnings plugin or make use
of the ``-W`` parameter and SQLAlchemy's test suite will continue to pass.
Additionally, modernized the detection of the "pytest-xdist" plugin so that
plugins can be globally disabled using PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
without breaking the test suite if xdist were still installed. Warning
filters that promote deprecation warnings to errors are now localized to
SQLAlchemy-specific warnings, or within SQLAlchemy-specific sources for
general Python deprecation warnings, so that non-SQLAlchemy deprecation
warnings emitted from pytest plugins should also not impact the test suite.

Identified a bit of cleanup for the PostgreSQL provisioning
as a result.

Fixes: #7599
Change-Id: Ibcf09af25228d39ee5a943fda82d8a9302433726
(cherry picked from commit a0f1914b903de6c130ab1c3267138b8ad208e144)

3 years agoSkip PK returned as None for RETURNING, server side default
Mike Bayer [Fri, 21 Jan 2022 15:19:02 +0000 (10:19 -0500)] 
Skip PK returned as None for RETURNING, server side default

Fixed regression where the ORM exception that is to be raised when an
INSERT silently fails to actually insert a row (such as from a trigger)
would not be reached, due to a runtime exception raised ahead of time due
to the missing primary key value, thus raising an uninformative exception
rather than the correct one. For 1.4 and above, a new ``FlushError`` is
added for this case that's raised earlier than the previous "null identity"
exception was for 1.3, as a situation where the number of rows actually
INSERTed does not match what was expected is a more critical situation in
1.4 as it prevents batching of multiple objects from working correctly.
This is separate from the case where a newly fetched primary key is
fetched as NULL, which continues to raise the existing "null identity"
exception.

Fixes: #7594
Change-Id: Ie8e181e3472f09f389cca757c5e58e61b15c7d79
(cherry picked from commit 8a1931601d3b105ad585ef39840c8251ebdb44a2)

3 years agoRemove dispose warning on async engines when running tests
Federico Caselli [Wed, 19 Jan 2022 22:41:36 +0000 (23:41 +0100)] 
Remove dispose warning on async engines when running tests

Co-authored-by: Mike Bayer <mike_mp@zzzcomputing.com>
Change-Id: Ia3357959ed286dc7d2ce264b5ddcadf309351ff7
(cherry picked from commit 9b2cd1ede5951fff7180d64bb39aa3a601ec1900)

3 years ago- 1.4.31 rel_1_4_31
Mike Bayer [Fri, 21 Jan 2022 01:33:00 +0000 (20:33 -0500)] 
- 1.4.31

3 years agotypo
Mike Bayer [Fri, 21 Jan 2022 01:30:24 +0000 (20:30 -0500)] 
typo

Change-Id: Id3f1a99813be14dbfa721e6b0a6081eca4a90c05
(cherry picked from commit 7d9b811555a88dd2f1cb1520027546b87383e159)

3 years agoMerge "Added support for ``FILESTREAM`` in MSSQL." into rel_1_4
mike bayer [Fri, 21 Jan 2022 01:26:10 +0000 (01:26 +0000)] 
Merge "Added support for ``FILESTREAM`` in MSSQL." into rel_1_4

3 years agoMerge "re-enable tests for asyncmy; fix Binary" into rel_1_4
mike bayer [Fri, 21 Jan 2022 01:26:07 +0000 (01:26 +0000)] 
Merge "re-enable tests for asyncmy; fix Binary" into rel_1_4

3 years agore-enable tests for asyncmy; fix Binary
Mike Bayer [Thu, 20 Jan 2022 20:21:17 +0000 (15:21 -0500)] 
re-enable tests for asyncmy; fix Binary

Fixed regression in asyncmy dialect caused by :ticket:`7567` where removal
of the PyMySQL dependency broke binary columns, due to the asyncmy dialect
not being properly included within CI tests.

Fixes: #7593
Change-Id: Iefc1061c24c75fcb9ca1a02d0b5e5f43970ade17
(cherry picked from commit da128e11ff5fcaafbf80704dc0aa8da0a901fb3e)

3 years agoAdded support for ``FILESTREAM`` in MSSQL.
Federico Caselli [Wed, 19 Jan 2022 22:31:13 +0000 (23:31 +0100)] 
Added support for ``FILESTREAM`` in MSSQL.

Fixes: #7243
Change-Id: I99880f429dbaac525bdf7d44438aaab6bc8d0ca6
(cherry picked from commit 64fd7a3968448f21ce1c14bff89fc78e949e04d1)

3 years agoMerge "repair mapper sort" into rel_1_4
mike bayer [Thu, 20 Jan 2022 22:44:26 +0000 (22:44 +0000)] 
Merge "repair mapper sort" into rel_1_4

3 years agorestore empty list logic to ARRAY of ENUM parsing
Mike Bayer [Thu, 20 Jan 2022 20:01:47 +0000 (15:01 -0500)] 
restore empty list logic to ARRAY of ENUM parsing

Fixed regression where the change in :ticket:`7148` to repair ENUM handling
in PostgreSQL broke the use case of an empty ARRAY of ENUM, preventing rows
that contained an empty array from being handled correctly when fetching
results.

Fixes: #7590
Change-Id: I43a35ef25281a6e0a26b698efebef6ba12a63e8c
(cherry picked from commit dda5c43cab88daad02bc871cf40bf4984e94a031)

3 years agorepair mapper sort
Mike Bayer [Thu, 20 Jan 2022 14:31:42 +0000 (09:31 -0500)] 
repair mapper sort

Fixed issue in :meth:`_orm.Session.bulk_save_mappings` where the sorting
that takes place when the ``preserve_order`` parameter is set to False
would sort partially on ``Mapper`` objects, which is rejected in Python
3.11.

Also uses typing_extensions for NotRequired as this symbol
does not seem to be in Python 3.11.0a4 yet. (2.0 only)

Fixes: #7591
Change-Id: I24a62f2322ad7dac5d8e4a00853f8a9408877c9c
(cherry picked from commit 8d3d934c16a91adcdc7f374c01761b18fbba74d9)

3 years agoVersion 1.4.31 placeholder
Mike Bayer [Wed, 19 Jan 2022 23:18:12 +0000 (18:18 -0500)] 
Version 1.4.31 placeholder

3 years ago- 1.4.30 rel_1_4_30
Mike Bayer [Wed, 19 Jan 2022 23:11:01 +0000 (18:11 -0500)] 
- 1.4.30

3 years agoAdded missing method ``invalidate` in the `AsyncSession`
Federico Caselli [Wed, 19 Jan 2022 21:10:09 +0000 (22:10 +0100)] 
Added missing method ``invalidate` in the `AsyncSession`

Fixes: #7524
Change-Id: I20387e6700015c44f23bd2d05347bdce802196c0
(cherry picked from commit e5606c0ba8bf2fed6daa7a488433d55ddbf302e9)

3 years agoAdd AdaptedConnection.run_async
Mike Bayer [Wed, 19 Jan 2022 19:31:52 +0000 (14:31 -0500)] 
Add AdaptedConnection.run_async

Added new method :meth:`.AdaptedConnection.run_async` to the DBAPI
connection interface used by asyncio drivers, which allows methods to be
called against the underlying "driver" connection directly within a
sync-style function where the ``await`` keyword can't be used, such as
within SQLAlchemy event handler functions. The method is analogous to the
:meth:`_asyncio.AsyncConnection.run_sync` method which translates
async-style calls to sync-style. The method is useful for things like
connection-pool on-connect handlers that need to invoke awaitable methods
on the driver connection when it's first created.

Fixes: #7580
Change-Id: I03c98a72bda0234deb19c00095b31a36f19bf36d
(cherry picked from commit 09ad975505adb2118f229cb5b1a75c2c412420ae)

3 years agotypo
Mike Bayer [Wed, 19 Jan 2022 19:48:51 +0000 (14:48 -0500)] 
typo

Change-Id: I65cdd4cefdfacb1506c8e32a11c44ff650cd15b6
(cherry picked from commit b235a8cb1042cb7706dddc0f783cabb81e141055)

3 years agoMerge "reject methods as lambda SQL callables" into rel_1_4
mike bayer [Wed, 19 Jan 2022 02:41:20 +0000 (02:41 +0000)] 
Merge "reject methods as lambda SQL callables" into rel_1_4

3 years agoMerge "enhance double-aliased table logic to handle more cases" into rel_1_4
mike bayer [Wed, 19 Jan 2022 02:39:58 +0000 (02:39 +0000)] 
Merge "enhance double-aliased table logic to handle more cases" into rel_1_4

3 years agoreject methods as lambda SQL callables
Mike Bayer [Tue, 18 Jan 2022 22:19:24 +0000 (17:19 -0500)] 
reject methods as lambda SQL callables

Added an informative error message when a method object is passed to a SQL
construct. Previously, when such a callable were passed, as is a common
typographical error when dealing with method-chained SQL constructs, they
were interpreted as "lambda SQL" targets to be invoked at compilation time,
which would lead to silent failures. As this feature was not intended to be
used with methods, method objects are now rejected.

Fixes: #7032
Change-Id: If714715bd8c11557ab769ee3b1a24264b0b06acc
(cherry picked from commit e28ec27b599558b3e26ced106a972e8b4aa9e668)

3 years agoenhance double-aliased table logic to handle more cases
Mike Bayer [Sun, 16 Jan 2022 15:21:45 +0000 (10:21 -0500)] 
enhance double-aliased table logic to handle more cases

Fixed ORM regression where calling the :func:`_orm.aliased` function
against an existing :func:`_orm.aliased` construct would fail to produce
correct SQL if the existing construct were against a fixed table. The fix
allows that the original :func:`_orm.aliased` construct is disregarded if
it were only against a table that's now being replaced. It also allows for
correct behavior when constructing a :func:`_orm.aliased` without a
selectable argument against a :func:`_orm.aliased` that's against a
subuquery, to create an alias of that subquery (i.e. to change its name).

The nesting behavior of :func:`_orm.aliased` remains in place for the case
where the outer :func:`_orm.aliased` object is against a subquery which in
turn refers to the inner :func:`_orm.aliased` object. This is a relatively
new 1.4 feature that helps to suit use cases that were previously served by
the deprecated ``Query.from_self()`` method.

Fixes: #7576
Change-Id: Ia9ca606f6300e38b6040eb6fc7facfe97c8cf057
(cherry picked from commit bb11d5b7c2256861fdfe64f5cded94ce15266132)

3 years agodetect map_imperatively() called twice
Mike Bayer [Tue, 18 Jan 2022 16:02:57 +0000 (11:02 -0500)] 
detect map_imperatively() called twice

Fixed issue where calling upon :meth:`_orm.regsitry.map_imperatively` more
than once for the same class would produce an unexpected error, rather than
an informative error that the target class is already mapped. This behavior
differed from that of the :func:`_orm.mapper` function which does report an
informative message already.

For 2.0, this change also cleans up the logic that detects against
`Mapper()` or `_mapper()` being invoked directly.  1.4's backport will
take on a different format as `mapper()` is still public API in that
release.

Fixes: #7579
Change-Id: Ie74a1a2e97f8b6a81ac1942040edd8cae82f4bd8
(cherry picked from commit e6ded82eef63235d7cbfe3ab3382a48f32913640)

3 years agoMerge "fix(mypy): Placeholder vars should have fullname set." into rel_1_4
mike bayer [Sat, 15 Jan 2022 14:09:13 +0000 (14:09 +0000)] 
Merge "fix(mypy): Placeholder vars should have fullname set." into rel_1_4

3 years agofix(mypy): Placeholder vars should have fullname set.
Jaen Saul [Fri, 19 Nov 2021 20:12:44 +0000 (22:12 +0200)] 
fix(mypy): Placeholder vars should have fullname set.

Otherwise the dmypy daemon will crash on an incremental re-run.

Fixes: #7347
Closes: #7348
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/7348
Pull-request-sha: 79eefa3417e09a8f9defaeafdb9f76d323385238

Change-Id: Id2133e837ee5dcf43461af51458e296353bdad6c
(cherry picked from commit 7c170ade108b907c4ea6c7a73cc606afd1838885)

3 years agoFixes(#7561) Add support for postgres.UUID literal_binds compilation
José Duarte [Thu, 13 Jan 2022 22:20:06 +0000 (17:20 -0500)] 
Fixes(#7561) Add support for postgres.UUID literal_binds compilation

Added string rendering to the :class:`.postgresql.UUID` datatype, so that
stringifying a statement with "literal_binds" that uses this type will
render an appropriate string value for the PostgreSQL backend. Pull request
courtesy José Duarte.

Fixes: #7561
Closes: #7563
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/7563
Pull-request-sha: cf6fe73265342d7884a940c4b3a34c9552113ec3

Change-Id: I4b162bdcdce2293a90683e36da54e4a891a3c684
(cherry picked from commit 17d228f6268515bbf37fdd70a6ee3a62cb9a0b0c)

3 years agoRemove pymysql in asyncmy
long2ice [Fri, 14 Jan 2022 08:50:26 +0000 (03:50 -0500)] 
Remove pymysql in asyncmy

Removed unnecessary dependency on PyMySQL from the asyncmy dialect. Pull
request courtesy long2ice.

Fixes: #7567
Closes: #7568
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/7568
Pull-request-sha: 48cbb3e3c249e431dfd91e88fcb3284af83671e5

Change-Id: Iad5048eaa5de6ad6666b2120df6608fd1bf50e02
(cherry picked from commit b4fe2b83ab3ce8cee1e2f4353dfcbea515b4f8d1)

3 years agoMerge "implement second-level type resolution for literals" into rel_1_4
mike bayer [Tue, 11 Jan 2022 18:11:43 +0000 (18:11 +0000)] 
Merge "implement second-level type resolution for literals" into rel_1_4

3 years agoimplement second-level type resolution for literals
Mike Bayer [Wed, 5 Jan 2022 17:20:46 +0000 (12:20 -0500)] 
implement second-level type resolution for literals

Added additional rule to the system that determines ``TypeEngine``
implementations from Python literals to apply a second level of adjustment
to the type, so that a Python datetime with or without tzinfo can set the
``timezone=True`` parameter on the returned :class:`.DateTime` object, as
well as :class:`.Time`. This helps with some round-trip scenarios on
type-sensitive PostgreSQL dialects such as asyncpg, psycopg3 (2.0 only).

Improved support for asyncpg handling of TIME WITH TIMEZONE, which
was not fully implemented.

Fixes: #7537
Change-Id: Icdb07db85af5f7f39f1c1ef855fe27609770094b
(cherry picked from commit 3b2e28bcb5ba32446a92b62b6862b7c11dabb592)

3 years agoensure with_options not switched to a list
Mike Bayer [Mon, 10 Jan 2022 19:59:59 +0000 (14:59 -0500)] 
ensure with_options not switched to a list

Fixed regression which appeared in 1.4.23 which could cause loader options
to be mis-handled in some cases, in particular when using joined table
inheritance in combination with the ``polymorphic_load="selectin"`` option
as well as relationship lazy loading, leading to a ``TypeError``.

Fixes: #7557
Change-Id: Id38619692f94308fd5f567a02337efef7a3a7544
(cherry picked from commit 4e9fe6e3b7a72fc3b116403ea9b27e847b5bf186)

3 years agohappy new year 2022
Mike Bayer [Thu, 6 Jan 2022 20:59:47 +0000 (15:59 -0500)] 
happy new year 2022

Change-Id: Ic38dbc640aa0fe8a784a5b5e57c45a41eb0ea01b

3 years agofix incorrect with_parent() example
Mike Bayer [Thu, 6 Jan 2022 14:24:08 +0000 (09:24 -0500)] 
fix incorrect with_parent() example

The lead example for the with_parent() function
docstring was backwards, based on the standard User/Address
mapping used in the documentation.

Fixes: #7540
Change-Id: Iaff7dc6fdd0c323509231ae5f3122ed76a420915
(cherry picked from commit 21ee595ba9ef3e7abc8982fac7bf488c904cf9c9)

3 years agoupdate stale documentation on Mapper class
Mike Bayer [Tue, 4 Jan 2022 20:38:15 +0000 (15:38 -0500)] 
update stale documentation on Mapper class

don't get into details here that have changed,
point to the main narrative documentation instead.

Change-Id: I5bc0829f6ff282ca104f18deb9ec9857b6e1c8ac
(cherry picked from commit 9298ce03e1181d5bc00c1891663433606ead1223)

3 years agoMerge "Imrpove MySQL/MariaDB dialect initialization." into rel_1_4
Federico Caselli [Tue, 4 Jan 2022 20:30:11 +0000 (20:30 +0000)] 
Merge "Imrpove MySQL/MariaDB dialect initialization." into rel_1_4

3 years agoMerge "Improve array of enum handling." into rel_1_4
Federico Caselli [Tue, 4 Jan 2022 20:28:50 +0000 (20:28 +0000)] 
Merge "Improve array of enum handling." into rel_1_4

3 years agoMerge "ensure correlate_except is checked for empty tuple" into rel_1_4
mike bayer [Tue, 4 Jan 2022 19:36:39 +0000 (19:36 +0000)] 
Merge "ensure correlate_except is checked for empty tuple" into rel_1_4

3 years agoImprove array of enum handling.
Federico Caselli [Fri, 10 Dec 2021 13:18:34 +0000 (14:18 +0100)] 
Improve array of enum handling.

Fixed handling of array of enum values which require escape characters.

Fixes: #7418
Change-Id: I50525846f6029dfea9a8ad1cb913424d168d5f62
(cherry picked from commit 94afc4f5fc842160468cf7175552125eebf7a510)

3 years agoimprove custom operator for SQL types docs
Mike Bayer [Tue, 4 Jan 2022 19:08:10 +0000 (14:08 -0500)] 
improve custom operator for SQL types docs

introduce here that "custom ops" first come from
the .op() method in the usual case.  then only if one wants
such an op to be pre-assocaited with particular types,
then the comparator may be used.  Also clarify the individual
points regarding the comparator.

Change-Id: Id6046448eb2c17fa6e3f2ef6d9343b156ddec96f
(cherry picked from commit 680264970a4c9199c6e1dc91f855bdb08a90b4cc)

3 years agoensure correlate_except is checked for empty tuple
Mike Bayer [Mon, 3 Jan 2022 22:28:52 +0000 (17:28 -0500)] 
ensure correlate_except is checked for empty tuple

Fixed issue where :meth:`_sql.Select.correlate_except` method, when passed
either the ``None`` value or no arguments, would not correlate any elements
when used in an ORM context (that is, passing ORM entities as FROM
clauses), rather than causing all FROM elements to be considered as
"correlated" in the same way which occurs when using Core-only constructs.

Fixes: #7514
Change-Id: Ic4a5252c8f3c1140aba6c308264948f3a91f33f5
(cherry picked from commit 709239f4a61e88c2051dce87eb4058efd653697e)

3 years agoImrpove MySQL/MariaDB dialect initialization.
Federico Caselli [Thu, 30 Dec 2021 22:29:55 +0000 (23:29 +0100)] 
Imrpove MySQL/MariaDB dialect initialization.

Replace ``SHOW VARIABLES LIKE`` statement with equivalent
``SELECT @@variable`` in MySQL and MariaDB dialect initialization.
This should avoid mutex contention caused by ``SHOW VARIABLES``,
improving initialization performance.

Change-Id: Id836ef534fcc1473c7aaf9270d08a4da9b8f62cf
closes: #7518
(cherry picked from commit 5e06f0f579df45116696fed78d65abcccc1dc3e3)

3 years agoReflect included columns as dialect_options
Gord Thompson [Mon, 20 Dec 2021 21:37:13 +0000 (14:37 -0700)] 
Reflect included columns as dialect_options

Fixed reflection of covering indexes to report ``include_columns`` as part
of the ``dialect_options`` entry in the reflected index dictionary, thereby
enabling round trips from reflection->create to be complete. Included
columns continue to also be present under the ``include_columns`` key for
backwards compatibility.

Fixes: #7382
Change-Id: I4f16b65caed3a36d405481690a3a92432b5efd62
(cherry picked from commit 52e352a190af750c3c28a5390b2ad55b20d1b752)

3 years agoMerge "include empty intermediary tables in optimized get" into rel_1_4
mike bayer [Mon, 27 Dec 2021 16:49:59 +0000 (16:49 +0000)] 
Merge "include empty intermediary tables in optimized get" into rel_1_4

3 years agoinclude empty intermediary tables in optimized get
Mike Bayer [Sun, 26 Dec 2021 17:13:19 +0000 (12:13 -0500)] 
include empty intermediary tables in optimized get

Fixed issue in joined-inheritance load of additional attributes
functionality in deep multi-level inheritance where an intermediary table
that contained no columns would not be included in the tables joined,
instead linking those tables to their primary key identifiers. While this
works fine, it nonetheless in 1.4 began producing the cartesian product
compiler warning. The logic has been changed so that these intermediary
tables are included regardless. While this does include additional tables
in the query that are not technically necessary, this only occurs for the
highly unusual case of deep 3+ level inheritance with intermediary tables
that have no non primary key columns, potential performance impact is
therefore expected to be negligible.

Fixes: #7507
Change-Id: Id2073773e97a0853b744b51feeb2bc4437032e51
(cherry picked from commit c1d2fbac4c399b47f4715f7ea2a1147374d2aa43)

3 years agorestore graceful degrade of subqueryload w from_statement
Mike Bayer [Sun, 26 Dec 2021 16:25:00 +0000 (11:25 -0500)] 
restore graceful degrade of subqueryload w from_statement

Fixed regression from 1.3 where the "subqueryload" loader strategy would
fail with a stack trace if used against a query that made use of
:meth:`_orm.Query.from_statement` or :meth:`_sql.Select.from_statement`. As
subqueryload requires modifying the original statement, it's not compatible
with the "from_statement" use case, especially for statements made against
the :func:`_sql.text` construct. The behavior now is equivalent to that of
1.3 and previously, which is that the loader strategy silently degrades to
not be used for such statements, typically falling back to using the
lazyload strategy.

Fixes: #7505
Change-Id: I950800dc86a77f8320a5e696edce1ff2c84b1eb9
(cherry picked from commit 818d62be00530549aa52dd5d981819010e4ae484)

3 years agoVersion 1.4.30 placeholder
Mike Bayer [Thu, 23 Dec 2021 02:19:30 +0000 (21:19 -0500)] 
Version 1.4.30 placeholder