summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2015-05-14 19:22:53 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2015-05-14 19:22:53 -0400
commit64c1f2e5688879e1cc087f4e4a893d32267fd1fb (patch)
tree83d4109aa327547cb98cdb28207860d3b04c44d4
parent4a0e51e7d2f334238d9eae6e697fed78ee54f7c2 (diff)
downloadsqlalchemy-64c1f2e5688879e1cc087f4e4a893d32267fd1fb.tar.gz
- 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. fixes #3420
-rw-r--r--doc/build/changelog/changelog_10.rst10
-rw-r--r--lib/sqlalchemy/util/_collections.py2
2 files changed, 12 insertions, 0 deletions
diff --git a/doc/build/changelog/changelog_10.rst b/doc/build/changelog/changelog_10.rst
index 4e4276561..0a012962f 100644
--- a/doc/build/changelog/changelog_10.rst
+++ b/doc/build/changelog/changelog_10.rst
@@ -19,6 +19,16 @@
: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
diff --git a/lib/sqlalchemy/util/_collections.py b/lib/sqlalchemy/util/_collections.py
index 5c62ebed8..3869775cf 100644
--- a/lib/sqlalchemy/util/_collections.py
+++ b/lib/sqlalchemy/util/_collections.py
@@ -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`.