From: Mike Bayer Date: Tue, 26 Apr 2022 21:12:08 +0000 (-0400) Subject: cherry-pick changelog from 1.4.36 X-Git-Tag: rel_2_0_0b1~332 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=387a1432c80a969ea88d54dfc01b5372823c6a4f;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git cherry-pick changelog from 1.4.36 --- diff --git a/doc/build/changelog/changelog_14.rst b/doc/build/changelog/changelog_14.rst index 9caac1afcb..6635f20780 100644 --- a/doc/build/changelog/changelog_14.rst +++ b/doc/build/changelog/changelog_14.rst @@ -15,7 +15,139 @@ This document details individual issue-level changes made throughout .. changelog:: :version: 1.4.36 - :include_notes_from: unreleased_14 + :released: April 26, 2022 + + .. change:: + :tags: bug, mysql, regression + :tickets: 7871 + + Fixed a regression in the untested MySQL PyODBC dialect caused by the fix + for :ticket:`7518` in version 1.4.32 where an argument was being propagated + incorrectly upon first connect, leading to a ``TypeError``. + + .. change:: + :tags: bug, orm, regression + :tickets: 7936 + + Fixed regression where the change made for :ticket:`7861`, released in + version 1.4.33, that brought the :class:`.Insert` construct to be partially + recognized as an ORM-enabled statement did not properly transfer the + correct mapper / mapped table state to the :class:`.Session`, causing the + :meth:`.Session.get_bind` method to fail for a :class:`.Session` that was + bound to engines and/or connections using the :paramref:`.Session.binds` + parameter. + + .. change:: + :tags: bug, engine + :tickets: 7875 + + Fixed a memory leak in the C extensions which could occur when calling upon + named members of :class:`.Row` when the member does not exist under Python + 3; in particular this could occur during NumPy transformations when it + attempts to call members such as ``.__array__``, but the issue was + surrounding any ``AttributeError`` thrown by the :class:`.Row` object. This + issue does not apply to version 2.0 which has already transitioned to + Cython. Thanks much to Sebastian Berg for identifying the problem. + + + .. change:: + :tags: bug, postgresql + :tickets: 6515 + + Fixed bug in :class:`.ARRAY` datatype in combination with :class:`.Enum` on + PostgreSQL where using the ``.any()`` or ``.all()`` methods to render SQL + ANY() or ALL(), given members of the Python enumeration as arguments, would + produce a type adaptation failure on all drivers. + + .. change:: + :tags: bug, postgresql + :tickets: 7943 + + Implemented :attr:`_postgresql.UUID.python_type` attribute for the + PostgreSQL :class:`_postgresql.UUID` type object. The attribute will return + either ``str`` or ``uuid.UUID`` based on the + :paramref:`_postgresql.UUID.as_uuid` parameter setting. Previously, this + attribute was unimplemented. Pull request courtesy Alex Grönholm. + + .. change:: + :tags: bug, tests + :tickets: 7919 + + For third party dialects, repaired a missing requirement for the + ``SimpleUpdateDeleteTest`` suite test which was not checking for a working + "rowcount" function on the target dialect. + + + .. change:: + :tags: bug, postgresql + :tickets: 7930 + + Fixed an issue in the psycopg2 dialect when using the + :paramref:`.create_engine.pool_pre_ping` parameter which would cause + user-configured ``AUTOCOMMIT`` isolation level to be inadvertently reset by + the "ping" handler. + + .. change:: + :tags: bug, asyncio + :tickets: 7937 + + Repaired handling of ``contextvar.ContextVar`` objects inside of async + adapted event handlers. Previously, values applied to a ``ContextVar`` + would not be propagated in the specific case of calling upon awaitables + inside of non-awaitable code. + + + .. change:: + :tags: bug, engine + :tickets: 7953 + + Added a warning regarding a bug which exists in the :meth:`.Result.columns` + method when passing 0 for the index in conjunction with a :class:`.Result` + that will return a single ORM entity, which indicates that the current + behavior of :meth:`.Result.columns` is broken in this case as the + :class:`.Result` object will yield scalar values and not :class:`.Row` + objects. The issue will be fixed in 2.0, which would be a + backwards-incompatible change for code that relies on the current broken + behavior. Code which wants to receive a collection of scalar values should + use the :meth:`.Result.scalars` method, which will return a new + :class:`.ScalarResult` object that yields non-row scalar objects. + + + .. change:: + :tags: bug, schema + :tickets: 7958 + + Fixed bug where :class:`.ForeignKeyConstraint` naming conventions using the + ``referred_column_0`` naming convention key would not work if the foreign + key constraint were set up as a :class:`.ForeignKey` object rather than an + explicit :class:`.ForeignKeyConstraint` object. As this change makes use of + a backport of some fixes from version 2.0, an additional little-known + feature that has likely been broken for many years is also fixed which is + that a :class:`.ForeignKey` object may refer to a referred table by name of + the table alone without using a column name, if the name of the referent + column is the same as that of the referred column. + + The ``referred_column_0`` naming convention key was previously not tested + with the :class:`.ForeignKey` object, only :class:`.ForeignKeyConstraint`, + and this bug reveals that the feature has never worked correctly unless + :class:`.ForeignKeyConstraint` is used for all FK constraints. This bug + traces back to the original introduction of the feature introduced for + :ticket:`3989`. + + .. change:: + :tags: bug, orm, declarative + :tickets: 7900 + + Modified the :class:`.DeclarativeMeta` metaclass to pass ``cls.__dict__`` + into the declarative scanning process to look for attributes, rather than + the separate dictionary passed to the type's ``__init__()`` method. This + allows user-defined base classes that add attributes within an + ``__init_subclass__()`` to work as expected, as ``__init_subclass__()`` can + only affect the ``cls.__dict__`` itself and not the other dictionary. This + is technically a regression from 1.3 where ``__dict__`` was being used. + + + .. changelog:: :version: 1.4.35 diff --git a/doc/build/changelog/unreleased_14/6515.rst b/doc/build/changelog/unreleased_14/6515.rst deleted file mode 100644 index 7db6a67c7a..0000000000 --- a/doc/build/changelog/unreleased_14/6515.rst +++ /dev/null @@ -1,8 +0,0 @@ -.. change:: - :tags: bug, postgresql - :tickets: 6515 - - Fixed bug in :class:`.ARRAY` datatype in combination with :class:`.Enum` on - PostgreSQL where using the ``.any()`` or ``.all()`` methods to render SQL - ANY() or ALL(), given members of the Python enumeration as arguments, would - produce a type adaptation failure on all drivers. diff --git a/doc/build/changelog/unreleased_14/7871.rst b/doc/build/changelog/unreleased_14/7871.rst deleted file mode 100644 index e2b8e9769f..0000000000 --- a/doc/build/changelog/unreleased_14/7871.rst +++ /dev/null @@ -1,7 +0,0 @@ -.. change:: - :tags: bug, mysql, regression - :tickets: 7871 - - Fixed a regression in the untested MySQL PyODBC dialect caused by the fix - for :ticket:`7518` in version 1.4.32 where an argument was being propagated - incorrectly upon first connect, leading to a ``TypeError``. diff --git a/doc/build/changelog/unreleased_14/7875.rst b/doc/build/changelog/unreleased_14/7875.rst deleted file mode 100644 index 3e14f5c7fa..0000000000 --- a/doc/build/changelog/unreleased_14/7875.rst +++ /dev/null @@ -1,12 +0,0 @@ -.. change:: - :tags: bug, engine - :tickets: 7875 - - Fixed a memory leak in the C extensions which could occur when calling upon - named members of :class:`.Row` when the member does not exist under Python - 3; in particular this could occur during NumPy transformations when it - attempts to call members such as ``.__array__``, but the issue was - surrounding any ``AttributeError`` thrown by the :class:`.Row` object. This - issue does not apply to version 2.0 which has already transitioned to - Cython. Thanks much to Sebastian Berg for identifying the problem. - diff --git a/doc/build/changelog/unreleased_14/7900.rst b/doc/build/changelog/unreleased_14/7900.rst deleted file mode 100644 index 9d6d507703..0000000000 --- a/doc/build/changelog/unreleased_14/7900.rst +++ /dev/null @@ -1,14 +0,0 @@ -.. change:: - :tags: bug, orm, declarative - :tickets: 7900 - - Modified the :class:`.DeclarativeMeta` metaclass to pass ``cls.__dict__`` - into the declarative scanning process to look for attributes, rather than - the separate dictionary passed to the type's ``__init__()`` method. This - allows user-defined base classes that add attributes within an - ``__init_subclass__()`` to work as expected, as ``__init_subclass__()`` can - only affect the ``cls.__dict__`` itself and not the other dictionary. This - is technically a regression from 1.3 where ``__dict__`` was being used. - - - diff --git a/doc/build/changelog/unreleased_14/7919.rst b/doc/build/changelog/unreleased_14/7919.rst deleted file mode 100644 index fdba724e8a..0000000000 --- a/doc/build/changelog/unreleased_14/7919.rst +++ /dev/null @@ -1,8 +0,0 @@ -.. change:: - :tags: bug, tests - :tickets: 7919 - - For third party dialects, repaired a missing requirement for the - ``SimpleUpdateDeleteTest`` suite test which was not checking for a working - "rowcount" function on the target dialect. - diff --git a/doc/build/changelog/unreleased_14/7930.rst b/doc/build/changelog/unreleased_14/7930.rst deleted file mode 100644 index 56a2ef530f..0000000000 --- a/doc/build/changelog/unreleased_14/7930.rst +++ /dev/null @@ -1,8 +0,0 @@ -.. change:: - :tags: bug, postgresql - :tickets: 7930 - - Fixed an issue in the psycopg2 dialect when using the - :paramref:`.create_engine.pool_pre_ping` parameter which would cause - user-configured ``AUTOCOMMIT`` isolation level to be inadvertently reset by - the "ping" handler. diff --git a/doc/build/changelog/unreleased_14/7936.rst b/doc/build/changelog/unreleased_14/7936.rst deleted file mode 100644 index 48c63328e5..0000000000 --- a/doc/build/changelog/unreleased_14/7936.rst +++ /dev/null @@ -1,11 +0,0 @@ -.. change:: - :tags: bug, orm, regression - :tickets: 7936 - - Fixed regression where the change made for :ticket:`7861`, released in - version 1.4.33, that brought the :class:`.Insert` construct to be partially - recognized as an ORM-enabled statement did not properly transfer the - correct mapper / mapped table state to the :class:`.Session`, causing the - :meth:`.Session.get_bind` method to fail for a :class:`.Session` that was - bound to engines and/or connections using the :paramref:`.Session.binds` - parameter. diff --git a/doc/build/changelog/unreleased_14/7937.rst b/doc/build/changelog/unreleased_14/7937.rst deleted file mode 100644 index 50dd00aa85..0000000000 --- a/doc/build/changelog/unreleased_14/7937.rst +++ /dev/null @@ -1,9 +0,0 @@ -.. change:: - :tags: bug, asyncio - :tickets: 7937 - - Repaired handling of ``contextvar.ContextVar`` objects inside of async - adapted event handlers. Previously, values applied to a ``ContextVar`` - would not be propagated in the specific case of calling upon awaitables - inside of non-awaitable code. - diff --git a/doc/build/changelog/unreleased_14/7943.rst b/doc/build/changelog/unreleased_14/7943.rst deleted file mode 100644 index 87fef1c21a..0000000000 --- a/doc/build/changelog/unreleased_14/7943.rst +++ /dev/null @@ -1,9 +0,0 @@ -.. change:: - :tags: bug, postgresql - :tickets: 7943 - - Implemented :attr:`_postgresql.UUID.python_type` attribute for the - PostgreSQL :class:`_postgresql.UUID` type object. The attribute will return - either ``str`` or ``uuid.UUID`` based on the - :paramref:`_postgresql.UUID.as_uuid` parameter setting. Previously, this - attribute was unimplemented. Pull request courtesy Alex Grönholm. \ No newline at end of file diff --git a/doc/build/changelog/unreleased_14/7953.rst b/doc/build/changelog/unreleased_14/7953.rst deleted file mode 100644 index 31b57d2f1e..0000000000 --- a/doc/build/changelog/unreleased_14/7953.rst +++ /dev/null @@ -1,15 +0,0 @@ -.. change:: - :tags: bug, engine - :tickets: 7953 - - Added a warning regarding a bug which exists in the :meth:`.Result.columns` - method when passing 0 for the index in conjunction with a :class:`.Result` - that will return a single ORM entity, which indicates that the current - behavior of :meth:`.Result.columns` is broken in this case as the - :class:`.Result` object will yield scalar values and not :class:`.Row` - objects. The issue will be fixed in 2.0, which would be a - backwards-incompatible change for code that relies on the current broken - behavior. Code which wants to receive a collection of scalar values should - use the :meth:`.Result.scalars` method, which will return a new - :class:`.ScalarResult` object that yields non-row scalar objects. - diff --git a/doc/build/changelog/unreleased_14/7958.rst b/doc/build/changelog/unreleased_14/7958.rst deleted file mode 100644 index dc9f96a317..0000000000 --- a/doc/build/changelog/unreleased_14/7958.rst +++ /dev/null @@ -1,20 +0,0 @@ -.. change:: - :tags: bug, schema - :tickets: 7958 - - Fixed bug where :class:`.ForeignKeyConstraint` naming conventions using the - ``referred_column_0`` naming convention key would not work if the foreign - key constraint were set up as a :class:`.ForeignKey` object rather than an - explicit :class:`.ForeignKeyConstraint` object. As this change makes use of - a backport of some fixes from version 2.0, an additional little-known - feature that has likely been broken for many years is also fixed which is - that a :class:`.ForeignKey` object may refer to a referred table by name of - the table alone without using a column name, if the name of the referent - column is the same as that of the referred column. - - The ``referred_column_0`` naming convention key was previously not tested - with the :class:`.ForeignKey` object, only :class:`.ForeignKeyConstraint`, - and this bug reveals that the feature has never worked correctly unless - :class:`.ForeignKeyConstraint` is used for all FK constraints. This bug - traces back to the original introduction of the feature introduced for - :ticket:`3989`.