]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/log
thirdparty/sqlalchemy/sqlalchemy.git
2 years agoRemove missing doc section
Federico Caselli [Thu, 12 Jan 2023 22:08:33 +0000 (23:08 +0100)] 
Remove missing doc section

Change-Id: Ic6dda7f32a7561a0c0a92b8a7c08e44cb174eec1

2 years agoMerge "add with_loader_criteria() test for #8064 / #9091" into rel_1_4
mike bayer [Thu, 12 Jan 2023 18:55:16 +0000 (18:55 +0000)] 
Merge "add with_loader_criteria() test for #8064 / #9091" into rel_1_4

2 years agoMove docs in mysql dbapi
Federico Caselli [Wed, 11 Jan 2023 19:33:16 +0000 (20:33 +0100)] 
Move docs in mysql dbapi

Fixes: #9084
Change-Id: I5e174c318a20b7fcb5ea7c771293c5102e761ed7
(cherry picked from commit a06cd94baab114cd0b2fa0987267e31811d38f7a)

2 years agoadd with_loader_criteria() test for #8064 / #9091
Mike Bayer [Thu, 12 Jan 2023 16:25:39 +0000 (11:25 -0500)] 
add with_loader_criteria() test for #8064 / #9091

test related to #8064, added after discussion #9091 which
requested this behavior for with_loader_criteria() where it was
found to be working as of this issue, just not tested

Change-Id: I703f25af3708e49380b6004badd3a8ffb783ef70
References: #8064
References: #9091
(cherry picked from commit a2bf6f1bb4a56dfe6c6d1fe22c3a4e84f5da99bc)

2 years agofix ORM support for column-named bindparam() in crud .values()
Mike Bayer [Tue, 10 Jan 2023 14:51:23 +0000 (09:51 -0500)] 
fix ORM support for column-named bindparam() in crud .values()

Fixed bug / regression where using :func:`.bindparam()` with the same name
as a column in the :meth:`.Update.values` method of :class:`.Update`, as
well as the :meth:`.Insert.values` method of :class:`.Insert` in 2.0 only,
would in some cases silently fail to honor the SQL expression in which the
parameter were presented, replacing the expression with a new parameter of
the same name and discarding any other elements of the SQL expression, such
as SQL functions, etc. The specific case would be statements that were
constructed against ORM entities rather than plain :class:`.Table`
instances, but would occur if the statement were invoked with a
:class:`.Session` or a :class:`.Connection`.

:class:`.Update` part of the issue was present in both 2.0 and 1.4 and is
backported to 1.4.

For 1.4, also backports the sqlalchemy.testing.Variation update
to the variation() API.

Fixes: #9075
Change-Id: Ie954bc1f492ec6a566163588182ef4910c7ee452
(cherry picked from commit b5b864e0fe50243a94c0ef04fddda6fa446c1524)

2 years agoremove misleading line in post_update
Mike Bayer [Mon, 9 Jan 2023 17:38:10 +0000 (12:38 -0500)] 
remove misleading line in post_update

this UPDATE refers to the unit of work's need to consider this
additional UPDATE as a dependency and not an actual UPDATE statement.

Change-Id: I2a520af21ebf96b45c431efa898d4e7683a5bc2d
References: #9066
References: #1063
(cherry picked from commit 2ef4b449a7709ecab45e926f0e8d0dd398fd12db)

2 years agoMerge "include parsed col length field as integer from mysql index reflection" into...
mike bayer [Thu, 5 Jan 2023 14:17:09 +0000 (14:17 +0000)] 
Merge "include parsed col length field as integer from mysql index reflection" into rel_1_4

2 years ago[asyncpg] Extract rowcount for SELECT statements
Michael Gorven [Wed, 4 Jan 2023 17:30:42 +0000 (12:30 -0500)] 
[asyncpg] Extract rowcount for SELECT statements

Added support to the asyncpg dialect to return the ``cursor.rowcount``
value for SELECT statements when available. While this is not a typical use
for ``cursor.rowcount``, the other PostgreSQL dialects generally provide
this value. Pull request courtesy Michael Gorven.

Fixes: #9048
Closes: #9049
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/9049
Pull-request-sha: df16160530c6001d99de059995ad5047a75fb7b0

Change-Id: I095b866779ccea7e4d50bc841fef7605e61c667f
(cherry picked from commit 9c502f5788737fa65029716c73fe0f65f3dafb53)

2 years agoinclude parsed col length field as integer from mysql index reflection
Mike Bayer [Wed, 4 Jan 2023 14:23:07 +0000 (09:23 -0500)] 
include parsed col length field as integer from mysql index reflection

Added support to MySQL index reflection to correctly reflect the
``mysql_length`` dictionary, which previously was being ignored.

Fixes: #9047
Change-Id: I0a5e27123be68741e12af4464a0fa305052ec36e
(cherry picked from commit 4a31f97824095610cfdbc1ac1180fd8690f9f477)

2 years agoVersion 1.4.47 placeholder
Mike Bayer [Tue, 3 Jan 2023 20:17:21 +0000 (15:17 -0500)] 
Version 1.4.47 placeholder

2 years ago- 1.4.46 rel_1_4_46
Mike Bayer [Tue, 3 Jan 2023 20:02:32 +0000 (15:02 -0500)] 
- 1.4.46

2 years agoupdate wording
Mike Bayer [Tue, 3 Jan 2023 20:01:40 +0000 (15:01 -0500)] 
update wording

Change-Id: I19c7d9683218d2c059aa36dd1743661e78974976

2 years agochangelog updates
Mike Bayer [Tue, 3 Jan 2023 19:54:14 +0000 (14:54 -0500)] 
changelog updates

Change-Id: I69581c1563f15762a9a9afae4741e23fefd76906

2 years agohappy new year 2023
Mike Bayer [Tue, 3 Jan 2023 17:50:29 +0000 (12:50 -0500)] 
happy new year 2023

Change-Id: I14db8e9c69a832b0f5dae8036db3c0a70bb49edd

2 years agolink to with_variant() narrative from API doc
Mike Bayer [Tue, 3 Jan 2023 14:48:06 +0000 (09:48 -0500)] 
link to with_variant() narrative from API doc

Change-Id: I5d8e4d7cb7871bedebe0fe89758be441e64b94c6
(cherry picked from commit 7f86be997eea27bc994b25c4fb65d72b3d4567f9)

2 years agoMerge "add uber warning for 1.4" into rel_1_4
mike bayer [Tue, 3 Jan 2023 05:14:06 +0000 (05:14 +0000)] 
Merge "add uber warning for 1.4" into rel_1_4

2 years agorepair underline levels in 20 migration doc
Mike Bayer [Tue, 3 Jan 2023 04:58:06 +0000 (23:58 -0500)] 
repair underline levels in 20 migration doc

two sections got whacked here, update underlines to be
the same as the 2.0 branch

Change-Id: Ic36d51ad9a2cbe23482f72e73f4cbbcbe1617780

2 years agoadd uber warning for 1.4
Mike Bayer [Mon, 2 Jan 2023 17:27:36 +0000 (12:27 -0500)] 
add uber warning for 1.4

As we don't have any automatic deprecation warning for 2.0
unless SQLALCHEMY_WARN_20 is set, applications that are not
being monitored for deprecations have no way to guard against
2.0 being released on pypi unless they add a requirements
rule.

make sure we are putting out a major warning for people who
may have not noticed that SQLAlchemy 2.0 will break compatibility
with legacy use patterns.

Fixes: #8983
Change-Id: I7d50db52c9a0fe3165b0131aab2fce9af80d51dd

2 years agoRectify reference to class LambdaElement, misnamed as LamdaElement (#9037)
Lele Gaifax [Thu, 29 Dec 2022 09:21:09 +0000 (10:21 +0100)] 
Rectify reference to class LambdaElement, misnamed as LamdaElement (#9037)

Fixes #9034.

2 years agonote that 2.0 has behavioral changes outside of the 1.4->2.0 process
Mike Bayer [Wed, 28 Dec 2022 20:53:03 +0000 (15:53 -0500)] 
note that 2.0 has behavioral changes outside of the 1.4->2.0 process

Change-Id: I0ab9611c75f592acec73ca92271f970eae74d7ab
(cherry picked from commit 2c1550af60e5fc8303990519b3ae497401196348)

2 years agochangelog adjustments
Mike Bayer [Wed, 28 Dec 2022 20:30:32 +0000 (15:30 -0500)] 
changelog adjustments

include backport markings

Change-Id: I810923a641977569b8b4d9967e84b8cb684e7a52
(cherry picked from commit 46fe3e53e06864cafbbcbfd8a82a2ec00727b8c5)

2 years agoensure whereclause, returning copied as tuples
Mike Bayer [Wed, 28 Dec 2022 17:04:07 +0000 (12:04 -0500)] 
ensure whereclause, returning copied as tuples

Fixed issue in the internal SQL traversal for DML statements like
:class:`_dml.Update` and :class:`_dml.Delete` which would cause among other
potential issues, a specific issue using lambda statements with the ORM
update/delete feature.

Fixes: #9033
Change-Id: I76428049cb767ba302fbea89555114bf63ab8687
(cherry picked from commit e68173bf7d296b2948abed06f79c7cbd0ab66b0d)

2 years agoCorrect URL import in docs
Federico Caselli [Wed, 28 Dec 2022 12:33:53 +0000 (13:33 +0100)] 
Correct URL import in docs

Fixes: #9032
Change-Id: I2c4164d8e1c74e0c74a578f4629c714b96761ed5

2 years agoMerge "pass more contextual information to PyWrapper param create" into rel_1_4
mike bayer [Tue, 27 Dec 2022 20:54:01 +0000 (20:54 +0000)] 
Merge "pass more contextual information to PyWrapper param create" into rel_1_4

2 years agodont prefix ssl args with "ssl" in the ssl dict
Mike Bayer [Tue, 27 Dec 2022 20:51:06 +0000 (15:51 -0500)] 
dont prefix ssl args with "ssl" in the ssl dict

Fixes: #9031
Change-Id: I9ef077e7da5b2328a345f6526a6210ce82d807f6
(cherry picked from commit e0ea78bd079c1545ced7c9233f949fabe296cd07)

2 years agopass more contextual information to PyWrapper param create
Mike Bayer [Tue, 27 Dec 2022 17:29:38 +0000 (12:29 -0500)] 
pass more contextual information to PyWrapper param create

Fixed issue in lambda SQL feature where the calculated type of a literal
value would not take into account the type coercion rules of the "compared
to type", leading to a lack of typing information for SQL expressions, such
as comparisons to :class:`.JSON` elements and similar.

Fixes: #9029
Change-Id: I381c8d7458d98ba762313dee9ec47a9c1881f74a
(cherry picked from commit f63d7e33ec785a5ea4fbc77963c537be26b8419b)

2 years agoexpand out Index if passed to "constraint"
Mike Bayer [Thu, 22 Dec 2022 23:14:31 +0000 (18:14 -0500)] 
expand out Index if passed to "constraint"

Fixed bug where the PostgreSQL
:paramref:`_postgresql.OnConflictClause.constraint` parameter would accept
an :class:`.Index` object, however would not expand this index out into its
individual index expressions, instead rendering its name in an ON CONFLICT
ON CONSTRAINT clause, which is not accepted by PostgreSQL; the "constraint
name" form only accepts unique or exclude constraint names. The parameter
continues to accept the index but now expands it out into its component
expressions for the render.

Fixes: #9023
Change-Id: I6baf243e26bfe578bf3f193c162dd7a623b6ede9
(cherry picked from commit 5cc18bb80077e98418b4a8066c0bc628209f3ada)

2 years agoMerge "add joins_implicitly to column_valued()" into rel_1_4
mike bayer [Tue, 20 Dec 2022 20:48:36 +0000 (20:48 +0000)] 
Merge "add joins_implicitly to column_valued()" into rel_1_4

2 years agoadd joins_implicitly to column_valued()
Mike Bayer [Mon, 19 Dec 2022 20:15:35 +0000 (15:15 -0500)] 
add joins_implicitly to column_valued()

Added parameter
:paramref:`.FunctionElement.column_valued.joins_implicitly`, which is
useful in preventing the "cartesian product" warning when making use of
table-valued or column-valued functions. This parameter was already
introduced for :meth:`.FunctionElement.table_valued` in :ticket:`7845`,
however it failed to be added for :meth:`.FunctionElement.column_valued`
as well.

Fixes: #9009
Change-Id: Ifb72fbcb4f4d2998e730d6f85ec7280df3bf3d47
(cherry picked from commit 567878e5c67d08c561dd064fe6dc25e4db7349e7)

2 years agoAdd MACCADDR8 for PGCompiler
asimfarooq5 [Wed, 14 Dec 2022 20:32:47 +0000 (15:32 -0500)] 
Add MACCADDR8 for PGCompiler

Add MACCADDR8 for PGCompiler

Closes: #8393
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/8393
Pull-request-sha: 837a68eba3e31e0acbb7c47ee87bca4e9def7648

Change-Id: I87e4999eb8d82662ff8ab409c98dc57edd7fd271
(cherry picked from commit 33f15740a0b72bae64fc2c2f6d0f9724cfe9164a)

2 years agoadd exclusion for unusual chars in column names
Mike Bayer [Mon, 19 Dec 2022 13:34:51 +0000 (08:34 -0500)] 
add exclusion for unusual chars in column names

Added new exclusion rule for third party dialects called
``unusual_column_name_characters``, which can be "closed" for third party
dialects that don't support column names with unusual characters such as
dots, slashes, or percent signs in them, even if the name is properly
quoted.

Fixes: #9002
Change-Id: I44b765df4c73ce5ec1907d031fd9c89761fd99d1
References: #8993
(cherry picked from commit 946058ec6070ab4db9fdfab612ec4543fea9cd1c)

2 years agodont call platform.architecture()
Mike Bayer [Fri, 16 Dec 2022 19:05:48 +0000 (14:05 -0500)] 
dont call platform.architecture()

Fixed regression where the base compat module was calling upon
``platform.architecture()`` in order to detect some system properties,
which results in an over-broad system call against the system-level
``file`` call that is unavailable under some circumstances, including
within some secure environment configurations.

Fixes: #8995
Change-Id: Ib6171e75aff5a60a79dab81a0be21bee2456318b
(cherry picked from commit e852362bfdf9a18dfd91137f4a2d7c2dfee30082)

2 years agoimplement literal_binds with expanding + bind_expression
Mike Bayer [Thu, 15 Dec 2022 15:22:36 +0000 (10:22 -0500)] 
implement literal_binds with expanding + bind_expression

Fixed bug where SQL compilation would fail (assertion fail in 2.0, NoneType
error in 1.4) when using an expression whose type included
:meth:`_types.TypeEngine.bind_expression`, in the context of an "expanding"
(i.e. "IN") parameter in conjunction with the ``literal_binds`` compiler
parameter.

Fixes: #8989
Change-Id: Ic9fd27b46381b488117295ea5a492d8fc158e39f
(cherry picked from commit 8c6de3c2c43ab372cbbe76464b4c5be3b6457252)

2 years agoMerge "catch all BaseException in pool and revert failed checkouts" into rel_1_4
mike bayer [Wed, 14 Dec 2022 20:40:59 +0000 (20:40 +0000)] 
Merge "catch all BaseException in pool and revert failed checkouts" into rel_1_4

2 years agocheck index_list pragma for number of columns returned
Mike Bayer [Mon, 12 Dec 2022 23:05:07 +0000 (18:05 -0500)] 
check index_list pragma for number of columns returned

Fixed regression caused by new support for reflection of partial indexes on
SQLite added in 1.4.45 for :ticket:`8804`, where the ``index_list`` pragma
command in very old versions of SQLite (possibly prior to 3.8.9) does not
return the current expected number of columns, leading to exceptions raised
when reflecting tables and indexes.

Fixes: #8969
Change-Id: If317cdcfc6782f7e180df329b6ea0ddb48ce2269
(cherry picked from commit e026a0f3562bec5fbc18e223176be8121c147193)

2 years agocatch all BaseException in pool and revert failed checkouts
Mike Bayer [Mon, 12 Dec 2022 18:47:27 +0000 (13:47 -0500)] 
catch all BaseException in pool and revert failed checkouts

Fixed a long-standing race condition in the connection pool which could
occur under eventlet/gevent monkeypatching schemes in conjunction with the
use of eventlet/gevent ``Timeout`` conditions, where a connection pool
checkout that's interrupted due to the timeout would fail to clean up the
failed state, causing the underlying connection record and sometimes the
database connection itself to "leak", leaving the pool in an invalid state
with unreachable entries. This issue was first identified and fixed in
SQLAlchemy 1.2 for :ticket:`4225`, however the failure modes detected in
that fix failed to accommodate for ``BaseException``, rather than
``Exception``, which prevented eventlet/gevent ``Timeout`` from being
caught. In addition, a block within initial pool connect has also been
identified and hardened with a ``BaseException`` -> "clean failed connect"
block to accommodate for the same condition in this location.
Big thanks to Github user @niklaus for their tenacious efforts in
identifying and describing this intricate issue.

Fixes: #8974
Change-Id: I95a0e1f080d0cee6f1a66977432a586fdf87f686
(cherry picked from commit a71917204dcf12a93d957a0fa29c9df97d0411ee)

2 years agoadd color directives
Mike Bayer [Sun, 11 Dec 2022 20:47:25 +0000 (15:47 -0500)] 
add color directives

See https://tox.wiki/en/latest/faq.html#tox-4-known-regressions

Change-Id: I3c7291a660dc167bce3151e02cd123edc4707ca1
(cherry picked from commit 184508afbb7656c4f51d98695bbeeeec9aae9b87)

2 years agoadjust for tox changes to passenv
Mike Bayer [Sun, 11 Dec 2022 16:27:52 +0000 (11:27 -0500)] 
adjust for tox changes to passenv

Fixed issue in tox.ini file where changes in the tox 4.0 series to the
format of "passenv" caused tox to not function correctly, in particular
raising an error as of tox 4.0.6.

Change-Id: I659c8fc523a71deaa02a89103c9e7241cf81d831
References: https://github.com/tox-dev/tox/issues/2676

2 years agoMerge "Specify view columns in HasTableTest" into rel_1_4
mike bayer [Sun, 11 Dec 2022 15:07:00 +0000 (15:07 +0000)] 
Merge "Specify view columns in HasTableTest" into rel_1_4

2 years agoVersion 1.4.46 placeholder
Mike Bayer [Sat, 10 Dec 2022 18:51:43 +0000 (13:51 -0500)] 
Version 1.4.46 placeholder

2 years ago- 1.4.45 rel_1_4_45
Mike Bayer [Sat, 10 Dec 2022 18:47:24 +0000 (13:47 -0500)] 
- 1.4.45

2 years agochangelog edits for 1.4.45
Mike Bayer [Sat, 10 Dec 2022 18:46:43 +0000 (13:46 -0500)] 
changelog edits for 1.4.45

Change-Id: Ic54a46c5091eda1480ce80989075527c6b3a6d7e

2 years agoSpecify view columns in HasTableTest
Gord Thompson [Fri, 9 Dec 2022 16:55:34 +0000 (09:55 -0700)] 
Specify view columns in HasTableTest

Fixes: #8960
Avoid test errors on databases that do not
support CREATE VIEW vv AS SELECT * FROM

Change-Id: Ic9e892aa4466030b9b325c11228dad15cf59a258
(cherry picked from commit 7e9b1450b6899c82c9362cbc92fcc0f01c97b043)

2 years agoMerge "look out for extras=None in freeze" into rel_1_4
mike bayer [Fri, 9 Dec 2022 22:06:08 +0000 (22:06 +0000)] 
Merge "look out for extras=None in freeze" into rel_1_4

2 years agolook out for extras=None in freeze
Mike Bayer [Fri, 9 Dec 2022 20:56:15 +0000 (15:56 -0500)] 
look out for extras=None in freeze

Fixed issue where :meth:`_engine.Result.freeze` method would not work for
textual SQL using either :func:`_sql.text` or
:meth:`_engine.Connection.exec_driver_sql`.

Fixes: #8963
Change-Id: Ia131c6ac41a4adf32eb1bf1abf23930ef395f16c
(cherry picked from commit 44170aee47a021883c6244f702de2e4385a5cd1d)

2 years agoBetter syncronize async result docs with plain ones.
Federico Caselli [Thu, 8 Dec 2022 18:34:49 +0000 (19:34 +0100)] 
Better syncronize async result docs with plain ones.

Removed non-functional method ``merge`` from :class:`_asyncio.AsyncResult`.
This method was non-functional and non-testes since the first introduction
of asyncio in SQLAlchemy.

Fixes: #7158
Fixes: #8952
Change-Id: Ibc3d17be8a8b7cab9bf2074f0408f74b4c4b161d
(cherry picked from commit ab8a21c613fb6c69b07f053e4622a4426b2e9ef0)

2 years agoOracle COLUMN_VALUE is a column name, not a keyword
Mike Bayer [Wed, 7 Dec 2022 20:54:59 +0000 (15:54 -0500)] 
Oracle COLUMN_VALUE is a column name, not a keyword

Fixed issue in Oracle compiler where the syntax for
:meth:`.FunctionElement.column_valued` was incorrect, rendering the name
``COLUMN_VALUE`` without qualifying the source table correctly.

Fixes: #8945
Change-Id: Ia04bbdc68168e78b67a74bb3834a63f5d5000627
(cherry picked from commit 655be0237367462a01a9c86cdef9e9afab06d6d6)

2 years agorepair memusage tox under python 2
Mike Bayer [Tue, 6 Dec 2022 02:04:21 +0000 (21:04 -0500)] 
repair memusage tox under python 2

memusage was inadvertently blocked under py2k.  also
add path to test files as old pytest 4 versions are extremely slow
collecting tests on py2.

Change-Id: Ida74b6ef7f3c29d03201e27876cce56c517f3b05

2 years agochangelog updates
Mike Bayer [Mon, 5 Dec 2022 22:16:32 +0000 (17:16 -0500)] 
changelog updates

prep for 2.0.0b4

Change-Id: I2bf7249f6ed0c120b9d04d81eaecdf8593729c83
(cherry picked from commit 42876aabb5f893e1922676eb809e6b37c0519ed8)

2 years agoadjustments for unreliable gc
Mike Bayer [Mon, 5 Dec 2022 04:25:14 +0000 (23:25 -0500)] 
adjustments for unreliable gc

sporadic (and at the moment persistent) test failures
related to aiosqlite seem to have in common that Python
gc stops working fully when we run a lot of tests with
aiosqlite.  The failures are not limited to aiosqlite
as they are more involving places where we assume or
expect gc.collect() to get rid of things, and it doesn't.

Identify (based on reproducible case on the d3 CI runner)
the spots where this happens and add fixes.

test/orm/test_transaction.py test_gced_delete_on_rollback
has always been a very sensitive test with a lot of issues,
so here we move it to the test_memusage suite and limit
it only to when the memusage suite is running.

Change-Id: I683412d0effe8732c45980b40722e5bb63431177
(cherry picked from commit ca46caede4b8d846f3cd48e642922ae821d0be2b)

2 years agoMerge "Fixed an invalid syntax in an except statement" into rel_1_4
mike bayer [Mon, 5 Dec 2022 13:54:57 +0000 (13:54 +0000)] 
Merge "Fixed an invalid syntax in an except statement" into rel_1_4

2 years agodoc change - Add new external dialect for openGauss
j00356287 [Mon, 5 Dec 2022 13:44:09 +0000 (08:44 -0500)] 
doc change - Add new external dialect for openGauss

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

### Description
<!-- Describe your changes in detail -->
Added new external dialect for [openGauss](https://www.opengauss.org/en/).

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

Change-Id: Ia8ca38f98f346fa3cc910ceb7af47f8c903eb587
(cherry picked from commit db6145287244ca9801f7b7e1acc90cd25a572cde)

2 years agoFixed an invalid syntax in an except statement
wiseaidev [Mon, 5 Dec 2022 13:44:35 +0000 (08:44 -0500)] 
Fixed an invalid syntax in an except statement

### Description

As the title suggests, I have fixed an invalid syntax in the docs for an `except` statement while reading the unusual.

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

Change-Id: If8512bf1853f7cdb1ae655f0945cd922fff6fbce
(cherry picked from commit 38636bfd22f236343daf11aef31145ae54867028)

2 years agoReturned "GitHub Actions" support for py27 and py36 environments. (#8924)
Jonathan Vanasco [Sat, 3 Dec 2022 16:20:51 +0000 (11:20 -0500)] 
Returned "GitHub Actions" support for py27 and py36 environments. (#8924)

GitHub recently upgraded the `ubuntu-latest` operating system label to
point to `ubuntu-22.04` instead of `ubuntu-22.04`.  The `ubuntu-22.04` build
does not support Python 2.7 or 3.6.

In order to return support for CI Testing and release builds, the affected jobs
now utilize `include` and `exclude` commands in run matrixes to enable and
disable jobs under certain environments.

Jobs that requres Py27 and Py36 now run under an explicitly identified
`ubuntu-20.04` operating system. The majority of jobs require Py37 or higher,
which are all currently supported in the new `ubuntu-latest` operating system (
which points to `ubuntu-22.04`).

Although `ubuntu-20.04` should continue to receive support for several more
years, the `ubuntu-22.04` platform is likely to benefit from patch releases on
a faster schedule â€“ so it is preferable to continue running all compatible
tests on `ubuntu-latest` rather than pinning everything to the earlier os
version.

Several jobs were also standardized to use the job "name" as a prefix, a
convention that most jobs in the workflows already adapted. This practice
greatly simplifies correlating failed tests to specific jobs.

See::

* https://github.blog/changelog/2022-11-09-github-actions-ubuntu-latest-workflows-will-use-ubuntu-22-04/
* https://github.blog/changelog/2022-12-01-github-actions-larger-runners-using-ubuntu-latest-label-will-now-use-ubuntu-22-04/

Change-Id: I0014029c7c6ee74824c8d971bd21ee9199bc8381

2 years agoadd spaces, leading underscore to oracle checks
Mike Bayer [Fri, 2 Dec 2022 22:00:10 +0000 (17:00 -0500)] 
add spaces, leading underscore to oracle checks

Expand the test suite from #8708 which unfortunately did
not exercise the bound parameter codepaths completely.

Continued fixes for Oracle fix :ticket:`8708` released in 1.4.43 where
bound parameter names that start with underscores, which are disallowed by
Oracle, were still not being properly escaped in all circumstances.

Fixes: #8708
Change-Id: Ic389c09bd7c53b773e5de35f1a18ef20769b92a7
(cherry picked from commit 2886412438de072b4925818ac746e56a2067bee3)

2 years agoRevert "Returned Github Actions support for py27 and py36."
Mike Bayer [Fri, 2 Dec 2022 19:06:45 +0000 (14:06 -0500)] 
Revert "Returned Github Actions support for py27 and py36."

This reverts commit 3f1e6303f0f53cd6239b2a6227c8cd55789a175f.

2 years agoReturned Github Actions support for py27 and py36.
jonathan vanasco [Fri, 2 Dec 2022 17:37:30 +0000 (12:37 -0500)] 
Returned Github Actions support for py27 and py36.
GitHub recently upgraded the `ubuntu-latest` label from `ubuntu-20.04` to `ubuntu-22.04`.
The `ubuntu-22.04` image removed support for py27 and py36.

To return support, the affected jobs have been duplicated to `-legacy` versions.
The -legacy versions of jobs run py27 and py36 on a pinned `ubuntu-20.04` os.
The existing jobs continue to run py37+ on ubuntu-latest, as that platform may continue to benefit from patch releases on the python versions.

Change-Id: I0f063723cb993fab89bc64c89df6dfcaf4dbe5a5

2 years agoMerge "Fix positional compiling bugs" into rel_1_4
mike bayer [Fri, 2 Dec 2022 14:32:30 +0000 (14:32 +0000)] 
Merge "Fix positional compiling bugs" into rel_1_4

2 years agoFix positional compiling bugs
Federico Caselli [Sat, 19 Nov 2022 19:39:10 +0000 (20:39 +0100)] 
Fix positional compiling bugs

Fixed a series of issues regarding positionally rendered bound parameters,
such as those used for SQLite, asyncpg, MySQL and others. Some compiled
forms would not maintain the order of parameters correctly, such as the
PostgreSQL ``regexp_replace()`` function as well as within the "nesting"
feature of the :class:`.CTE` construct first introduced in :ticket:`4123`.

Fixes: #8827
Change-Id: I9813ed7c358cc5c1e26725c48df546b209a442cb
(cherry picked from commit 0f2baae6bf72353f785bad394684f2d6fa53e0ef)

2 years ago[sqlite] Reflect DEFERRABLE and INITIALLY options for foreign keys
Michael Gorven [Tue, 29 Nov 2022 23:36:19 +0000 (18:36 -0500)] 
[sqlite] Reflect DEFERRABLE and INITIALLY options for foreign keys

Added support for the SQLite backend to reflect the "DEFERRABLE" and
"INITIALLY" keywords which may be present on a foreign key construct. Pull
request courtesy Michael Gorven.

Fixes: #8903
Closes: #8904
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/8904
Pull-request-sha: 52aa4cf77482c4051899e21bea75b9830e4c3efa

Change-Id: I713906db1a458d8f1be39625841ca3bbc03ec835
(cherry picked from commit 07760011b5176be03c7811e9a45933b473b8b80b)

2 years agoAdd PyAthena Dialect (#8898)
Jason Myers [Tue, 29 Nov 2022 18:12:12 +0000 (12:12 -0600)] 
Add PyAthena Dialect (#8898)

* Add PyAthena Dialect

* Changing order

(cherry picked from commit 07d40578b1bb77456b7a7af425a905b146fdaef1)

2 years agoadd partial index predicate to SQLiteDialect.get_indexes() result
Tobias Pfeiffer [Mon, 28 Nov 2022 12:52:31 +0000 (07:52 -0500)] 
add partial index predicate to SQLiteDialect.get_indexes() result

Added support for reflection of expression-oriented WHERE criteria included
in indexes on the SQLite dialect, in a manner similar to that of the
PostgreSQL dialect. Pull request courtesy Tobias Pfeiffer.

Fixes: #8804
Closes: #8806
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/8806
Pull-request-sha: 539dfcb372360911b69aed2a804698bb1a2220b1

Change-Id: I0e34d47dbe2b9c1da6fce531363084843e5127a3
(cherry picked from commit ed39e846cd8ae2714c47fc3d563582f72483df0c)

2 years agoMerge "improve column targeting issues with query_expression" into rel_1_4
mike bayer [Sun, 27 Nov 2022 16:36:47 +0000 (16:36 +0000)] 
Merge "improve column targeting issues with query_expression" into rel_1_4

2 years agoAdd recommendation for URL.create() re: escaping
Gord Thompson [Thu, 24 Nov 2022 17:38:20 +0000 (10:38 -0700)] 
Add recommendation for URL.create() re: escaping

Let users know that URL.create() can build the
whole connection URL instead of making them
escape things like passwords ad-hoc.

includes some general cleanup of URL docstring
by mike

Change-Id: Ic71bb0201fecf30e1db11e006c269f2d041b5439
(cherry picked from commit 14c73685ba909838fb90d762d465e7ae8d067c15)

2 years agoadd new variation helper
Mike Bayer [Sat, 26 Nov 2022 16:03:45 +0000 (11:03 -0500)] 
add new variation helper

I'm using a lot of @testing.combinations with either
a boolean True/False, or a series of string names, each indicating
some case to switch on.  I want a descriptive name in the test
run (not True/False) and I don't want to compare strings.

So make a new helper around @combinations that provides an
object interface that has booleans inside of it, prints nicely
in the test output, raises an error if you name the case
incorrectly.

Before:

test/orm/declarative/test_typed_mapping.py::MappedColumnTest::test_separate_name[False-False-both] PASSED
test/orm/declarative/test_typed_mapping.py::MappedColumnTest::test_separate_name[False-False-key] PASSED
test/orm/declarative/test_typed_mapping.py::MappedColumnTest::test_separate_name[False-False-name] PASSED
test/orm/declarative/test_typed_mapping.py::MappedColumnTest::test_separate_name[False-True-both] PASSED
test/orm/declarative/test_typed_mapping.py::MappedColumnTest::test_separate_name[False-True-key] PASSED
test/orm/declarative/test_typed_mapping.py::MappedColumnTest::test_separate_name[False-True-name] PASSED
test/orm/declarative/test_typed_mapping.py::MappedColumnTest::test_separate_name[True-False-both] PASSED
test/orm/declarative/test_typed_mapping.py::MappedColumnTest::test_separate_name[True-False-key] PASSED
test/orm/declarative/test_typed_mapping.py::MappedColumnTest::test_separate_name[True-False-name] PASSED
test/orm/declarative/test_typed_mapping.py::MappedColumnTest::test_separate_name[True-True-both] PASSED
test/orm/declarative/test_typed_mapping.py::MappedColumnTest::test_separate_name[True-True-key] PASSED
test/orm/declarative/test_typed_mapping.py::MappedColumnTest::test_separate_name[True-True-name] PASSED

After:

test/orm/declarative/test_typed_mapping.py::MappedColumnTest::test_separate_name[not_use_add_property-deferred-both] PASSED
test/orm/declarative/test_typed_mapping.py::MappedColumnTest::test_separate_name[not_use_add_property-deferred-key] PASSED
test/orm/declarative/test_typed_mapping.py::MappedColumnTest::test_separate_name[not_use_add_property-deferred-name] PASSED
test/orm/declarative/test_typed_mapping.py::MappedColumnTest::test_separate_name[not_use_add_property-not_deferred-both] PASSED
test/orm/declarative/test_typed_mapping.py::MappedColumnTest::test_separate_name[not_use_add_property-not_deferred-key] PASSED
test/orm/declarative/test_typed_mapping.py::MappedColumnTest::test_separate_name[not_use_add_property-not_deferred-name] PASSED
test/orm/declarative/test_typed_mapping.py::MappedColumnTest::test_separate_name[use_add_property-deferred-both] PASSED
test/orm/declarative/test_typed_mapping.py::MappedColumnTest::test_separate_name[use_add_property-deferred-key] PASSED
test/orm/declarative/test_typed_mapping.py::MappedColumnTest::test_separate_name[use_add_property-deferred-name] PASSED
test/orm/declarative/test_typed_mapping.py::MappedColumnTest::test_separate_name[use_add_property-not_deferred-both] PASSED
test/orm/declarative/test_typed_mapping.py::MappedColumnTest::test_separate_name[use_add_property-not_deferred-key] PASSED
test/orm/declarative/test_typed_mapping.py::MappedColumnTest::test_separate_name[use_add_property-not_deferred-name] PASSED

Change-Id: Idde87632581ee69e0f47360966758583dfd8baab
(cherry picked from commit 3ffa8dccc224d7b7d604bdfb684c437f4cb42f92)

2 years agoimprove column targeting issues with query_expression
Mike Bayer [Fri, 25 Nov 2022 21:49:28 +0000 (16:49 -0500)] 
improve column targeting issues with query_expression

Fixed issues in :func:`_orm.with_expression` where expressions that were
composed of columns within a subquery being SELECTed from, or when using
``.from_statement()``, would not render correct SQL **if** the expression
had a label name that matched the attribute which used
:func:`_orm.query_expression`, even when :func:`_orm.query_expression` had
no default expression. For the moment, if the :func:`_orm.query_expression`
**does** have a default expression, that label name is still used for that
default, and an additional label with the same name will be ignored.
Overall, this case is pretty thorny so further adjustments might be
warranted.

Fixes: #8881
Change-Id: Ie939b1470cb2e824717384be65f4cd8edd619942
(cherry picked from commit 474326e87038f997fb9423c56379b8ba19a5e43b)

2 years agosort for addresess relationship in new merge test
Mike Bayer [Sat, 26 Nov 2022 15:14:02 +0000 (10:14 -0500)] 
sort for addresess relationship in new merge test

saw a random failure under py2 on 1.4, will backport

Change-Id: I3e2b037bf4211be44e28f85f5e51ffdc218eeb5a
(cherry picked from commit 34e29f7b225cf1305e151af9d03ef95f42a9dbcc)

2 years agoMerge "avoid putting annotated columns in sets" into rel_1_4
mike bayer [Sat, 26 Nov 2022 02:35:11 +0000 (02:35 +0000)] 
Merge "avoid putting annotated columns in sets" into rel_1_4

2 years agoMerge "assert unique constraints received back" into rel_1_4
mike bayer [Sat, 26 Nov 2022 02:32:30 +0000 (02:32 +0000)] 
Merge "assert unique constraints received back" into rel_1_4

2 years agoMerge "add "merge" to viewonly cascades; propagate NO_RAISE when merging" into rel_1_4
mike bayer [Fri, 25 Nov 2022 16:41:51 +0000 (16:41 +0000)] 
Merge "add "merge" to viewonly cascades; propagate NO_RAISE when merging" into rel_1_4

2 years agoassert unique constraints received back
Mike Bayer [Thu, 24 Nov 2022 14:52:12 +0000 (09:52 -0500)] 
assert unique constraints received back

in #8867 we can see our existing uq reflection test is
broken, not detecting a failure to detect constraints

Change-Id: Icada02bc0547c5a3d8c471b80a78a2e72f02647d
(cherry picked from commit f99300c4e8d1317a94cbfeaec6fe22de8f1159f7)

2 years agoFix reflection of constraints in attached schemas
Michael Gorven [Thu, 24 Nov 2022 08:47:26 +0000 (03:47 -0500)] 
Fix reflection of constraints in attached schemas

Backported a fix for SQLite reflection of unique constraints in attached
schemas, released in 2.0 as a small part of :ticket:`4379`. Previously,
unique constraints in attached schemas would be ignored by SQLite
reflection. Pull request courtesy Michael Gorven.

Fixes: #8866
Closes: #8867
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/8867
Pull-request-sha: 94a5736170f5c944d3dad1ef91dc8550c72a4dc5

Change-Id: Id414aeed9d6ce58877d81df2459f6d4f308750a8

2 years agoadd "merge" to viewonly cascades; propagate NO_RAISE when merging
Mike Bayer [Wed, 23 Nov 2022 15:58:28 +0000 (10:58 -0500)] 
add "merge" to viewonly cascades; propagate NO_RAISE when merging

Fixed bug where :meth:`_orm.Session.merge` would fail to preserve the
current loaded contents of relationship attributes that were indicated with
the :paramref:`_orm.relationship.viewonly` parameter, thus defeating
strategies that use :meth:`_orm.Session.merge` to pull fully loaded objects
from caches and other similar techniques. In a related change, fixed issue
where an object that contains a loaded relationship that was nonetheless
configured as ``lazy='raise'`` on the mapping would fail when passed to
:meth:`_orm.Session.merge`; checks for "raise" are now suspended within
the merge process assuming the :paramref:`_orm.Session.merge.load`
parameter remains at its default of ``True``.

Overall, this is a behavioral adjustment to a change introduced in the 1.4
series as of :ticket:`4994`, which took "merge" out of the set of cascades
applied by default to "viewonly" relationships. As "viewonly" relationships
aren't persisted under any circumstances, allowing their contents to
transfer during "merge" does not impact the persistence behavior of the
target object. This allows :meth:`_orm.Session.merge` to correctly suit one
of its use cases, that of adding objects to a :class:`.Session` that were
loaded elsewhere, often for the purposes of restoring from a cache.

Fixes: #8862
Change-Id: I8731c7810460e6a71f8bf5e8ded59142b9b02956
(cherry picked from commit 1e009bf086a42134190030f07068bc463e9a9794)

2 years agoflake8 has very courteously referred us to another pyqca project and closed all comme...
Mike Bayer [Wed, 23 Nov 2022 22:44:30 +0000 (17:44 -0500)] 
flake8 has very courteously referred us to another pyqca project and closed all comments, thank you!  I'll get on that right away

pyqca/flake8-import-order does not seem to have a release or a commit
in the past two years, so while I have created an issue and PR [1] [2],
for now vendor our fork so we can get on with things.

Also fix one issue for flake8 6.0

[1] https://github.com/PyCQA/flake8-import-order/issues/189
[2] https://github.com/PyCQA/flake8-import-order/pull/190

Change-Id: I53045f65b8716cceaf2104fccc1d26f80b398fef
References: https://github.com/PyCQA/flake8/issues/1751
(cherry picked from commit fbec926c4744aa97a48a011939354c8b8f8be566)

2 years agoAdd security warning to serializer extension
Federico Caselli [Mon, 21 Nov 2022 23:07:53 +0000 (00:07 +0100)] 
Add security warning to serializer extension

Change-Id: I5c7c076bc93fc250c05f7996e83359d19d1f3214
(cherry picked from commit 447249e8628ff849758c1a9cdf822ae060b7cb8b)

2 years agoclarify role of `__allow_unmapped__`
Mike Bayer [Sat, 19 Nov 2022 18:10:31 +0000 (13:10 -0500)] 
clarify role of `__allow_unmapped__`

A different note will be needed in the 1.4 version
of these docs.

Fixes: #8845
Change-Id: I48651c64d511684077c80a317349dd230424b575
(cherry picked from commit 46e6693cb3db445f18aa25d5e4ca613504bd12b3)

2 years agoaccommodate NULL format_type()
Mike Bayer [Thu, 17 Nov 2022 01:11:18 +0000 (20:11 -0500)] 
accommodate NULL format_type()

Made an adjustment to how the PostgreSQL dialect considers column types
when it reflects columns from a table, to accommodate for alternative
backends which may return NULL from the PG ``format_type()`` function.

Fixes: #8748
Change-Id: I6178287aac567210a76afaa5805b825daa7fa4db
(cherry picked from commit 200e70b9745f1f344be4a35bb8f2b5f01b40d467)

2 years agoSmall tutorial rewording
Andy Garfield [Tue, 15 Nov 2022 16:28:58 +0000 (11:28 -0500)] 
Small tutorial rewording

The language is this sentence took me a few reads to understand. This is just a rewording.

(cherry picked from commit 36954a3dbb3a528d81c24db6b8698ba1e48d7cb2)

Change-Id: I3d61653b682035bd616f80ed54c83e959cfb74fc

2 years agoExplicitly state what happens if `order_by` is called more than once. (#8791)
Eitan Mosenkis [Mon, 14 Nov 2022 21:11:15 +0000 (23:11 +0200)] 
Explicitly state what happens if `order_by` is called more than once. (#8791)

* Explicitly state what happens if `order_by` is called more than once.

The existing docs cover how to clear existing `order_by` clauses but don't actually describe the behavior of calling `order_by` multiple times with different clauses.

* Also update Select.order_by.

(cherry picked from commit 9237bf15e612ba82555444751bd69dc2a831e7f4)

2 years agoadd informative exception context for literal render
Mike Bayer [Mon, 14 Nov 2022 13:54:56 +0000 (08:54 -0500)] 
add informative exception context for literal render

An informative re-raise is now thrown in the case where any "literal
bindparam" render operation fails, indicating the value itself and
the datatype in use, to assist in debugging when literal params
are being rendered in a statement.

Fixes: #8800
Change-Id: Id658f8b03359312353ddbb0c7563026239579f7b
(cherry picked from commit c7baf6e0aa624c9378c3bc3c4923d1e188d62dc9)

2 years agoavoid putting annotated columns in sets
Mike Bayer [Mon, 14 Nov 2022 18:18:45 +0000 (13:18 -0500)] 
avoid putting annotated columns in sets

backporting a small bit of the changes made for the
2.0 version of #8796.

See if the changes apply cleanly to the 1.4 branch.

Fixes: #8796
Change-Id: I8118511a10beb38c545a55c962a18a77611293af

2 years agoRepair test in 32bit python builds.
Federico Caselli [Sat, 12 Nov 2022 19:15:26 +0000 (20:15 +0100)] 
Repair test in 32bit python builds.

Change-Id: I8287f3e1a975534c8a01a41c9dcc7e5e9f08bb52
(cherry picked from commit 9f4ac8d155f58b59cf314cfbc73195ed51a0c146)

2 years agoVersion 1.4.45 placeholder
Mike Bayer [Sat, 12 Nov 2022 14:13:37 +0000 (09:13 -0500)] 
Version 1.4.45 placeholder

2 years ago- 1.4.44 rel_1_4_44
Mike Bayer [Sat, 12 Nov 2022 13:59:44 +0000 (08:59 -0500)] 
- 1.4.44

2 years agoMerge "backport relevant mypy 0.990 fixes from main" into rel_1_4
mike bayer [Sat, 12 Nov 2022 02:12:08 +0000 (02:12 +0000)] 
Merge "backport relevant mypy 0.990 fixes from main" into rel_1_4

2 years agoMerge "ensure anon_map is passed for most annotated traversals" into rel_1_4
mike bayer [Fri, 11 Nov 2022 21:30:51 +0000 (21:30 +0000)] 
Merge "ensure anon_map is passed for most annotated traversals" into rel_1_4

2 years agobackport relevant mypy 0.990 fixes from main
Mike Bayer [Fri, 11 Nov 2022 21:04:06 +0000 (16:04 -0500)] 
backport relevant mypy 0.990 fixes from main

Changes from ebb54e80a5a52d0cce4cba1abc21c707a42c2c73
which are relevant here.

Adjusted the test suite which tests the Mypy plugin to accommodate for
changes in Mypy 0.990 regarding how it handles message output, which affect
how sys.path is interpreted when determining if notes and errors should be
printed for particular files. The change broke the test suite as the files
within the test directory itself no longer produced messaging when run
under the mypy API.

Change-Id: I1728fd3bd21a4d499db0a4939ee27c67b2c34123

2 years agoMerge "establish consistency for RETURNING column labels" into rel_1_4
mike bayer [Fri, 11 Nov 2022 21:00:31 +0000 (21:00 +0000)] 
Merge "establish consistency for RETURNING column labels" into rel_1_4

2 years agoensure anon_map is passed for most annotated traversals
Mike Bayer [Thu, 10 Nov 2022 22:01:58 +0000 (17:01 -0500)] 
ensure anon_map is passed for most annotated traversals

We can cache the annotated cache key for Table, but
for selectables it's not safe, as it fails to pass the
anon_map along and creates many redudant structures in
observed test scenario.  It is likely safe for a
Column that's mapped to a Table also, however this is
not implemented here.   Will have to see if that part
needs adjusting.

Fixed critical memory issue identified in cache key generation, where for
very large and complex ORM statements that make use of lots of ORM aliases
with subqueries, cache key generation could produce excessively large keys
that were orders of magnitude bigger than the statement itself. Much thanks
to Rollo Konig Brock for their very patient, long term help in finally
identifying this issue.

Also within TypeEngine objects, when we generate elements
for instance variables, skip the None elements at least.
this also saves on tuple complexity.

Fixes: #8790
Change-Id: I448ddbfb45ae0a648815be8dad4faad7d1977427
(cherry picked from commit 88c240d907a9ae3b5caf766009edd196a30cece3)

2 years agoestablish consistency for RETURNING column labels
Mike Bayer [Mon, 7 Nov 2022 23:40:03 +0000 (18:40 -0500)] 
establish consistency for RETURNING column labels

For the PostgreSQL and SQL Server dialects only, adjusted the compiler so
that when rendering column expressions in the RETURNING clause, the "non
anon" label that's used in SELECT statements is suggested for SQL
expression elements that generate a label; the primary example is a SQL
function that may be emitting as part of the column's type, where the label
name should match the column's name by default. This restores a not-well
defined behavior that had changed in version 1.4.21 due to :ticket:`6718`,
:ticket:`6710`. The Oracle dialect has a different RETURNING implementation
and was not affected by this issue. Version 2.0 features an across the
board change for its widely expanded support of RETURNING on other
backends.

Fixed issue in the Oracle dialect where an INSERT statement that used
``insert(some_table).values(...).returning(some_table)`` against a full
:class:`.Table` object at once would fail to execute, raising an exception.

Fixes: #8770
Change-Id: I2ab078a214a778ffe1720dbd864ae4c105a0691d
(cherry picked from commit c8a7b67181d31634355150fc0379ec0e780ff728)

2 years agorepair --disable-asyncio parameter
Mike Bayer [Fri, 11 Nov 2022 14:46:06 +0000 (09:46 -0500)] 
repair --disable-asyncio parameter

Fixed issue where the ``--disable-asyncio`` parameter to the test suite
would fail to not actually run greenlet tests and would also not prevent
the suite from using a "wrapping" greenlet for the whole suite. This
parameter now ensures that no greenlet or asyncio use will occur within the
entire run when set.

Fixes: #8793
Change-Id: I87b510846b2cc24413cd54e7b7136e91aad3c309
(cherry picked from commit 7f7e961f46aeff5895bd34fec9e2e208862d7a6b)

2 years agoblock all maridb-connector testing
Mike Bayer [Fri, 11 Nov 2022 16:21:55 +0000 (11:21 -0500)] 
block all maridb-connector testing

while we wait for this project to fix its install,
ensure CI isn't running it.

Change-Id: Iffc2efa38078a07c6ffc3417246b5b898ecbd53d

2 years agodisable timing intensive on py27
Mike Bayer [Sat, 5 Nov 2022 20:07:49 +0000 (16:07 -0400)] 
disable timing intensive on py27

this includes disabling a very not important test for
automap that's failing on github

Change-Id: Ib91be649ecb07e620060a38a206317dcd6a81899

2 years agogc.collect() in order to ensure GeneratorExit raised on pypy
Mike Bayer [Sat, 5 Nov 2022 14:26:36 +0000 (10:26 -0400)] 
gc.collect() in order to ensure GeneratorExit raised on pypy

Fixes: #8762
Change-Id: Ibf656748ae6a54282ba58e91215e0f7a279b171a
(cherry picked from commit 9febc1a53e4dbb363b1ead65bbe47e0c4f948bae)

2 years agoVersion 1.4.44 placeholder
Mike Bayer [Fri, 4 Nov 2022 21:08:40 +0000 (17:08 -0400)] 
Version 1.4.44 placeholder

2 years ago- 1.4.43 rel_1_4_43
Mike Bayer [Fri, 4 Nov 2022 21:04:01 +0000 (17:04 -0400)] 
- 1.4.43

2 years agotypo
Mike Bayer [Fri, 4 Nov 2022 21:00:29 +0000 (17:00 -0400)] 
typo

Change-Id: I41cb128767c0cba48255cca0904ae1bff1b357ac
(cherry picked from commit 6410e372cb344084ee13942bd5b9eb78b24fc50c)

2 years agofix doc symbols
Mike Bayer [Fri, 4 Nov 2022 20:44:29 +0000 (16:44 -0400)] 
fix doc symbols

for 1.4, these are ambiguous due to the presence of
future names

Change-Id: I3694e75da73fe20c19445007c8823030789fc6c0

2 years agochangelog updates
Mike Bayer [Fri, 4 Nov 2022 20:16:48 +0000 (16:16 -0400)] 
changelog updates

as this release cycle was fairly frenetic, a lot of these
changelogs were very poorly worded (by me).

Change-Id: Idb796cf3e25975fb2f75bacf26f1cb57ef0e4cad
(cherry picked from commit 751469240a1f2908d16ca2b087b5dac55dbdcb47)

2 years agoresolve synonyms in dictionary form of Session.get()
Mike Bayer [Fri, 4 Nov 2022 16:48:43 +0000 (12:48 -0400)] 
resolve synonyms in dictionary form of Session.get()

Improved "dictionary mode" for :meth:`_orm.Session.get` so that synonym
names which refer to primary key attribute names may be indicated in the
named dictionary.

Fixes: #8753
Change-Id: I56112564a5c23b51b26e01c64087cbf4399cd951
(cherry picked from commit 7b6259c0f3ae411976f8febfe41f2c5fc3490b13)