From: Mike Bayer Date: Thu, 20 Oct 2022 17:40:54 +0000 (-0400) Subject: - 2.0.0b2 X-Git-Tag: rel_2_0_0b2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d6c0dfa2d8bb7341f6dc6494d5c20429c4f1c173;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git - 2.0.0b2 --- diff --git a/doc/build/changelog/changelog_20.rst b/doc/build/changelog/changelog_20.rst index 0a754359da..6257bf8db6 100644 --- a/doc/build/changelog/changelog_20.rst +++ b/doc/build/changelog/changelog_20.rst @@ -10,7 +10,116 @@ .. changelog:: :version: 2.0.0b2 - :include_notes_from: unreleased_20 + :released: October 20, 2022 + + .. change:: + :tags: bug, orm + :tickets: 8656 + + Removed the warning that emits when using ORM-enabled update/delete + regarding evaluation of columns by name, first added in :ticket:`4073`; + this warning actually covers up a scenario that otherwise could populate + the wrong Python value for an ORM mapped attribute depending on what the + actual column is, so this deprecated case is removed. In 2.0, ORM enabled + update/delete uses "auto" for "synchronize_session", which should do the + right thing automatically for any given UPDATE expression. + + .. change:: + :tags: bug, mssql + :tickets: 8661 + + Fixed regression caused by SQL Server pyodbc change :ticket:`8177` where we + now use ``setinputsizes()`` by default; for VARCHAR, this fails if the + character size is greater than 4000 (or 2000, depending on data) characters + as the incoming datatype is NVARCHAR, which has a limit of 4000 characters, + despite the fact that VARCHAR can handle unlimited characters. Additional + pyodbc-specific typing information is now passed to ``setinputsizes()`` + when the datatype's size is > 2000 characters. The change is also applied + to the :class:`_types.JSON` type which was also impacted by this issue for large + JSON serializations. + + .. change:: + :tags: bug, typing + :tickets: 8645 + + Fixed typing issue where pylance strict mode would report "instance + variable overrides class variable" when using a method to define + ``__tablename__``, ``__mapper_args__`` or ``__table_args__``. + + .. change:: + :tags: mssql, bug + :tickets: 7211 + + The :class:`.Sequence` construct restores itself to the DDL behavior it + had prior to the 1.4 series, where creating a :class:`.Sequence` with + no additional arguments will emit a simple ``CREATE SEQUENCE`` instruction + **without** any additional parameters for "start value". For most backends, + this is how things worked previously in any case; **however**, for + MS SQL Server, the default value on this database is + ``-2**63``; to prevent this generally impractical default + from taking effect on SQL Server, the :paramref:`.Sequence.start` parameter + should be provided. As usage of :class:`.Sequence` is unusual + for SQL Server which for many years has standardized on ``IDENTITY``, + it is hoped that this change has minimal impact. + + .. seealso:: + + :ref:`change_7211` + + .. change:: + :tags: bug, declarative, orm + :tickets: 8665 + + Improved the :class:`.DeclarativeBase` class so that when combined with + other mixins like :class:`.MappedAsDataclass`, the order of the classes may + be in either order. + + + .. change:: + :tags: usecase, declarative, orm + :tickets: 8665 + + Added support for mapped classes that are also ``Generic`` subclasses, + to be specified as a ``GenericAlias`` object (e.g. ``MyClass[str]``) + within statements and calls to :func:`_sa.inspect`. + + + + .. change:: + :tags: bug, orm, declarative + :tickets: 8668 + + Fixed bug in new ORM typed declarative mappings where the ability + to use ``Optional[MyClass]`` or similar forms such as ``MyClass | None`` + in the type annotation for a many-to-one relationship was not implemented, + leading to errors. Documentation has also been added for this use + case to the relationship configuration documentation. + + .. change:: + :tags: bug, typing + :tickets: 8644 + + Fixed typing issue where pylance strict mode would report "partially + unknown" datatype for the :func:`_orm.mapped_column` construct. + + .. change:: + :tags: bug, regression, sql + :tickets: 8639 + + Fixed bug in new "insertmanyvalues" feature where INSERT that included a + subquery with :func:`_sql.bindparam` inside of it would fail to render + correctly in "insertmanyvalues" format. This affected psycopg2 most + directly as "insertmanyvalues" is used unconditionally with this driver. + + + .. change:: + :tags: bug, orm, declarative + :tickets: 8688 + + Fixed issue with new dataclass mapping feature where arguments passed to + the dataclasses API could sometimes be mis-ordered when dealing with mixins + that override :func:`_orm.mapped_column` declarations, leading to + initializer problems. .. changelog:: :version: 2.0.0b1 diff --git a/doc/build/changelog/unreleased_20/7211.rst b/doc/build/changelog/unreleased_20/7211.rst deleted file mode 100644 index c06c1bec4a..0000000000 --- a/doc/build/changelog/unreleased_20/7211.rst +++ /dev/null @@ -1,19 +0,0 @@ -.. change:: - :tags: mssql, bug - :tickets: 7211 - - The :class:`.Sequence` construct restores itself to the DDL behavior it - had prior to the 1.4 series, where creating a :class:`.Sequence` with - no additional arguments will emit a simple ``CREATE SEQUENCE`` instruction - **without** any additional parameters for "start value". For most backends, - this is how things worked previously in any case; **however**, for - MS SQL Server, the default value on this database is - ``-2**63``; to prevent this generally impractical default - from taking effect on SQL Server, the :paramref:`.Sequence.start` parameter - should be provided. As usage of :class:`.Sequence` is unusual - for SQL Server which for many years has standardized on ``IDENTITY``, - it is hoped that this change has minimal impact. - - .. seealso:: - - :ref:`change_7211` diff --git a/doc/build/changelog/unreleased_20/8639.rst b/doc/build/changelog/unreleased_20/8639.rst deleted file mode 100644 index 46cce757d9..0000000000 --- a/doc/build/changelog/unreleased_20/8639.rst +++ /dev/null @@ -1,9 +0,0 @@ -.. change:: - :tags: bug, regression, sql - :tickets: 8639 - - Fixed bug in new "insertmanyvalues" feature where INSERT that included a - subquery with :func:`_sql.bindparam` inside of it would fail to render - correctly in "insertmanyvalues" format. This affected psycopg2 most - directly as "insertmanyvalues" is used unconditionally with this driver. - diff --git a/doc/build/changelog/unreleased_20/8644.rst b/doc/build/changelog/unreleased_20/8644.rst deleted file mode 100644 index 5b21a27468..0000000000 --- a/doc/build/changelog/unreleased_20/8644.rst +++ /dev/null @@ -1,6 +0,0 @@ -.. change:: - :tags: bug, typing - :tickets: 8644 - - Fixed typing issue where pylance strict mode would report "partially - unknown" datatype for the :func:`_orm.mapped_column` construct. diff --git a/doc/build/changelog/unreleased_20/8645.rst b/doc/build/changelog/unreleased_20/8645.rst deleted file mode 100644 index 7745b41db3..0000000000 --- a/doc/build/changelog/unreleased_20/8645.rst +++ /dev/null @@ -1,7 +0,0 @@ -.. change:: - :tags: bug, typing - :tickets: 8645 - - Fixed typing issue where pylance strict mode would report "instance - variable overrides class variable" when using a method to define - ``__tablename__``, ``__mapper_args__`` or ``__table_args__``. diff --git a/doc/build/changelog/unreleased_20/8656.rst b/doc/build/changelog/unreleased_20/8656.rst deleted file mode 100644 index 3b6407d3ec..0000000000 --- a/doc/build/changelog/unreleased_20/8656.rst +++ /dev/null @@ -1,11 +0,0 @@ -.. change:: - :tags: bug, orm - :tickets: 8656 - - Removed the warning that emits when using ORM-enabled update/delete - regarding evaluation of columns by name, first added in :ticket:`4073`; - this warning actually covers up a scenario that otherwise could populate - the wrong Python value for an ORM mapped attribute depending on what the - actual column is, so this deprecated case is removed. In 2.0, ORM enabled - update/delete uses "auto" for "synchronize_session", which should do the - right thing automatically for any given UPDATE expression. diff --git a/doc/build/changelog/unreleased_20/8661.rst b/doc/build/changelog/unreleased_20/8661.rst deleted file mode 100644 index 6b44e19286..0000000000 --- a/doc/build/changelog/unreleased_20/8661.rst +++ /dev/null @@ -1,13 +0,0 @@ -.. change:: - :tags: bug, mssql - :tickets: 8661 - - Fixed regression caused by SQL Server pyodbc change :ticket:`8177` where we - now use ``setinputsizes()`` by default; for VARCHAR, this fails if the - character size is greater than 4000 (or 2000, depending on data) characters - as the incoming datatype is NVARCHAR, which has a limit of 4000 characters, - despite the fact that VARCHAR can handle unlimited characters. Additional - pyodbc-specific typing information is now passed to ``setinputsizes()`` - when the datatype's size is > 2000 characters. The change is also applied - to the :class:`_types.JSON` type which was also impacted by this issue for large - JSON serializations. diff --git a/doc/build/changelog/unreleased_20/8665.rst b/doc/build/changelog/unreleased_20/8665.rst deleted file mode 100644 index 4f5535a586..0000000000 --- a/doc/build/changelog/unreleased_20/8665.rst +++ /dev/null @@ -1,18 +0,0 @@ -.. change:: - :tags: bug, declarative, orm - :tickets: 8665 - - Improved the :class:`.DeclarativeBase` class so that when combined with - other mixins like :class:`.MappedAsDataclass`, the order of the classes may - be in either order. - - -.. change:: - :tags: usecase, declarative, orm - :tickets: 8665 - - Added support for mapped classes that are also ``Generic`` subclasses, - to be specified as a ``GenericAlias`` object (e.g. ``MyClass[str]``) - within statements and calls to :func:`_sa.inspect`. - - diff --git a/doc/build/changelog/unreleased_20/8668.rst b/doc/build/changelog/unreleased_20/8668.rst deleted file mode 100644 index d6221ae94b..0000000000 --- a/doc/build/changelog/unreleased_20/8668.rst +++ /dev/null @@ -1,9 +0,0 @@ -.. change:: - :tags: bug, orm, declarative - :tickets: 8668 - - Fixed bug in new ORM typed declarative mappings where the ability - to use ``Optional[MyClass]`` or similar forms such as ``MyClass | None`` - in the type annotation for a many-to-one relationship was not implemented, - leading to errors. Documentation has also been added for this use - case to the relationship configuration documentation. diff --git a/doc/build/changelog/unreleased_20/8688.rst b/doc/build/changelog/unreleased_20/8688.rst deleted file mode 100644 index b6d9b1a72b..0000000000 --- a/doc/build/changelog/unreleased_20/8688.rst +++ /dev/null @@ -1,8 +0,0 @@ -.. change:: - :tags: bug, orm, declarative - :tickets: 8688 - - Fixed issue with new dataclass mapping feature where arguments passed to - the dataclasses API could sometimes be mis-ordered when dealing with mixins - that override :func:`_orm.mapped_column` declarations, leading to - initializer problems. diff --git a/doc/build/conf.py b/doc/build/conf.py index 8132227f92..c352a4749b 100644 --- a/doc/build/conf.py +++ b/doc/build/conf.py @@ -235,9 +235,9 @@ copyright = "2007-2022, 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.0b1" +release = "2.0.0b2" -release_date = "October 13, 2022" +release_date = "October 20, 2022" site_base = os.environ.get("RTD_SITE_BASE", "https://www.sqlalchemy.org") site_adapter_template = "docs_adapter.mako"