]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
- The "lightweight named tuple" used when a :class:`.Query` returns
authorMike Bayer <mike_mp@zzzcomputing.com>
Thu, 14 May 2015 23:22:53 +0000 (19:22 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Thu, 14 May 2015 23:22:53 +0000 (19:22 -0400)
rows failed to implement ``__slots__`` correctly such that it still
had a ``__dict__``.    This is resolved, but in the extremely
unlikely case someone was assigning values to the returned tuples,
that will no longer work.
fixes #3420

doc/build/changelog/changelog_10.rst
lib/sqlalchemy/util/_collections.py

index 4e42765613b2c101a5aaa92b48c1e18d7eabdb8e..0a012962f82b8124ab9ab1e7aafb883a4484fb3d 100644 (file)
 .. changelog::
     :version: 1.0.5
 
+    .. change::
+        :tags: bug, orm
+        :tickets: 3420
+
+        The "lightweight named tuple" used when a :class:`.Query` returns
+        rows failed to implement ``__slots__`` correctly such that it still
+        had a ``__dict__``.    This is resolved, but in the extremely
+        unlikely case someone was assigning values to the returned tuples,
+        that will no longer work.
+
     .. change::
         :tags: bug, pool
         :tickets: 3419
index 5c62ebed86e7ffd03cbb764abb8c37624e4e2ca4..3869775cf7803927a2c946453d0e4b2327676ace 100644 (file)
@@ -19,6 +19,8 @@ EMPTY_SET = frozenset()
 
 
 class AbstractKeyedTuple(tuple):
+    __slots__ = ()
+
     def keys(self):
         """Return a list of string key names for this :class:`.KeyedTuple`.