]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/log
thirdparty/sqlalchemy/sqlalchemy.git
4 years agoAdded import of synonym in example code in Synonym portion of docs
Andres Torres [Tue, 9 Mar 2021 06:20:04 +0000 (22:20 -0800)] 
Added import of synonym in example code in Synonym portion of docs

(cherry picked from commit 4f857567923ccdbd18dae7a4aa98db040d396e57)

4 years agoFix named CHECK constraint name omitted on repeated creates
Gord Thompson [Sat, 6 Mar 2021 19:19:13 +0000 (12:19 -0700)] 
Fix named CHECK constraint name omitted on repeated creates

Fixed issue where the CHECK constraint generated by :class:`_types.Boolean`
or :class:`_types.Enum` would fail to render the naming convention
correctly after the first compilation, due to an unintended change of state
within the name given to the constraint. This issue was first introduced in
0.9 in the fix for issue #3067, and the fix revises the approach taken at
that time which appears to have been more involved than what was needed.

Co-authored-by: Mike Bayer <mike_mp@zzzcomputing.com>
Fixes: #6007
Change-Id: I7ecff0a9d86191520f6841b3922a5af5a6971fba
(cherry picked from commit 506b88de5e428fd4ad2feff663ba53e2dbb28891)

4 years agoensure composite refresh handler synced w/ mutable composite
Mike Bayer [Fri, 5 Mar 2021 04:38:34 +0000 (23:38 -0500)] 
ensure composite refresh handler synced w/ mutable composite

Fixed issue where the :class:`_mutable.MutableComposite` construct could be
placed into an invalid state when the parent object was already loaded, and
then covered by a subsequent query, due to the composite properties'
refresh handler replacing the object with a new one not handled by the
mutable extension.

Fixes: #6001
Change-Id: Ieebd8e6afe6b65f8902cc12dec1efb968f5438ef
(cherry picked from commit 2f7623b6b265cd5f25f2a6022e21bc3286d397a3)

4 years agoFix aggregate_order_by issue
Gord Thompson [Thu, 4 Mar 2021 13:55:53 +0000 (06:55 -0700)] 
Fix aggregate_order_by issue

Fixes: #5989
Using array_agg() with aggregate_order_by() in
postgresql would sometimes return ARRAY(NullType)
instead of ARRAY(actual_type).

Change-Id: I05a0b2b7ea59291e3c04575578adcc337296e5a8
(cherry picked from commit 780213bfefac7046ac889ffbc1c51e0d244dd678)

4 years agouse zimports 0.3
Mike Bayer [Thu, 4 Mar 2021 16:11:48 +0000 (11:11 -0500)] 
use zimports 0.3

Change-Id: Ice8b9f9c1ef1446b6813e5bc9332f1323234cb5f

4 years agoRemove passive_deletes warning for many-to-one
Mike Bayer [Tue, 2 Mar 2021 23:48:08 +0000 (18:48 -0500)] 
Remove passive_deletes warning for many-to-one

Removed very old warning that states that passive_deletes is not intended
for many-to-one relationships. While it is likely that in many cases
placing this parameter on a many-to-one relationship is not what was
intended, there are use cases where delete cascade may want to be
disallowed following from such a relationship.

Change-Id: I07adb726633f73f26296add4ec70376d5dcf8817
References: #5983
(cherry picked from commit a63b23392fc31766e32b8650127d9006ee189a0f)

4 years agoAs of 1.1, there are five object states
John Whitlock [Wed, 24 Feb 2021 15:41:02 +0000 (09:41 -0600)] 
As of 1.1, there are five object states

(cherry picked from commit d5a4965e286602caecbbfd640a40cc6619a7da36)

Change-Id: I3ae84e45db3df3c0e750589c0bec57861b6aa6a6

4 years agodoc clarification re: schema translate
Mike Bayer [Mon, 1 Mar 2021 12:33:13 +0000 (07:33 -0500)] 
doc clarification re: schema translate

add tip that ORM session should use an option engine for schema
translate

Change-Id: I5807b486275cac72087be5217fff7c878783435f
References: #5978
(cherry picked from commit da1bc669d59f06982356c69039512ef4f5c6950b)

4 years agodocument TypeDecorator schemes for MONEY
Mike Bayer [Mon, 22 Feb 2021 14:55:21 +0000 (09:55 -0500)] 
document TypeDecorator schemes for MONEY

this type apparently returns strings so document
cast/processing options.

Change-Id: Idc19527dcf76e1c2d966425716c0fcf60cbba5dc
References: #5965
(cherry picked from commit fcf539d090a95fb179ca03beffd10122e97aa002)

4 years agoFix test that incorrectly used ; as query separator
Federico Caselli [Thu, 18 Feb 2021 21:20:29 +0000 (22:20 +0100)] 
Fix test that incorrectly used ; as query separator

Change-Id: I31e9973930d90184bbabda0bff6346eca4e00c37
(cherry picked from commit 149261e81ca255b1be397ae4500f262c7bb46bac)

4 years agoExtract table names when comparing to nrte error
Mike Bayer [Thu, 18 Feb 2021 15:43:16 +0000 (10:43 -0500)] 
Extract table names when comparing to nrte error

Fixed issue where the process of joining two tables could fail if one of
the tables had an unrelated, unresolvable foreign key constraint which
would raise :class:`_exc.NoReferenceError` within the join process, which
nonetheless could be bypassed to allow the join to complete. The logic
which tested the exception for signficance within the process would make
assumptions about the construct which would fail.

Fixes: #5952
Change-Id: I492dacd082ddcf8abb1310ed447a6ed734595bb7
(cherry picked from commit 498db831718cb5df213b1afdd2027878e0e72fd4)

4 years agoUpdate declarative_mixins.rst
serzey [Tue, 16 Feb 2021 09:10:03 +0000 (10:10 +0100)] 
Update declarative_mixins.rst

Variables ta and tb should be instances of TypeA and TypeB respectively.

(cherry picked from commit f41b9cbcdb0b6116cc3e2d15f53983516d82b06d)

Change-Id: I084ec293b948a4b594f210e758ca0a05483ca8da

4 years agozzzeeksphinx 1.2.1 needed w/ sphinx 3.5.0
Mike Bayer [Mon, 15 Feb 2021 19:40:31 +0000 (14:40 -0500)] 
zzzeeksphinx 1.2.1 needed w/ sphinx 3.5.0

Change-Id: Ie81ac4dfaf53b2ff7df37603b473509f320726be
(cherry picked from commit f18531fd315e50cffa18b01c3be4eb585c4a3364)

4 years agoBumy Sphinx
Sam Bull [Mon, 15 Feb 2021 10:36:30 +0000 (10:36 +0000)] 
Bumy Sphinx

(cherry picked from commit d1806bb5ed4c0ee150b69b5226f8af835d6e1012)

4 years agoAdd emphasis to URL documentation re: URL encoding
Mike Bayer [Sun, 14 Feb 2021 19:36:27 +0000 (14:36 -0500)] 
Add emphasis to URL documentation re: URL encoding

Fixes: #5715
Change-Id: I2ac16541d34f49b25070e00c43596bcd71aff72d
(cherry picked from commit f6188d31998321a857078d6a61672aae1f98e312)

4 years agoAdd identifier_preparer per-execution context for schema translates
Mike Bayer [Mon, 8 Feb 2021 16:58:15 +0000 (11:58 -0500)] 
Add identifier_preparer per-execution context for schema translates

Fixed bug where the "schema_translate_map" feature failed to be taken into
account for the use case of direct execution of
:class:`_schema.DefaultGenerator` objects such as sequences, which included
the case where they were "pre-executed" in order to generate primary key
values when implicit_returning was disabled.

Fixes: #5929
Change-Id: I3fed1d0af28be5ce9c9bb572524dcc8411633f60
(cherry picked from commit 2385ebb19366efeb35415298166ac18668864c51)

4 years agoPrecede sp_columns with EXEC
Mike Bayer [Fri, 5 Feb 2021 14:34:25 +0000 (09:34 -0500)] 
Precede sp_columns with EXEC

Fixed issue regarding SQL Server reflection for older SQL Server 2005
version, a call to sp_columns would not proceed correctly without being
prefixed with the EXEC keyword. This method is not used in current 1.4
series.

Fixes: #5921
Change-Id: I2ffcda97d570879719ec5c1ea9fb7507dc87756f

4 years agoFix broken link to cx_Oracle documentation
Paul Lettich [Wed, 27 Jan 2021 13:31:39 +0000 (14:31 +0100)] 
Fix broken link to cx_Oracle documentation

(cherry picked from commit 2c7e78be96a33902927f911429849a2ccfbcfc9b)

4 years agoAccommodate column-based naming conventions for pk constraint
Mike Bayer [Thu, 4 Feb 2021 17:09:54 +0000 (12:09 -0500)] 
Accommodate column-based naming conventions for pk constraint

Repaired / implemented support for primary key constraint naming
conventions that use column names/keys/etc as part of the convention. In
particular, this includes that the :class:`.PrimaryKeyConstraint` object
that's automatically associated with a :class:`.schema.Table` will update
its name as new primary key :class:`_schema.Column` objects are added to
the table and then to the constraint. Internal failure modes related to
this constraint construction process including no columns present, no name
present or blank name present are now accommodated.

Fixes: #5919
Change-Id: Ic2800b50f4a4cd5978bec48cefea0a2e198e0123
(cherry picked from commit 9660e94e35be438b0d51cd87e6ccb4047a332c15)

4 years agoVersion 1.3.24 placeholder
Mike Bayer [Mon, 1 Feb 2021 20:56:44 +0000 (15:56 -0500)] 
Version 1.3.24 placeholder

4 years ago- 1.3.23 rel_1_3_23
Mike Bayer [Mon, 1 Feb 2021 20:52:15 +0000 (15:52 -0500)] 
- 1.3.23

4 years agoset identifier length for MySQL constraints to 64
Mike Bayer [Sat, 30 Jan 2021 21:57:50 +0000 (16:57 -0500)] 
set identifier length for MySQL constraints to 64

The rule to limit index names to 64 also applies to all
DDL names, such as those coming from naming conventions.
Add another limiting variable for constraint names and
create test cases against all constraint types.

Additionally, codified in the test suite MySQL's lack of
support for naming of a FOREIGN KEY constraint after
the name was given, which apparently assigns the name to an
associated KEY but not the constraint itself, until MySQL 8
and MariaDB 10.5 which appear to have resolved the
behavior.  However it's not clear how Alembic hasn't had
issues reported with this so far.

Fixed long-lived bug in MySQL dialect where the maximum identifier length
of 255 was too long for names of all types of constraints, not just
indexes, all of which have a size limit of 64. As metadata naming
conventions can create too-long names in this area, apply the limit to the
identifier generator within the DDL compiler.

Fixes: #5898
Change-Id: I79549474845dc29922275cf13321c07598dcea08
(cherry picked from commit fc1e419d139711117b0d2451d6b6e11045afeeb3)

4 years agoUse schema._copy_expression() fully in column collection constraints
Gord Thompson [Mon, 25 Jan 2021 18:24:25 +0000 (11:24 -0700)] 
Use schema._copy_expression() fully in column collection constraints

Fixed issue where using :meth:`_schema.Table.to_metadata` (called
:meth:`_schema.Table.tometadata` in 1.3) in conjunction with a PostgreSQL
:class:`_postgresql.ExcludeConstraint` that made use of ad-hoc column
expressions would fail to copy correctly.

Fixes: #5850
Change-Id: I062480afb23f6f60962b7b55bc93f5e4e6ff05e4
(cherry picked from commit 81896c31ffc4db081f1f2bba199a52328398a236)

4 years agoClarify Column.index / Column.unique parameters
Mike Bayer [Fri, 29 Jan 2021 18:43:38 +0000 (13:43 -0500)] 
Clarify Column.index / Column.unique parameters

These parameters need to be more clear that they cause a
constraint / index object to be generated.  Clarify the rules
by which this occurs and include contextual information about
naming conventions as well.

Change-Id: I8dc96ead4457215abed391fd1b9f732a1eef6e09
References: #5887
(cherry picked from commit aff54c0bd8f75d324f1a4a8601a3d6f28739439e)

4 years agoAllow Oracle CLOB/NCLOB/BLOB in returning
Mike Bayer [Thu, 28 Jan 2021 16:04:29 +0000 (11:04 -0500)] 
Allow Oracle CLOB/NCLOB/BLOB in returning

Fixed bug in Oracle dialect where retriving a CLOB/BLOB column via
:meth:`_dml.Insert.returning` would fail as the LOB value would need to be
read when returned; additionally, repaired support for retrieval of Unicode
values via RETURNING under Python 2.

As of yet, we still don't know how to reproduce the
ORA-24813 error indicated in the issue.

Also backporting the statement cache clear added to master
in f1e96cb087 , as we are testing in CI against two oracle
versions now there are sporadic failures that appear to be
memory related.

Fixes: #5812
Change-Id: I666f893e762dfa4d34dd2e324480565b226fb3a4
(cherry picked from commit 03179a96bfb9dd7ce17274fed44908c25229dedf)

4 years agoAdd more docs on engine connecting w/ URL parameters
Mike Bayer [Mon, 25 Jan 2021 18:22:34 +0000 (13:22 -0500)] 
Add more docs on engine connecting w/ URL parameters

We have a special section for connect_args but didn't appropriately
introduce that URL keywords may be used as well, which otherwise
does not seem to be documented in a generalized way.  Add
this additional detail and contrast between URL query string
and connect_args including providing some transparency for
how to see what URL query string parameters will do for a given
dialect, as we do not handle these parameters consistently
right now.

Change-Id: I2227554732e307d4b525a9931e8d03ccc2c16726
References: #5874
(cherry picked from commit 57db20a187e80950037dd5a2141a560fe879e054)

4 years agoun-ignore mike's favorite testing filenames
Mike Bayer [Sun, 24 Jan 2021 22:30:32 +0000 (17:30 -0500)] 
un-ignore mike's favorite testing filenames

As im using vscode I'd like these filenames to show up
in filesearch but I'd like to keep "ignore .gitignore files"
turned on.   I've moved these names to my own local
.git/info/exclude instead.

Change-Id: I97e04af0672a609e44d0479d5c10d063a3482dfc

4 years agoMerge "Set upper bound to pg8000 version" into rel_1_3
mike bayer [Sun, 24 Jan 2021 21:41:32 +0000 (21:41 +0000)] 
Merge "Set upper bound to pg8000 version" into rel_1_3

4 years agoSet upper bound to pg8000 version
Giuseppe Lumia [Sat, 23 Jan 2021 18:04:44 +0000 (13:04 -0500)] 
Set upper bound to pg8000 version

For SQLAlchemy 1.3 only, setup.py pins pg8000 to a version lower than
1.16.6. Version 1.16.6 and above is supported by SQLAlchemy 1.4. Pull
request courtesy Giuseppe Lumia.

Fixes: #5645
Closes: #5864
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/5864
Pull-request-sha: c1b39d22fff8bfd0fe599103996881cc1dc0ca66

Change-Id: Ibb8cec75cf8d82e1072772cb779a9a794530b8f0

4 years agoMerge "remove __allowlist__" into rel_1_3
mike bayer [Sat, 23 Jan 2021 19:24:58 +0000 (19:24 +0000)] 
Merge "remove __allowlist__" into rel_1_3

4 years agoMerge "include negation symbol in numeric default match" into rel_1_3
mike bayer [Sat, 23 Jan 2021 18:07:51 +0000 (18:07 +0000)] 
Merge "include negation symbol in numeric default match" into rel_1_3

4 years agoremove __allowlist__
Mike Bayer [Sat, 23 Jan 2021 15:31:20 +0000 (10:31 -0500)] 
remove __allowlist__

this testing element is not used

Change-Id: I484c9a9f070122545fcdabe5a7f13b0bfca17023
(cherry picked from commit 20a15345a3f1e4755613d908a3d3cfe1bfe35c6c)

4 years agoRemoved some legacy terms in favor of modern equivalents. (D&I)
jonathan vanasco [Thu, 21 Jan 2021 17:25:04 +0000 (12:25 -0500)] 
Removed some legacy terms in favor of modern equivalents. (D&I)

Migrated testing fixture:
`TestBase.__whitelist__` -> `TestBase.__allowlist__`

Migrated tox commands from deprecated to current:
`whitelist_externals` > `allowlist_externals`

Migrated test_session:
`blacklist` -> `blocklist`

Change-Id: I395d5ee977ff22fa703276b9b873cc96c59b9a35
(cherry picked from commit f6fca84a7ffc71d743bea22e688ef3c944ba545b)

4 years agoinclude negation symbol in numeric default match
Mike Bayer [Sat, 23 Jan 2021 08:00:56 +0000 (03:00 -0500)] 
include negation symbol in numeric default match

Fixed bug where MySQL server default reflection would fail for numeric
values with a negation symbol present.

Fixes: #5860
Change-Id: I02cacdb4f9ec7d9113c27bf0d9214c4e14f4d4f9
(cherry picked from commit 33886b8692fc9a9cf862386a541d15114a659f43)

4 years agoMerge "Add mssql+turbodbc to external dialect list" into rel_1_3
mike bayer [Fri, 15 Jan 2021 14:54:21 +0000 (14:54 +0000)] 
Merge "Add mssql+turbodbc to external dialect list" into rel_1_3

4 years agoUse UnsupportedCompilationError for no default compiler
Mike Bayer [Thu, 14 Jan 2021 16:18:58 +0000 (11:18 -0500)] 
Use UnsupportedCompilationError for no default compiler

Fixed issue where the stringification that is sometimes called when
attempting to generate the "key" for the ``.c`` collection on a selectable
would fail if the column were an unlabeled custom SQL construct using the
``sqlalchemy.ext.compiler`` extension, and did not provide a default
compilation form; while this seems like an unusual case, it can get invoked
for some ORM scenarios such as when the expression is used in an "order by"
in combination with joined eager loading.  The issue is that the lack of a
default compiler function was raising :class:`.CompileError` and not
:class:`.UnsupportedCompilationError`.

Fixes: #5836
Change-Id: I5af243b2c70c7dcca4b212a3869c3017a50c132b
(cherry picked from commit b4c6cfc2fde6c652e79ca157f8023a3f8941bc3c)

4 years agoAdd mssql+turbodbc to external dialect list
Gord Thompson [Tue, 12 Jan 2021 19:58:22 +0000 (12:58 -0700)] 
Add mssql+turbodbc to external dialect list

Fixes: #5834
Change-Id: I1f207b84751e7e3425aa9e8e393787eeb9b595b7
(cherry picked from commit 3c53cfaaf5cd7d224896db07744095f199723315)

4 years agoprovide FAQ entry for percent sign escaping in SQL compiler
Mike Bayer [Wed, 13 Jan 2021 14:06:50 +0000 (09:06 -0500)] 
provide FAQ entry for percent sign escaping in SQL compiler

this is coming up more than once so provide a document

Change-Id: I23dcd4c7a6527b2f33502e67ffad4335f895e6f9
(cherry picked from commit 0a41f9bea6602c52c59af0f7b572308b2c2b27ab)

4 years agoMerge "Remove special rule for TypeDecorator of TypeDecorator" into rel_1_3
mike bayer [Thu, 7 Jan 2021 20:59:25 +0000 (20:59 +0000)] 
Merge "Remove special rule for TypeDecorator of TypeDecorator" into rel_1_3

4 years agoUpdate connect args for pymysql 1.0.0; aiomysql fixes
Mike Bayer [Thu, 7 Jan 2021 17:20:51 +0000 (12:20 -0500)] 
Update connect args for pymysql 1.0.0; aiomysql fixes

Fixed deprecation warnings that arose as a result of the release of PyMySQL
1.0, including deprecation warnings for the "db" and "passwd" parameters
now replaced with "database" and "password".

For the 1.4 version of this patch, we are also changing tox.ini
to refer to a local branch of aiomysql that fixes pymysql
compatibility issues.

Fixes: #5821
Change-Id: I93876b52b2d96b52308f22aeb4f244ac5766a82f
(cherry picked from commit 489301137a4d76e5a46d754ae9c91aad2b3d2c1f)

4 years agoRemove special rule for TypeDecorator of TypeDecorator
Mike Bayer [Tue, 5 Jan 2021 13:48:36 +0000 (08:48 -0500)] 
Remove special rule for TypeDecorator of TypeDecorator

Removing this check for "TypeDecorator" in impl seems to not
break anything and allows TypeDecorator.with_variant() to
work correctly.   The line has been traced back to 2007 and
does not appear to have relevance today.

Fixed bug where making use of the :meth:`.TypeEngine.with_variant` method
on a :class:`.TypeDecorator` type would fail to take into account the
dialect-specific mappings in use, due to a rule in :class:`.TypeDecorator`
that was instead attempting to check for chains of :class:`.TypeDecorator`
instances.

Fixes: #5816
Change-Id: Ic86d9d985810e3050f15972b4841108acca2fa3e
(cherry picked from commit 458f83c6d213a80c2f0353b96421de36aee705f3)

4 years agoCheck for column expr in Oracle RETURNING check
Mike Bayer [Mon, 4 Jan 2021 22:05:46 +0000 (17:05 -0500)] 
Check for column expr in Oracle RETURNING check

Fixed regression in Oracle dialect introduced by :ticket:`4894` in
SQLAlchemy 1.3.11 where use of a SQL expression in RETURNING for an UPDATE
would fail to compile, due to a check for "server_default" when an
arbitrary SQL expression is not a column.

Fixes: #5813
Change-Id: I1977bb49bc971399195015ae45e761f774f4008d
(cherry picked from commit ea467fccbe4337929b91e0daec12b8672fa7907c)

4 years agohappy new year
Mike Bayer [Mon, 4 Jan 2021 14:51:04 +0000 (09:51 -0500)] 
happy new year

Change-Id: Ie6171eedea1d409bd0c570b55f94a82ba19ea58c

4 years agoSupport casting to ``FLOAT`` in MySQL and MariaDb.
Federico Caselli [Wed, 30 Dec 2020 19:36:27 +0000 (20:36 +0100)] 
Support casting to ``FLOAT`` in MySQL and MariaDb.

Fixes: #5808
Change-Id: I8106ddcf681eec3cb3a67d853586702f6e844b9d
(cherry picked from commit 0da7225ac16b966c1cc5f1b2afde4eb6856183aa)

4 years agonarrow the check for double-paren exprs in mysql create_index
Mike Bayer [Sat, 26 Dec 2020 16:16:51 +0000 (11:16 -0500)] 
narrow the check for double-paren exprs in mysql create_index

Fixed regression from SQLAlchemy 1.3.20 caused by the fix for
:ticket:`5462` which adds double-parenthesis for MySQL functional
expressions in indexes, as is required by the backend, this inadvertently
extended to include arbitrary :func:`_sql.text` expressions as well as
Alembic's internal textual component,  which are required by Alembic for
arbitrary index expressions which don't imply double parenthesis.  The
check has been narrowed to include only binary/ unary/functional
expressions directly.

Fixes: #5800
Change-Id: I40f83c6f9dd04b984d0c86eba632a588570709a1
(cherry picked from commit e81bc1f098ea40cf38ec4e4007c11c7f3ffc9712)

4 years agotest fixes for oracle 18c, for rel_1_3
Mike Bayer [Fri, 18 Dec 2020 15:46:20 +0000 (10:46 -0500)] 
test fixes for oracle 18c, for rel_1_3

Change-Id: I4968aa3bde3c4d11d7fe84f18b4a846ba357d16a

4 years agoVersion 1.3.23 placeholder
Mike Bayer [Fri, 18 Dec 2020 21:11:56 +0000 (16:11 -0500)] 
Version 1.3.23 placeholder

4 years ago- 1.3.22 rel_1_3_22
Mike Bayer [Fri, 18 Dec 2020 21:05:31 +0000 (16:05 -0500)] 
- 1.3.22

4 years agoGracefully degrade on v$transaction not readable
Mike Bayer [Fri, 18 Dec 2020 14:28:06 +0000 (09:28 -0500)] 
Gracefully degrade on v$transaction not readable

Fixed regression which occured due to [ticket:5755] which implemented
isolation level support for Oracle.   It has been reported that many Oracle
accounts don't actually have permission to query the ``v$transaction``
view so this feature has been altered to gracefully fallback when it fails
upon database connect, where the dialect will assume "READ COMMITTED" is
the default isolation level as was the case prior to SQLAlchemy 1.3.21.
However, explicit use of the :meth:`_engine.Connection.get_isolation_level`
method must now necessarily raise an exception, as Oracle databases with
this restriction explicitly disallow the user from reading the current
isolation level.

Fixes: #5784
Change-Id: Iefc82928744f3c944c18ae8000eb3c9e52e523bc
(cherry picked from commit 566f1b520e05659ba4d4928c740a9aa1b0fed614)

4 years agoVersion 1.3.22 placeholder
Mike Bayer [Thu, 17 Dec 2020 17:35:20 +0000 (12:35 -0500)] 
Version 1.3.22 placeholder

4 years ago- 1.3.21 rel_1_3_21
Mike Bayer [Thu, 17 Dec 2020 17:27:41 +0000 (12:27 -0500)] 
- 1.3.21

4 years agofix changelog links
Mike Bayer [Thu, 17 Dec 2020 17:21:42 +0000 (12:21 -0500)] 
fix changelog links

Change-Id: Iec06b8e15967bcbf38ae091035b2beb13706f339

4 years agoCheck explicitly for mapped class as secondary
Mike Bayer [Tue, 15 Dec 2020 14:45:48 +0000 (09:45 -0500)] 
Check explicitly for mapped class as secondary

Added a comprehensive check and an informative error message for the case
where a mapped class, or a string mapped class name, is passed to
:paramref:`_orm.relationship.secondary`.  This is an extremely common error
which warrants a clear message.

Additionally, added a new rule to the class registry resolution such that
with regards to the :paramref:`_orm.relationship.secondary` parameter, if a
mapped class and its table are of the identical string name, the
:class:`.Table` will be favored when resolving this parameter.   In all
other cases, the class continues to be favored if a class and table
share the identical name.

Fixes: #5774
Change-Id: I65069d79c1c3897fbd1081a8e1edf3b63b497223
(cherry picked from commit cfcfb7d43c2719ef6e4901dca43de5b492a1f08f)

4 years agoUse .expression accessor for hybrid example
Mike Bayer [Tue, 15 Dec 2020 13:52:15 +0000 (08:52 -0500)] 
Use .expression accessor for hybrid example

hybrids since 1.1 use InstrumentedAttribute at the expression
level, so this doc needed to illustrate how to get at the
SQL expression.  Also added a docstring for
QueryableAttribute.expression.

Fixes: #5773
Change-Id: I4941d245ec947999abfa8e13f047e06a0bd47e5b
(cherry picked from commit 688b4ca6a7f2e32c580d616c6dea1e68b7398fd2)

4 years agoImplement Oracle SERIALIZABLE + real read of isolation level
Mike Bayer [Wed, 9 Dec 2020 03:07:48 +0000 (22:07 -0500)] 
Implement Oracle SERIALIZABLE + real read of isolation level

There's some significant awkwardness in that we can't
read the level unless a transaction is started, which normally
does not occur unless DML is emitted.  The implementation
uses the local_transaction_id function to start a transaction.
It is not known what the performance impact of this might
have, however by default the function is called only once
on first connect and later only if the get_isolation_level()
method is used.

Fixes: #5755
Change-Id: I0453a6b0a49420826707f660931002ba2338fbf0
(cherry picked from commit 7528c2465b3e56ed094f155bff2a3ab8c89cc84f)

4 years agoFixed compile for mssql dialect
Gord Thompson [Tue, 8 Dec 2020 20:23:02 +0000 (15:23 -0500)] 
Fixed compile for mssql dialect

Fixed string compilation when both mssql_include and mssql_where are used

Fixes: #5751
Closes: #5752
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/5752
Pull-request-sha: aa57ad5d93cd69bf7728d864569c31c7e59b54fb

Change-Id: I1201170affd9911c252df5c9b841e538bb577085
(cherry picked from commit 6f8b035c7808fea13bae50995206c9b2ded91f51)

4 years agoMerge "Reflect decimal points in MariaDB non-quoted numeric defaults" into rel_1_3
mike bayer [Thu, 3 Dec 2020 17:39:51 +0000 (17:39 +0000)] 
Merge "Reflect decimal points in MariaDB non-quoted numeric defaults" into rel_1_3

4 years agoReflect decimal points in MariaDB non-quoted numeric defaults
Mike Bayer [Thu, 3 Dec 2020 16:17:08 +0000 (11:17 -0500)] 
Reflect decimal points in MariaDB non-quoted numeric defaults

Fixed issue where reflecting a server default on MariaDB only that
contained a decimal point in the value would fail to be reflected
correctly, leading towards a reflected table that lacked any server
default.

Fixes: #5744
Change-Id: Ifc5960928685a906558ba84ed6f59eecb3b1c358
(cherry picked from commit 7fb41cfc69c6521bebce229a56bddd6267f39955)

4 years agoFix documentation link in query with_for_update
Federico Caselli [Wed, 2 Dec 2020 21:09:59 +0000 (22:09 +0100)] 
Fix documentation link in query with_for_update

Change-Id: I4e9a97905d42686c911da81a25f023519328a8a3
(cherry picked from commit 80050b8a19a324e84fbf6b3f81e82f377305b044)

4 years agomodernize contains_eager() docs
Mike Bayer [Wed, 2 Dec 2020 14:26:18 +0000 (09:26 -0500)] 
modernize contains_eager() docs

Along with other loader options that are likely
to require usage of populate_existing(), make sure
contains_eager() documentation makes it absolutely
clear that already-loaded collections are not overwritten.
consolidate contains_eager() documentation into the narrative docs.

Additionally, remove the "arbitrary statements" section, this is
not a useful case and seems to be left over.

Fixes: #5740
Change-Id: I10e320882990f511eefebcc88cfcc2277e553b50
(cherry picked from commit 0d76857ee1022f41baffff4091be765deea4e421)

4 years agoPass along other keyword args in _EventsHold.populate
Mike Bayer [Tue, 1 Dec 2020 21:03:35 +0000 (16:03 -0500)] 
Pass along other keyword args in _EventsHold.populate

Fixed bug involving the ``restore_load_context`` option of ORM events such
as :meth:`_orm.InstanceEvents.load` such that the flag would not be carried
along to subclasses which were mapped after the event handler were first
established.

Fixes: #5737
Change-Id: Ie65fbeac7ab223d24993cff0b34094d4928ff113
(cherry picked from commit 14c08d18885e16611b884bd76ba2811375de1731)

4 years agoMerge "Don't discard leftovers from surface_selectables" into rel_1_3
mike bayer [Fri, 27 Nov 2020 18:04:28 +0000 (18:04 +0000)] 
Merge "Don't discard leftovers from surface_selectables" into rel_1_3

4 years agoUse String for PostgreSQL xmin example
Mike Bayer [Thu, 26 Nov 2020 17:28:19 +0000 (12:28 -0500)] 
Use String for PostgreSQL xmin example

Fixes: #5728
Change-Id: I1efd6296018a80470b8c215b225898bbfea742a8
(cherry picked from commit 1cb05352a3dc40c1c6245a28af401ca7a4bddd1f)

4 years agoDon't discard leftovers from surface_selectables
Mike Bayer [Thu, 26 Nov 2020 17:10:25 +0000 (12:10 -0500)] 
Don't discard leftovers from surface_selectables

Fixed regression introduced in 1.3.2 for the PostgreSQL dialect, also
copied out to the MySQL dialect's feature in 1.3.18, where usage of a non
:class:`_schema.Table` construct such as :func:`_sql.text` as the argument
to :paramref:`_sql.Select.with_for_update.of` would fail to be accommodated
correctly within the PostgreSQL or MySQL compilers.

Fixes: #5729
Change-Id: I265bcc171f0eb865ac3910ee805b162f3b70e2c1
(cherry picked from commit 6125dfff91ca0093a00d78804917240617825c44)

4 years agoimprove column_reflect docs
Mike Bayer [Wed, 18 Nov 2020 14:25:34 +0000 (09:25 -0500)] 
improve column_reflect docs

Change-Id: I41d947e3cccb68c2d1ca811b5b2ae4b3f66409fb
References: #5711
(cherry picked from commit 4d3bc75738a8f76327a4f0cd344c217ff63e978d)

4 years agoCorrect versionadded for #5604
Mike Bayer [Mon, 16 Nov 2020 20:01:37 +0000 (15:01 -0500)] 
Correct versionadded for #5604

Change-Id: I840a08253ecba1c8200c2dfd7f2c0b7b3598af0f
(cherry picked from commit c86266e9757beb6d932e1e0c4e015cd29c0dde17)

4 years agoAdd opsclass to exclusion constraint
AlonM [Sun, 15 Nov 2020 13:13:25 +0000 (08:13 -0500)] 
Add opsclass to exclusion constraint

Added new parameter :paramref:`_postgresql.ExcludeConstraint.ops` to the
:class:`_postgresql.ExcludeConstraint` object, to support operator class
specification with this constraint.  Pull request courtesy Alon Menczer.

Fixes: #5604
Closes: #5700
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/5700
Pull-request-sha: f8613e100792fc0bb3cf300ec6aebc78ecdf0361

Change-Id: Iaf664131ec84f8c2fb05edf799198b8d3bb83597
(cherry picked from commit 018aa9870110ef97316e9984c7ecd7f3357b501a)

4 years agoformatting
Mike Bayer [Fri, 13 Nov 2020 15:07:50 +0000 (10:07 -0500)] 
formatting

Change-Id: Icdbd393d1da79b8534a70e1e9e02f2a5a5915391
(cherry picked from commit e1891931b799defb86621a1cfbab26647afd362e)

4 years agoAdded missing keywords for MySQL dialect
Oscar Batori [Wed, 16 Sep 2020 17:41:34 +0000 (13:41 -0400)] 
Added missing keywords for MySQL dialect

Fixes: #5696
Add missing MySQL keywords.

### Description
Adds some missing keywords from the MySQL dialect. While it's hard to describe this as a documentation/typographical fix, there are no current test for presence of the correct keywords, nor a realistic way to implement them those tests.

### Checklist
This pull request is:

- [x] A documentation / typographical 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: #5567
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/5567
Pull-request-sha: db76e7f9d3a903cb4acf0309d57a14fe69948a0f

Change-Id: Ieaef45d0214fc9052a36924bfee38df9a27f7040
(cherry picked from commit 5ef39fa2c16e293e73d8c7cee019857e081b9b52)

4 years agoWarn / raise for returning() / return_defaults() combinations
Mike Bayer [Wed, 11 Nov 2020 16:13:27 +0000 (11:13 -0500)] 
Warn / raise for returning() / return_defaults() combinations

A warning is emmitted if a returning() method such as
:meth:`_sql.Insert.returning` is called multiple times, as this does not
yet support additive operation.  Version 1.4 will support additive
operation for this.  Additionally, any combination of the
:meth:`_sql.Insert.returning` and :meth:`_sql.Insert.return_defaults`
methods now raises an error as these methods are mutually exclusive;
previously the operation would fail silently.

Fixes: #5691
Change-Id: Id95e0f9da48bba0b59439cb26564f0daa684c8e3
(cherry picked from commit 44d64aef3ce26a1dd62b61ed15888d8baab06443)

4 years agoRemove misleading correlation examples
Mike Bayer [Wed, 11 Nov 2020 15:42:09 +0000 (10:42 -0500)] 
Remove misleading correlation examples

add links to tutorial docs

Fixes: #5694
Change-Id: I10a8e3f46a115945ded36d4ee59165c056c10f7a
(cherry picked from commit afb26d79d7b9256ee26b4d3b8550f7088f4b6249)

4 years agoSupport SQLite WITHOUT ROWID tables
Sean Anderson [Sun, 8 Nov 2020 00:52:04 +0000 (19:52 -0500)] 
Support SQLite WITHOUT ROWID tables

This adds support for creating tables WITHOUT ROWID in the SQLite
dialect. WITHOUT ROWID tables were introduced in SQLite version 3.8.2
(2013-12-06). They do not use an implicit rowid column as the primary
key. This may result in space and performance savings for tables without
INTEGER primary keys and tables with composite primary keys. For more
information about this feature, see the sqlite documentation [1].

[1] https://www.sqlite.org/withoutrowid.html

Fixes: #5685
### Checklist
This pull request is:

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

Closes: #5686
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/5686
Pull-request-sha: 2b44782d1b3d858e31ce1ff8e08e197af37344d8

Change-Id: Ifcf727b0c07c90e267b79828a8e3fd7a8260a074
(cherry picked from commit 4b39b0f89dfd47dc9f5ba948e564c2afbbd44fef)

4 years agorevert the code change part of the previous commit
Mike Bayer [Sat, 7 Nov 2020 19:16:59 +0000 (14:16 -0500)] 
revert the code change part of the previous commit

Change-Id: I0af7b05fa00dbc706c66558873f4542d365acbc5
(cherry picked from commit 89e748d7ad4426077313aaec916b41f999ae5a34)

4 years agoimprove verbiage a bit for the public_factory
Mike Bayer [Sat, 7 Nov 2020 18:38:38 +0000 (13:38 -0500)] 
improve verbiage a bit for the public_factory

Change-Id: I52fb88f6d08333063e749857eb7d8edcebabd738
(cherry picked from commit 8e486fa565bb91e3a21176bb029253e5f5544da4)

4 years agoFix wheel generation
Federico Caselli [Mon, 2 Nov 2020 21:49:55 +0000 (22:49 +0100)] 
Fix wheel generation

Avoid passing LD_LIBRARY_PATH variable to the docker image used
to generate the wheels

Change-Id: I418a9574a7f49695984b1c68c997fc02f0450c12
(cherry picked from commit d30bb5154c34aa7e13ce11a0a561a2dbdf17a94d)

4 years agoupdate selectin docs
Mike Bayer [Sat, 31 Oct 2020 23:08:28 +0000 (19:08 -0400)] 
update selectin docs

* correct many-to-one example that doesnt use JOIN or ORDER BY
anymore

* Oracle does tuple IN, let's test it

* many-to-many is supported but joins all the way right now

* remove verbiage about yield_per for the moment to simplify
updates to how yield_per works w/ new style execution.  yield_per
is difficult to explain and the section seems kind of complicated
with those details added at the moment.

Change-Id: I010ed36f554f06310f336a5b12760c447b38ec01
(cherry picked from commit 72fa0ece049f08d5d24940272b80b1290fef6192)

4 years agoClarify bulk operations caveats
Mike Bayer [Fri, 30 Oct 2020 03:12:19 +0000 (23:12 -0400)] 
Clarify bulk operations caveats

Fixes: #5678
Change-Id: I186b26d1265c106bb87fb9e680229cad1eb8d7ea
(cherry picked from commit b9f7a92d821a31e48f7ce20ef848e73571c644fa)

4 years agoadded docstring about expire_on_commit for #5243
jonathan vanasco [Fri, 4 Sep 2020 23:48:38 +0000 (19:48 -0400)] 
added docstring about expire_on_commit for #5243

Fixes: #5243
Closes: #5328
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/5328
Pull-request-sha: e760ed4ef1749aadfb8d63d776c764d98b93b1e5

Change-Id: I8e7bc3429dc279d447cc66400c76b4d2a04626aa
(cherry picked from commit 10851b002844fa4f9de7af92dbb15cb1133497eb)

4 years agoMerge "Correct reflection for composite primary keys" into rel_1_3
mike bayer [Mon, 26 Oct 2020 14:29:36 +0000 (14:29 +0000)] 
Merge "Correct reflection for composite primary keys" into rel_1_3

4 years agoimprove engine logging docs
Mike Bayer [Sat, 24 Oct 2020 16:59:22 +0000 (12:59 -0400)] 
improve engine logging docs

the text here was a little confusing and didn't refer to major
configurational elements such as hide_parameters.

Change-Id: I4e2179e5a64c326d30b65a8871b924725c41b453
(cherry picked from commit a1c51879aeb7811a23e454d2e90ad3bbae92b7a1)

4 years agoCorrect reflection for composite primary keys
fulpm [Tue, 20 Oct 2020 21:54:50 +0000 (17:54 -0400)] 
Correct reflection for composite primary keys

Fixes: #5661
### Description
Fixes reflection of composite primary keys to maintain the correct column order in the MSSQL
and SQLite dialects.

Closes: #5662
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/5662
Pull-request-sha: b568dec7070b4f3ee46a528bdf16fb237baade2a

Change-Id: I452b23cbf7f389c4a0a34cffce5c32498efe37d2
(cherry picked from commit 7937a409f9e685341b6a5b8385491befe0aaa4d4)

4 years agoDon't load expired objects from evaluator
Mike Bayer [Wed, 21 Oct 2020 19:01:03 +0000 (15:01 -0400)] 
Don't load expired objects from evaluator

part 2 of e3dc20ff27fa75e571fb2631e64737ea8f25f7c5, the
pre-evaluate step was also emitting SELECT for expired objects.

Fixes: #5664
Change-Id: I9f5de2a5d480eafeb290ec0c45ce2a82ec93475b
(cherry picked from commit cd7d14f7ce8ef54e66d166b4904e8c21e967a5a2)

4 years agoDon't populate expired attrs w/ evaluator
Mike Bayer [Wed, 21 Oct 2020 17:58:22 +0000 (13:58 -0400)] 
Don't populate expired attrs w/ evaluator

Fixed bug in :meth:`_orm.Query.update` where objects in the
:class:`_orm.Session` that were already expired would be unnecessarily
SELECTed individually when they were refreshed by the "evaluate"
synchronize strategy.

For 1.4 there was also a similar issue with fetch that would actually
get the wrong data back, as the new value would be loaded, then
applied with the evaluator.

Fixes: #5664
Change-Id: I6e6aff88462654fcefa9fce2b45f5446c418deee
(cherry picked from commit e3dc20ff27fa75e571fb2631e64737ea8f25f7c5)

4 years agoImprove assoc proxy docs for 1.3 changes
Mike Bayer [Tue, 20 Oct 2020 14:20:39 +0000 (10:20 -0400)] 
Improve assoc proxy docs for 1.3 changes

Fixes: #5647
Change-Id: I98979577f5354eba993ade9fc5056db718f47a18
(cherry picked from commit 04d45f8adeafe5bb8981e7cfd94b11d36248d860)

4 years agoEnsure no compiler visit method tries to access .statement
Mike Bayer [Mon, 19 Oct 2020 14:19:29 +0000 (10:19 -0400)] 
Ensure no compiler visit method tries to access .statement

Fixed structural compiler issue where some constructs such as MySQL /
PostgreSQL "on conflict / on duplicate key" would rely upon the state of
the :class:`_sql.Compiler` object being fixed against their statement as
the top level statement, which would fail in cases where those statements
are branched from a different context, such as a DDL construct linked to a
SQL statement.

Fixes: #5656
Change-Id: I568bf40adc7edcf72ea6c7fd6eb9d07790de189e
(cherry picked from commit dfcd117afca36ea3f5f574f9bef6036dae609de8)

4 years agoindicate legacy ping recipe for handle_error cases
Mike Bayer [Thu, 15 Oct 2020 17:21:34 +0000 (13:21 -0400)] 
indicate legacy ping recipe for handle_error cases

in prep for a new feature as part of #5648.

Change-Id: I6720b0ea797c188de5e8163f79fb7b7994d6e76e
(cherry picked from commit 41d3e16773e84692b6625ccb67da204b5362d9c3)

4 years agoAdd discussed changes
Evan Taylor Yates [Tue, 13 Oct 2020 19:21:30 +0000 (12:21 -0700)] 
Add discussed changes

link: https://github.com/sqlalchemy/sqlalchemy/pull/5636
(cherry picked from commit 7740ce6900ad3e65364660a270cc72458421433a)

Change-Id: Id6edf10e2fa3ec293c3833c6a80dbdabaaa2580e

4 years agoMerge "Add SQL Server 01000 disconnect" into rel_1_3
mike bayer [Wed, 14 Oct 2020 20:34:52 +0000 (20:34 +0000)] 
Merge "Add SQL Server 01000 disconnect" into rel_1_3

4 years agoblock python keywords from random list of names
Mike Bayer [Wed, 14 Oct 2020 17:50:44 +0000 (13:50 -0400)] 
block python keywords from random list of names

Change-Id: I0259bed2ee06e741889e8b9bed6bf6ad106fa425
(cherry picked from commit b03d5358ec83ad7484ccd452e63ab34e874b53b3)

4 years agoAdd SQL Server 01000 disconnect
Mike Bayer [Wed, 14 Oct 2020 16:05:40 +0000 (12:05 -0400)] 
Add SQL Server 01000 disconnect

Fixes: #5646
Change-Id: I25fcba7cf866871f1232b586e7e604162bd8cc43
(cherry picked from commit 01633d94a526eb304729ed95dfbf6780c30dd258)

4 years agoVersion 1.3.21 placeholder
Mike Bayer [Mon, 12 Oct 2020 22:33:32 +0000 (18:33 -0400)] 
Version 1.3.21 placeholder

4 years ago- 1.3.20 rel_1_3_20
Mike Bayer [Mon, 12 Oct 2020 22:30:08 +0000 (18:30 -0400)] 
- 1.3.20

4 years agotypo
Mike Bayer [Mon, 12 Oct 2020 22:29:20 +0000 (18:29 -0400)] 
typo

Change-Id: I0a753a2b48ed932c3209b93df0a96efe90af17c5
(cherry picked from commit 501c5dff8ea12aaac44f1dee6bca2db6a468d89c)

4 years agochangelog edits for 1.3.20
Mike Bayer [Mon, 12 Oct 2020 22:22:01 +0000 (18:22 -0400)] 
changelog edits for 1.3.20

Change-Id: Ic053a30e9f0e6c99b638a0629e1192336bff3f76
(cherry picked from commit 6bf0e4ce35c0929e7e8dcb7c25fabe7f7c599f38)

4 years agoSupport indexing on expressions and functions for the MySQL dialect
RamonWill [Wed, 16 Sep 2020 21:47:21 +0000 (17:47 -0400)] 
Support indexing on expressions and functions for the MySQL dialect

A user noticed that creating an index where the "key part" was an expression
or function would raise an error for MySQL because the key part was not
parenthesized. The proposed change will check whether a key part is not a
Column or Unary Expression  and parenthesize if the case is False.

This fix also contains a minor fix to a test case that was previously incorrect
(`def test_create_index_expr():`).

**Have a nice day!**
Fixes: #5462
Closes: #5587
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/5587
Pull-request-sha: 7515e50cd7435744fc79c210b2f3aa4c0546ba28

Change-Id: Id1b3b3026983c0e05808baa243e354f82b78180c
(cherry picked from commit 9dedf37446108196b585ffdcef8dd48c378d1401)

4 years agoRepair reduction in Over
Mike Bayer [Mon, 12 Oct 2020 16:47:38 +0000 (12:47 -0400)] 
Repair reduction in Over

Fixed issue where a plain pickle dumps call of the :class:`_sql.Over`
construct didn't work.

Fixes: #5644
Change-Id: I4b07f74ecd5d52f0794128585367012200a38a36
(cherry picked from commit 9322de12f5c5eca397b13cb7db2b6196f58aceb3)

4 years agoAdd python 3.9 to ci test and wheel workflow
Federico Caselli [Thu, 8 Oct 2020 18:34:02 +0000 (20:34 +0200)] 
Add python 3.9 to ci test and wheel workflow

Change-Id: I3b80b836ca547fa92f324acb265180cdeea17611
(cherry picked from commit 21e327690558639b0eead6c1abf0019039a02d3b)

4 years agopin pytest lower bound at 4.6.11
Mike Bayer [Thu, 8 Oct 2020 16:52:39 +0000 (12:52 -0400)] 
pin pytest lower bound at 4.6.11

we need 4.6 to support Python 2.  however 4.6.0 is too low,
4.6.11 seems to work in both python 2 and 3, pin on that

Change-Id: I0a5995ca5e5bf08a06997130e4ffbaaceef8d942
(cherry picked from commit bcc17b1d6e2cac3b0e45c0b17a62cf2d5fc5c5ab)

4 years agoAdd changelog for pytest 6.x fix.
Mike Bayer [Thu, 8 Oct 2020 15:56:04 +0000 (11:56 -0400)] 
Add changelog for pytest 6.x fix.

pytest 6.x support was fixed in 40cdb9c for 1.3 and in ffafbd4
for master.   Add a note as this is an observable issue
in 1.3.19.

Fixes: #5635
Change-Id: Iee67822d6962800646546c69ee0ad0c494007c86
(cherry picked from commit 92af8dae09618198685b82f10072c8d43ad6a877)

4 years agoUse preloaded for sql.util import in exc
Mike Bayer [Wed, 7 Oct 2020 01:46:03 +0000 (21:46 -0400)] 
Use preloaded for sql.util import in exc

Repaired a function-level import that was not using SQLAlchemy's standard
late-import system within the sqlalchemy.exc module.

Moves 1.3 dependencies() to sqlalchemy.util.preloaded so that it
does not depend on langhelpers which depends on exc.

Fixes: #5632
Change-Id: I61b7ce9cd461071ce543714739f67aa5aeb47fd6
(cherry picked with major changes from commit 2f28ba5513fc7da4efb315e1a03d50ebe40ca566)