From: Mike Bayer Date: Mon, 15 Mar 2021 23:34:49 +0000 (-0400) Subject: Clarify LegacyRow / Row verbiage X-Git-Tag: rel_1_4_1~18 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0d3dded1a38344a911a627b6a3f32515cce4223f;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git Clarify LegacyRow / Row verbiage Change-Id: I40db17216f09757ff49e87297ff9dd8aae18ed97 References: #6051 --- diff --git a/doc/build/changelog/migration_20.rst b/doc/build/changelog/migration_20.rst index 1a056803ac..b9b36976db 100644 --- a/doc/build/changelog/migration_20.rst +++ b/doc/build/changelog/migration_20.rst @@ -844,9 +844,12 @@ used by code that already knows what columns are present within it. Already part of 1.4, the previous ``KeyedTuple`` class that was used when selecting rows from the :class:`_query.Query` object has been replaced by the :class:`.Row` class, which is the base of the same :class:`.Row` that comes -back with Core statement results (in 1.4 when not using the -:paramref:`_sa.create_engine.future` flag with an :class:`_engine.Engine`, -it is the :class:`.LegacyRow` class). +back with Core statement results when using the +:paramref:`_sa.create_engine.future` flag with :class:`_engine.Engine` (when +the :paramref:`_sa.create_engine.future` flag is not set, Core result sets use +the :class:`.LegacyRow` subclass, which maintains backwards-compatible +behaviors for the ``__contains__()`` method; ORM exclusively uses the +:class:`.Row` class directly). This :class:`.Row` behaves like a named tuple, in that it acts as a sequence but also supports attribute name access, e.g. ``row.some_column``. However,