From: Mike Bayer Date: Sat, 10 Jun 2023 19:42:45 +0000 (-0400) Subject: - 2.0.16 X-Git-Tag: rel_2_0_16 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ffab94fc5f31c7a4a83d6e22a6be6ff43db0cabf;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git - 2.0.16 --- diff --git a/doc/build/changelog/changelog_20.rst b/doc/build/changelog/changelog_20.rst index d64b8ba659..ad7abca18b 100644 --- a/doc/build/changelog/changelog_20.rst +++ b/doc/build/changelog/changelog_20.rst @@ -10,7 +10,152 @@ .. changelog:: :version: 2.0.16 - :include_notes_from: unreleased_20 + :released: June 10, 2023 + + .. change:: + :tags: usecase, postgresql, reflection + :tickets: 9838 + + Cast ``NAME`` columns to ``TEXT`` when using ``ARRAY_AGG`` in PostgreSQL + reflection. This seems to improve compatibility with some PostgreSQL + derivatives that may not support aggregations on the ``NAME`` type. + + .. change:: + :tags: bug, orm + :tickets: 9862 + + Fixed issue where :class:`.DeclarativeBaseNoMeta` declarative base class + would not function with non-mapped mixins or abstract classes, raising an + ``AttributeError`` instead. + + .. change:: + :tags: usecase, orm + :tickets: 9828 + + Improved :meth:`.DeferredReflection.prepare` to accept arbitrary ``**kw`` + arguments that are passed to :meth:`_schema.MetaData.reflect`, allowing use + cases such as reflection of views as well as dialect-specific arguments to + be passed. Additionally, modernized the + :paramref:`.DeferredReflection.prepare.bind` argument so that either an + :class:`.Engine` or :class:`.Connection` are accepted as the "bind" + argument. + + .. change:: + :tags: usecase, asyncio + :tickets: 8215 + + Added new :paramref:`_asyncio.create_async_engine.async_creator` parameter + to :func:`.create_async_engine`, which accomplishes the same purpose as the + :paramref:`.create_engine.creator` parameter of :func:`.create_engine`. + This is a no-argument callable that provides a new asyncio connection, + using the asyncio database driver directly. The + :func:`.create_async_engine` function will wrap the driver-level connection + in the appropriate structures. Pull request curtesy of Jack Wotherspoon. + + .. change:: + :tags: bug, orm, regression + :tickets: 9820 + + Fixed regression in the 2.0 series where the default value of + :paramref:`_orm.validates.include_backrefs` got changed to ``False`` for + the :func:`_orm.validates` function. This default is now restored to + ``True``. + + .. change:: + :tags: bug, orm + :tickets: 9917 + + Fixed bug in new feature which allows a WHERE clause to be used in + conjunction with :ref:`orm_queryguide_bulk_update`, added in version 2.0.11 + as part of :ticket:`9583`, where sending dictionaries that did not include + the primary key values for each row would run through the bulk process and + include "pk=NULL" for the rows, silently failing. An exception is now + raised if primary key values for bulk UPDATE are not supplied. + + .. change:: + :tags: bug, postgresql + :tickets: 9836 + + Use proper precedence on PostgreSQL specific operators, such as ``@>``. + Previously the precedence was wrong, leading to wrong parenthesis when + rendering against and ``ANY`` or ``ALL`` construct. + + .. change:: + :tags: bug, orm, dataclasses + :tickets: 9879 + + Fixed an issue where generating dataclasses fields that specified a + ``default`` value and set ``init=False`` would not work. + The dataclasses behavior in this case is to set the default + value on the class, that's not compatible with the descriptors used + by SQLAlchemy. To support this case the default is transformed to + a ``default_factory`` when generating the dataclass. + + .. change:: + :tags: bug, orm + :tickets: 9841 + + A deprecation warning is emitted whenever a property is added to a + :class:`_orm.Mapper` where an ORM mapped property were already configured, + or an attribute is already present on the class. Previously, there was a + non-deprecation warning for this case that did not emit consistently. The + logic for this warning has been improved so that it detects end-user + replacement of attribute while not having false positives for internal + Declarative and other cases where replacement of descriptors with new ones + is expected. + + .. change:: + :tags: bug, postgresql + :tickets: 9907 + + Fixed issue where the :paramref:`.ColumnOperators.like.escape` and similar + parameters did not allow an empty string as an argument that would be + passed through as the "escape" character; this is a supported syntax by + PostgreSQL. Pull requset courtesy Martin Caslavsky. + + .. change:: + :tags: bug, orm + :tickets: 9869 + + Improved the argument chacking on the + :paramref:`_orm.registry.map_imperatively.local_table` parameter of the + :meth:`_orm.registry.map_imperatively` method, ensuring only a + :class:`.Table` or other :class:`.FromClause` is passed, and not an + existing mapped class, which would lead to undefined behavior as the object + were further interpreted for a new mapping. + + .. change:: + :tags: usecase, postgresql + :tickets: 9041 + + Unified the custom PostgreSQL operator definitions, since they are + shared among multiple different data types. + + .. change:: + :tags: platform, usecase + + Compatibility improvements allowing the complete test suite to pass + on Python 3.12.0b1. + + .. change:: + :tags: bug, orm + :tickets: 9913 + + The :attr:`_orm.InstanceState.unloaded_expirable` attribute is a synonym + for :attr:`_orm.InstanceState.unloaded`, and is now deprecated; this + attribute was always implementation-specific and should not have been + public. + + .. change:: + :tags: usecase, postgresql + :tickets: 8240 + + Added support for PostgreSQL 10 ``NULLS NOT DISTINCT`` feature of + unique indexes and unique constraint using the dialect option + ``postgresql_nulls_not_distinct``. + Updated the reflection logic to also correctly take this option + into account. + Pull request courtesy of Pavel Siarchenia. .. changelog:: :version: 2.0.15 diff --git a/doc/build/changelog/unreleased_20/8215.rst b/doc/build/changelog/unreleased_20/8215.rst deleted file mode 100644 index fc4e5fe159..0000000000 --- a/doc/build/changelog/unreleased_20/8215.rst +++ /dev/null @@ -1,11 +0,0 @@ -.. change:: - :tags: usecase, asyncio - :tickets: 8215 - - Added new :paramref:`_asyncio.create_async_engine.async_creator` parameter - to :func:`.create_async_engine`, which accomplishes the same purpose as the - :paramref:`.create_engine.creator` parameter of :func:`.create_engine`. - This is a no-argument callable that provides a new asyncio connection, - using the asyncio database driver directly. The - :func:`.create_async_engine` function will wrap the driver-level connection - in the appropriate structures. Pull request curtesy of Jack Wotherspoon. diff --git a/doc/build/changelog/unreleased_20/8240.rst b/doc/build/changelog/unreleased_20/8240.rst deleted file mode 100644 index 15e119135e..0000000000 --- a/doc/build/changelog/unreleased_20/8240.rst +++ /dev/null @@ -1,10 +0,0 @@ -.. change:: - :tags: usecase, postgresql - :tickets: 8240 - - Added support for PostgreSQL 10 ``NULLS NOT DISTINCT`` feature of - unique indexes and unique constraint using the dialect option - ``postgresql_nulls_not_distinct``. - Updated the reflection logic to also correctly take this option - into account. - Pull request courtesy of Pavel Siarchenia. diff --git a/doc/build/changelog/unreleased_20/9041.rst b/doc/build/changelog/unreleased_20/9041.rst deleted file mode 100644 index 80cff6f018..0000000000 --- a/doc/build/changelog/unreleased_20/9041.rst +++ /dev/null @@ -1,6 +0,0 @@ -.. change:: - :tags: usecase, postgresql - :tickets: 9041 - - Unified the custom PostgreSQL operator definitions, since they are - shared among multiple different data types. diff --git a/doc/build/changelog/unreleased_20/9820.rst b/doc/build/changelog/unreleased_20/9820.rst deleted file mode 100644 index 84a0561d42..0000000000 --- a/doc/build/changelog/unreleased_20/9820.rst +++ /dev/null @@ -1,8 +0,0 @@ -.. change:: - :tags: bug, orm, regression - :tickets: 9820 - - Fixed regression in the 2.0 series where the default value of - :paramref:`_orm.validates.include_backrefs` got changed to ``False`` for - the :func:`_orm.validates` function. This default is now restored to - ``True``. diff --git a/doc/build/changelog/unreleased_20/9828.rst b/doc/build/changelog/unreleased_20/9828.rst deleted file mode 100644 index b6fa2559fc..0000000000 --- a/doc/build/changelog/unreleased_20/9828.rst +++ /dev/null @@ -1,11 +0,0 @@ -.. change:: - :tags: usecase, orm - :tickets: 9828 - - Improved :meth:`.DeferredReflection.prepare` to accept arbitrary ``**kw`` - arguments that are passed to :meth:`_schema.MetaData.reflect`, allowing use - cases such as reflection of views as well as dialect-specific arguments to - be passed. Additionally, modernized the - :paramref:`.DeferredReflection.prepare.bind` argument so that either an - :class:`.Engine` or :class:`.Connection` are accepted as the "bind" - argument. diff --git a/doc/build/changelog/unreleased_20/9836.rst b/doc/build/changelog/unreleased_20/9836.rst deleted file mode 100644 index b6ad9b7bc9..0000000000 --- a/doc/build/changelog/unreleased_20/9836.rst +++ /dev/null @@ -1,7 +0,0 @@ -.. change:: - :tags: bug, postgresql - :tickets: 9836 - - Use proper precedence on PostgreSQL specific operators, such as ``@>``. - Previously the precedence was wrong, leading to wrong parenthesis when - rendering against and ``ANY`` or ``ALL`` construct. diff --git a/doc/build/changelog/unreleased_20/9838.rst b/doc/build/changelog/unreleased_20/9838.rst deleted file mode 100644 index 9f7a7d18c1..0000000000 --- a/doc/build/changelog/unreleased_20/9838.rst +++ /dev/null @@ -1,7 +0,0 @@ -.. change:: - :tags: usecase, postgresql, reflection - :tickets: 9838 - - Cast ``NAME`` columns to ``TEXT`` when using ``ARRAY_AGG`` in PostgreSQL - reflection. This seems to improve compatibility with some PostgreSQL - derivatives that may not support aggregations on the ``NAME`` type. diff --git a/doc/build/changelog/unreleased_20/9841.rst b/doc/build/changelog/unreleased_20/9841.rst deleted file mode 100644 index 116f67e76c..0000000000 --- a/doc/build/changelog/unreleased_20/9841.rst +++ /dev/null @@ -1,12 +0,0 @@ -.. change:: - :tags: bug, orm - :tickets: 9841 - - A deprecation warning is emitted whenever a property is added to a - :class:`_orm.Mapper` where an ORM mapped property were already configured, - or an attribute is already present on the class. Previously, there was a - non-deprecation warning for this case that did not emit consistently. The - logic for this warning has been improved so that it detects end-user - replacement of attribute while not having false positives for internal - Declarative and other cases where replacement of descriptors with new ones - is expected. diff --git a/doc/build/changelog/unreleased_20/9862.rst b/doc/build/changelog/unreleased_20/9862.rst deleted file mode 100644 index efa6274a98..0000000000 --- a/doc/build/changelog/unreleased_20/9862.rst +++ /dev/null @@ -1,7 +0,0 @@ -.. change:: - :tags: bug, orm - :tickets: 9862 - - Fixed issue where :class:`.DeclarativeBaseNoMeta` declarative base class - would not function with non-mapped mixins or abstract classes, raising an - ``AttributeError`` instead. diff --git a/doc/build/changelog/unreleased_20/9869.rst b/doc/build/changelog/unreleased_20/9869.rst deleted file mode 100644 index 134b4e196d..0000000000 --- a/doc/build/changelog/unreleased_20/9869.rst +++ /dev/null @@ -1,10 +0,0 @@ -.. change:: - :tags: bug, orm - :tickets: 9869 - - Improved the argument chacking on the - :paramref:`_orm.registry.map_imperatively.local_table` parameter of the - :meth:`_orm.registry.map_imperatively` method, ensuring only a - :class:`.Table` or other :class:`.FromClause` is passed, and not an - existing mapped class, which would lead to undefined behavior as the object - were further interpreted for a new mapping. diff --git a/doc/build/changelog/unreleased_20/9879.rst b/doc/build/changelog/unreleased_20/9879.rst deleted file mode 100644 index d1112305ba..0000000000 --- a/doc/build/changelog/unreleased_20/9879.rst +++ /dev/null @@ -1,10 +0,0 @@ -.. change:: - :tags: bug, orm, dataclasses - :tickets: 9879 - - Fixed an issue where generating dataclasses fields that specified a - ``default`` value and set ``init=False`` would not work. - The dataclasses behavior in this case is to set the default - value on the class, that's not compatible with the descriptors used - by SQLAlchemy. To support this case the default is transformed to - a ``default_factory`` when generating the dataclass. diff --git a/doc/build/changelog/unreleased_20/9907.rst b/doc/build/changelog/unreleased_20/9907.rst deleted file mode 100644 index 4ce6962c8d..0000000000 --- a/doc/build/changelog/unreleased_20/9907.rst +++ /dev/null @@ -1,8 +0,0 @@ -.. change:: - :tags: bug, postgresql - :tickets: 9907 - - Fixed issue where the :paramref:`.ColumnOperators.like.escape` and similar - parameters did not allow an empty string as an argument that would be - passed through as the "escape" character; this is a supported syntax by - PostgreSQL. Pull requset courtesy Martin Caslavsky. diff --git a/doc/build/changelog/unreleased_20/9913.rst b/doc/build/changelog/unreleased_20/9913.rst deleted file mode 100644 index c9931f0feb..0000000000 --- a/doc/build/changelog/unreleased_20/9913.rst +++ /dev/null @@ -1,8 +0,0 @@ -.. change:: - :tags: bug, orm - :tickets: 9913 - - The :attr:`_orm.InstanceState.unloaded_expirable` attribute is a synonym - for :attr:`_orm.InstanceState.unloaded`, and is now deprecated; this - attribute was always implementation-specific and should not have been - public. diff --git a/doc/build/changelog/unreleased_20/9917.rst b/doc/build/changelog/unreleased_20/9917.rst deleted file mode 100644 index 436654d384..0000000000 --- a/doc/build/changelog/unreleased_20/9917.rst +++ /dev/null @@ -1,10 +0,0 @@ -.. change:: - :tags: bug, orm - :tickets: 9917 - - Fixed bug in new feature which allows a WHERE clause to be used in - conjunction with :ref:`orm_queryguide_bulk_update`, added in version 2.0.11 - as part of :ticket:`9583`, where sending dictionaries that did not include - the primary key values for each row would run through the bulk process and - include "pk=NULL" for the rows, silently failing. An exception is now - raised if primary key values for bulk UPDATE are not supplied. diff --git a/doc/build/changelog/unreleased_20/py312.rst b/doc/build/changelog/unreleased_20/py312.rst deleted file mode 100644 index 12770e5659..0000000000 --- a/doc/build/changelog/unreleased_20/py312.rst +++ /dev/null @@ -1,5 +0,0 @@ -.. change:: - :tags: platform, usecase - - Compatibility improvements allowing the complete test suite to pass - on Python 3.12.0b1. diff --git a/doc/build/conf.py b/doc/build/conf.py index 6a9c23451f..5e08b66afd 100644 --- a/doc/build/conf.py +++ b/doc/build/conf.py @@ -242,9 +242,9 @@ copyright = "2007-2023, the SQLAlchemy authors and contributors" # noqa # The short X.Y version. version = "2.0" # The full version, including alpha/beta/rc tags. -release = "2.0.15" +release = "2.0.16" -release_date = "May 19, 2023" +release_date = "June 10, 2023" site_base = os.environ.get("RTD_SITE_BASE", "https://www.sqlalchemy.org") site_adapter_template = "docs_adapter.mako"