]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
changelog updates
authorMike Bayer <mike_mp@zzzcomputing.com>
Mon, 5 Dec 2022 22:16:32 +0000 (17:16 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Mon, 5 Dec 2022 22:18:15 +0000 (17:18 -0500)
prep for 2.0.0b4

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

doc/build/changelog/unreleased_14/8881.rst
doc/build/changelog/unreleased_20/6289.rst
doc/build/changelog/unreleased_20/8667.rst
doc/build/changelog/unreleased_20/8770.rst
doc/build/changelog/unreleased_20/8776.rst
doc/build/changelog/unreleased_20/8777.rst
doc/build/changelog/unreleased_20/8783.rst
doc/build/changelog/unreleased_20/8842.rst
doc/build/changelog/unreleased_20/8849.rst
doc/build/changelog/unreleased_20/8880.rst
doc/build/changelog/unreleased_20/8926.rst

index d0202e9a215e51e3d3ac3b90d3b394ed474d8ba7..12ebe81018f607668f8a2fd95afb39dbe7b3799f 100644 (file)
@@ -4,12 +4,12 @@
     :versions: 2.0.0b4
 
     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
+    composed of columns that were referenced from the enclosing SELECT would
+    not render correct SQL in some contexts, in the case where 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.
+    does have a default expression, that label name is still used for that
+    default, and an additional label with the same name will continue to be
+    ignored. Overall, this case is pretty thorny so further adjustments might
+    be warranted.
index f7789a27e3694f84ed2c7bccf8d7b1fc6e2e5c63..9bb7717a013977649c915d8c794feae86b594172 100644 (file)
@@ -3,7 +3,7 @@
     :tickets: 6289
 
     Added :class:`_expression.ScalarValues` that can be used as a column
-    element allowing using :class:`_expression.Values` inside IN clauses
+    element allowing using :class:`_expression.Values` inside ``IN`` clauses
     or in conjunction with ``ANY`` or ``ALL`` collection aggregates.
     This new class is generated using the method
     :meth:`_expression.Values.scalar_values`.
index 50dc5d844f093707e11b2c9b951bf73279e1c785..47f6ce5418b366208a5199066dd4f16397e27d7d 100644 (file)
@@ -1,6 +1,9 @@
 .. change::
     :tags: bug, typing
-    :tickets: 8667
+    :tickets: 8667, 6810
+
+    The ``sqlalchemy.ext.mutable`` extension and ``sqlalchemy.ext.automap``
+    extensions are now fully pep-484 typed. Huge thanks to Gleb Kisenkov for
+    their efforts on this.
+
 
-    The ``sqlalchemy.ext.mutable`` extension is now fully pep-484 typed. Huge
-    thanks to Gleb Kisenkov for their efforts on this.
index 59b94d658c0df66eb583073203ea10689681a715..4c8bd6e9b3faeab2d77aaee7a8e804db4a1aebc9 100644 (file)
@@ -2,9 +2,12 @@
     :tags: bug, sql
     :tickets: 8770
 
-    The RETURNING clause now renders columns using the routine as that of the
-    :class:`.Select` to generate labels, which will include disambiguating
-    labels, as well as that a SQL function surrounding a named column will be
-    labeled using the column name itself. This is a more comprehensive change
-    than a similar one made for the 1.4 series that adjusted the function label
-    issue only.
+    Adjusted the rendering of ``RETURNING``, in particular when using
+    :class:`_sql.Insert`, such that it now renders columns using the same logic
+    as that of the :class:`.Select` construct to generate labels, which will
+    include disambiguating labels, as well as that a SQL function surrounding a
+    named column will be labeled using the column name itself. This establishes
+    better cross-compatibility when selecting rows from either :class:`.Select`
+    constructs or from DML statements that use :meth:`.UpdateBase.returning`. A
+    narrower scale change was also made for the 1.4 series that adjusted the
+    function label issue only.
index fa4156eae0362eb016c6ecef119f996ed4b1cd5f..a8c1300e266d16902b8d6c138f744254a5bcd0e1 100644 (file)
@@ -1,5 +1,5 @@
 .. change::
-    :tags: bug, orm
+    :tags: bug, typing
     :tickets: 8776
 
     Fixed issue where passing a callbale function returning an iterable
index b21224605213383ddf8f97dc79f53d490b63a331..c6930f4615f9403cd7d7f5e2742793df92f2d3a0 100644 (file)
@@ -5,5 +5,5 @@
     Fixed a suite of issues involving :class:`.Mapped` use with dictionary
     types, such as ``Mapped[dict[str, str] | None]``, would not be correctly
     interpreted in Declarative ORM mappings. Support to correctly
-    "de-optionalize" this type including for lookup in type_annotation_map has
-    been fixed.
+    "de-optionalize" this type including for lookup in ``type_annotation_map``
+    has been fixed.
index baffb7c18f6aa652aeda20c1bc9c74c5d1bb68bf..1d5da5028ea6bf27f5169ceece098c5279a71c81 100644 (file)
@@ -2,6 +2,6 @@
     :tags: bug, typing
     :tickets: 8783
 
-    Adjusted internal use of the Python ``IntFlag`` class which changed its
-    behavioral contract in Python 3.11. This was not causing runtime failures
-    however caused typing runs to fail under Python 3.11.
+    Adjusted internal use of the Python ``enum.IntFlag`` class which changed
+    its behavioral contract in Python 3.11. This was not causing runtime
+    failures however caused typing runs to fail under Python 3.11.
index f7e5cb7299f9db3ba6d034d975ae24914f3ee5d7..0d8b4cf0ff7bcf77ac5796ab27e5c7f44497cad1 100644 (file)
@@ -3,14 +3,14 @@
     :tickets: 8842
 
     Improved the typing for :class:`.sessionmaker` and
-    :class:`.asyncsessionmaker`, so that the default type of their return value
+    :class:`.async_sessionmaker`, so that the default type of their return value
     will be :class:`.Session` or :class:`.AsyncSession`, without the need to
     type this explicitly. Previously, Mypy would not automaticaly infer these
     return types from its generic base.
 
     As part of this change, arguments for :class:`.Session`,
     :class:`.AsyncSession`, :class:`.sessionmaker` and
-    :class:`.asyncsessionmaker` beyond the initial "bind" argument have been
+    :class:`.async_sessionmaker` beyond the initial "bind" argument have been
     made keyword-only, which includes parameters that have always been
     documented as keyword arguments, such as :paramref:`.Session.autoflush`,
     :paramref:`.Session.class_`, etc.
index 29ecf2a2c87d05884b64bcb11366a1f1f737638f..23f05728aec7ecdee1a69f8853c9687dd77074a3 100644 (file)
@@ -2,13 +2,21 @@
     :tags: bug, sql
     :tickets: 8849
 
-    Reworked how numeric paramstyle behavers, in particular, fixed insertmany
-    behaviour that prior to this was non functional; added support for repeated
-    parameter without duplicating them like in other positional dialects;
-    introduced new numeric paramstyle called ``numeric_dollar`` that can be
-    used to render statements that use the PostgreSQL placeholder style (
-    i.e. ``$1, $2, $3``).
-    This change requires that the dialect supports out of order placehoders,
-    that may be used used in the statements, in particular when using
-    insert-many values with statement that have parameters in the returning
-    clause.
+    The approach to the ``numeric`` pep-249 paramstyle has been rewritten, and
+    is now fully supported, including by features such as "expanding IN" and
+    "insertmanyvalues". Parameter names may also be repeated in the source SQL
+    construct which will be correctly represented within the numeric format
+    using a single parameter. Introduced an additional numeric paramstyle
+    called ``numeric_dollar``, which is specifically what's used by the asyncpg
+    dialect; the paramstyle is equivalent to ``numeric`` except numeric
+    indicators are indicated by a dollar-sign rather than a colon. The asyncpg
+    dialect now uses ``numeric_dollar`` paramstyle directly, rather than
+    compiling to ``format`` style first.
+
+    The ``numeric`` and ``numeric_dollar`` paramstyles assume that the target
+    backend is capable of receiving the numeric parameters in any order,
+    and will match the given parameter values to the statement based on
+    matching their position (1-based) to the numeric indicator.  This is the
+    normal behavior of "numeric" paramstyles, although it was observed that
+    the SQLite DBAPI implements a not-used "numeric" style that does not honor
+    parameter ordering.
index af58e14e5b9a610aa8f33c34bb4426a894c5518f..0c5aeea1e8485c92c82de8115f7be15d866fb0b6 100644 (file)
@@ -2,8 +2,9 @@
     :tags: bug, orm
     :tickets: 8880
 
-    Fixed bug in dataclass mapping feature where using plain dataclass fields
-    in a mapping would not create a dataclass with the correct class-level
-    state for those fields, copying the raw ``Field`` object to the class
-    inappropriately after dataclasses itself had replaced the ``Field`` object
-    with the class-level default value.
+    Fixed bug in :ref:`orm_declarative_native_dataclasses` feature where using
+    plain dataclass fields with the ``__allow_unmapped__`` directive in a
+    mapping would not create a dataclass with the correct class-level state for
+    those fields, copying the raw ``Field`` object to the class inappropriately
+    after dataclasses itself had replaced the ``Field`` object with the
+    class-level default value.
index a0000fb87d18cd66965d1bc3a1c2f2d0f8441535..32381ebe39c3aa049b44cb5ebd8722e0f53e53c2 100644 (file)
@@ -1,5 +1,5 @@
 .. change::
-    :tags: asyncpg
+    :tags: change, postgresql, asyncpg
     :tickets: 8926
 
     Changed the paramstyle used by asyncpg from ``format`` to