From: Mike Bayer Date: Thu, 26 Jan 2023 22:52:28 +0000 (-0500) Subject: - 2.0.0 X-Git-Tag: rel_2_0_0 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ad2a65ef7e3cd57912c6c0373c8b843b8a1730eb;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git - 2.0.0 --- diff --git a/doc/build/changelog/changelog_20.rst b/doc/build/changelog/changelog_20.rst index b939c86571..73156ee769 100644 --- a/doc/build/changelog/changelog_20.rst +++ b/doc/build/changelog/changelog_20.rst @@ -10,10 +10,148 @@ .. changelog:: :version: 2.0.0 - :include_notes_from: unreleased_20 + :released: January 26, 2023 + + .. change:: + :tags: usecase, orm extensions + :tickets: 5145 + + Added new feature to :class:`.AutomapBase` for autoload of classes across + multiple schemas which may have overlapping names, by providing a + :paramref:`.AutomapBase.prepare.modulename_for_table` parameter which + allows customization of the ``__module__`` attribute of newly generated + classes, as well as a new collection :attr:`.AutomapBase.by_module`, which + stores a dot-separated namespace of module names linked to classes based on + the ``__module__`` attribute. + + Additionally, the :meth:`.AutomapBase.prepare` method may now be invoked + any number of times, with or without reflection enabled; only newly + added tables that were not previously mapped will be processed on each + call. Previously, the :meth:`.MetaData.reflect` method would need to be + called explicitly each time. + + .. seealso:: + + :ref:`automap_by_module` - illustrates use of both techniques at once. + + .. change:: + :tags: orm, bug + :tickets: 7305 + + Improved the notification of warnings that are emitted within the configure + mappers or flush process, which are often invoked as part of a different + operation, to add additional context to the message that indicates one of + these operations as the source of the warning within operations that may + not be obviously related. + + .. change:: + :tags: bug, typing + :tickets: 9129 + + Added typing for the built-in generic functions that are available from the + :data:`_sql.func` namespace, which accept a particular set of arguments and + return a particular type, such as for :class:`_sql.count`, + :class:`_sql.current_timestamp`, etc. + + .. change:: + :tags: bug, typing + :tickets: 9120 + + Corrected the type passed for "lambda statements" so that a plain lambda is + accepted by mypy, pyright, others without any errors about argument types. + Additionally implemented typing for more of the public API for lambda + statements and ensured :class:`.StatementLambdaElement` is part of the + :class:`.Executable` hierarchy so it's typed as accepted by + :meth:`_engine.Connection.execute`. + + .. change:: + :tags: typing, bug + :tickets: 9122 + + The :meth:`_sql.ColumnOperators.in_` and + :meth:`_sql.ColumnOperators.not_in` methods are typed to include + ``Iterable[Any]`` rather than ``Sequence[Any]`` for more flexibility in + argument type. + + + .. change:: + :tags: typing, bug + :tickets: 9123 + + The :func:`_sql.or_` and :func:`_sql.and_` from a typing perspective + require the first argument to be present, however these functions still + accept zero arguments which will emit a deprecation warning at runtime. + Typing is also added to support sending the fixed literal ``False`` for + :func:`_sql.or_` and ``True`` for :func:`_sql.and_` as the first argument + only, however the documentation now indicates sending the + :func:`_sql.false` and :func:`_sql.true` constructs in these cases as a + more explicit approach. + + + .. change:: + :tags: typing, bug + :tickets: 9125 + + Fixed typing issue where iterating over a :class:`_orm.Query` object + was not correctly typed. + + .. change:: + :tags: typing, bug + :tickets: 9136 + + Fixed typing issue where the object type when using :class:`_engine.Result` + as a context manager were not preserved, indicating :class:`_engine.Result` + in all cases rather than the specific :class:`_engine.Result` sub-type. + Pull request courtesy Martin Baláž. + + .. change:: + :tags: typing, bug + :tickets: 9150 + + Fixed issue where using the :paramref:`_orm.relationship.remote_side` + and similar parameters, passing an annotated declarative object typed as + :class:`_orm.Mapped`, would not be accepted by the type checker. + + .. change:: + :tags: typing, bug + :tickets: 9148 + + Added typing to legacy operators such as ``isnot()``, ``notin_()``, etc. + which previously were referencing the newer operators but were not + themselves typed. + + .. change:: + :tags: feature, orm extensions + :tickets: 7226 + + Added new option to horizontal sharding API + :class:`_horizontal.set_shard_id` which sets the effective shard identifier + to query against, for both the primary query as well as for all secondary + loaders including relationship eager loaders as well as relationship and + column lazy loaders. + + .. change:: + :tags: bug, mssql, regression + :tickets: 9142 + + The newly added comment reflection and rendering capability of the MSSQL + dialect, added in :ticket:`7844`, will now be disabled by default if it + cannot be determined that an unsupported backend such as Azure Synapse may + be in use; this backend does not support table and column comments and does + not support the SQL Server routines in use to generate them as well as to + reflect them. A new parameter ``supports_comments`` is added to the dialect + which defaults to ``None``, indicating that comment support should be + auto-detected. When set to ``True`` or ``False``, the comment support is + either enabled or disabled unconditionally. + + .. seealso:: + + :ref:`mssql_comment_support` + .. changelog:: :version: 2.0.0rc3 + :released: January 26, 2023 :released: January 18, 2023 .. change:: @@ -95,6 +233,7 @@ .. changelog:: :version: 2.0.0rc2 + :released: January 26, 2023 :released: January 9, 2023 .. change:: @@ -161,6 +300,7 @@ .. changelog:: :version: 2.0.0rc1 + :released: January 26, 2023 :released: December 28, 2022 .. change:: @@ -456,6 +596,7 @@ .. changelog:: :version: 2.0.0b4 + :released: January 26, 2023 :released: December 5, 2022 .. change:: @@ -777,6 +918,7 @@ .. changelog:: :version: 2.0.0b3 + :released: January 26, 2023 :released: November 4, 2022 .. change:: @@ -931,6 +1073,7 @@ .. changelog:: :version: 2.0.0b2 + :released: January 26, 2023 :released: October 20, 2022 .. change:: @@ -1044,6 +1187,7 @@ .. changelog:: :version: 2.0.0b1 + :released: January 26, 2023 :released: October 13, 2022 .. change:: diff --git a/doc/build/changelog/unreleased_20/5145.rst b/doc/build/changelog/unreleased_20/5145.rst deleted file mode 100644 index 35d0ca232e..0000000000 --- a/doc/build/changelog/unreleased_20/5145.rst +++ /dev/null @@ -1,21 +0,0 @@ -.. change:: - :tags: usecase, orm extensions - :tickets: 5145 - - Added new feature to :class:`.AutomapBase` for autoload of classes across - multiple schemas which may have overlapping names, by providing a - :paramref:`.AutomapBase.prepare.modulename_for_table` parameter which - allows customization of the ``__module__`` attribute of newly generated - classes, as well as a new collection :attr:`.AutomapBase.by_module`, which - stores a dot-separated namespace of module names linked to classes based on - the ``__module__`` attribute. - - Additionally, the :meth:`.AutomapBase.prepare` method may now be invoked - any number of times, with or without reflection enabled; only newly - added tables that were not previously mapped will be processed on each - call. Previously, the :meth:`.MetaData.reflect` method would need to be - called explicitly each time. - - .. seealso:: - - :ref:`automap_by_module` - illustrates use of both techniques at once. diff --git a/doc/build/changelog/unreleased_20/7226.rst b/doc/build/changelog/unreleased_20/7226.rst deleted file mode 100644 index ef643aff0f..0000000000 --- a/doc/build/changelog/unreleased_20/7226.rst +++ /dev/null @@ -1,9 +0,0 @@ -.. change:: - :tags: feature, orm extensions - :tickets: 7226 - - Added new option to horizontal sharding API - :class:`_horizontal.set_shard_id` which sets the effective shard identifier - to query against, for both the primary query as well as for all secondary - loaders including relationship eager loaders as well as relationship and - column lazy loaders. diff --git a/doc/build/changelog/unreleased_20/7305.rst b/doc/build/changelog/unreleased_20/7305.rst deleted file mode 100644 index b9ea96fd2b..0000000000 --- a/doc/build/changelog/unreleased_20/7305.rst +++ /dev/null @@ -1,9 +0,0 @@ -.. change:: - :tags: orm, bug - :tickets: 7305 - - Improved the notification of warnings that are emitted within the configure - mappers or flush process, which are often invoked as part of a different - operation, to add additional context to the message that indicates one of - these operations as the source of the warning within operations that may - not be obviously related. diff --git a/doc/build/changelog/unreleased_20/9120.rst b/doc/build/changelog/unreleased_20/9120.rst deleted file mode 100644 index 9e2a54d2fd..0000000000 --- a/doc/build/changelog/unreleased_20/9120.rst +++ /dev/null @@ -1,10 +0,0 @@ -.. change:: - :tags: bug, typing - :tickets: 9120 - - Corrected the type passed for "lambda statements" so that a plain lambda is - accepted by mypy, pyright, others without any errors about argument types. - Additionally implemented typing for more of the public API for lambda - statements and ensured :class:`.StatementLambdaElement` is part of the - :class:`.Executable` hierarchy so it's typed as accepted by - :meth:`_engine.Connection.execute`. diff --git a/doc/build/changelog/unreleased_20/9129.rst b/doc/build/changelog/unreleased_20/9129.rst deleted file mode 100644 index 7aa13c51cd..0000000000 --- a/doc/build/changelog/unreleased_20/9129.rst +++ /dev/null @@ -1,8 +0,0 @@ -.. change:: - :tags: bug, typing - :tickets: 9129 - - Added typing for the built-in generic functions that are available from the - :data:`_sql.func` namespace, which accept a particular set of arguments and - return a particular type, such as for :class:`_sql.count`, - :class:`_sql.current_timestamp`, etc. diff --git a/doc/build/changelog/unreleased_20/9142.rst b/doc/build/changelog/unreleased_20/9142.rst deleted file mode 100644 index 11abff6056..0000000000 --- a/doc/build/changelog/unreleased_20/9142.rst +++ /dev/null @@ -1,18 +0,0 @@ -.. change:: - :tags: bug, mssql, regression - :tickets: 9142 - - The newly added comment reflection and rendering capability of the MSSQL - dialect, added in :ticket:`7844`, will now be disabled by default if it - cannot be determined that an unsupported backend such as Azure Synapse may - be in use; this backend does not support table and column comments and does - not support the SQL Server routines in use to generate them as well as to - reflect them. A new parameter ``supports_comments`` is added to the dialect - which defaults to ``None``, indicating that comment support should be - auto-detected. When set to ``True`` or ``False``, the comment support is - either enabled or disabled unconditionally. - - .. seealso:: - - :ref:`mssql_comment_support` - diff --git a/doc/build/changelog/unreleased_20/more_typing.rst b/doc/build/changelog/unreleased_20/more_typing.rst deleted file mode 100644 index 6bbb74b097..0000000000 --- a/doc/build/changelog/unreleased_20/more_typing.rst +++ /dev/null @@ -1,55 +0,0 @@ -.. change:: - :tags: typing, bug - :tickets: 9122 - - The :meth:`_sql.ColumnOperators.in_` and - :meth:`_sql.ColumnOperators.not_in` methods are typed to include - ``Iterable[Any]`` rather than ``Sequence[Any]`` for more flexibility in - argument type. - - -.. change:: - :tags: typing, bug - :tickets: 9123 - - The :func:`_sql.or_` and :func:`_sql.and_` from a typing perspective - require the first argument to be present, however these functions still - accept zero arguments which will emit a deprecation warning at runtime. - Typing is also added to support sending the fixed literal ``False`` for - :func:`_sql.or_` and ``True`` for :func:`_sql.and_` as the first argument - only, however the documentation now indicates sending the - :func:`_sql.false` and :func:`_sql.true` constructs in these cases as a - more explicit approach. - - -.. change:: - :tags: typing, bug - :tickets: 9125 - - Fixed typing issue where iterating over a :class:`_orm.Query` object - was not correctly typed. - -.. change:: - :tags: typing, bug - :tickets: 9136 - - Fixed typing issue where the object type when using :class:`_engine.Result` - as a context manager were not preserved, indicating :class:`_engine.Result` - in all cases rather than the specific :class:`_engine.Result` sub-type. - Pull request courtesy Martin Baláž. - -.. change:: - :tags: typing, bug - :tickets: 9150 - - Fixed issue where using the :paramref:`_orm.relationship.remote_side` - and similar parameters, passing an annotated declarative object typed as - :class:`_orm.Mapped`, would not be accepted by the type checker. - -.. change:: - :tags: typing, bug - :tickets: 9148 - - Added typing to legacy operators such as ``isnot()``, ``notin_()``, etc. - which previously were referencing the newer operators but were not - themselves typed. diff --git a/doc/build/conf.py b/doc/build/conf.py index 0ced4f2848..e15c5cf584 100644 --- a/doc/build/conf.py +++ b/doc/build/conf.py @@ -236,9 +236,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.0rc3" +release = "2.0.0" -release_date = "January 18, 2023" +release_date = "January 26, 2023" site_base = os.environ.get("RTD_SITE_BASE", "https://www.sqlalchemy.org") site_adapter_template = "docs_adapter.mako"