summaryrefslogtreecommitdiff
path: root/test/aaa_profiling
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2012-04-23 18:59:17 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2012-04-23 18:59:17 -0400
commit841ea194bd7cf239323ee21320210fd6dc5c551d (patch)
tree0da6b6ae37d5def93b84e06afd451f50716c6caf /test/aaa_profiling
parent101da94e1282a410557784272bda58222ac048b4 (diff)
downloadsqlalchemy-841ea194bd7cf239323ee21320210fd6dc5c551d.tar.gz
- [removed] The legacy "mutable" system of the
ORM, including the MutableType class as well as the mutable=True flag on PickleType and postgresql.ARRAY has been removed. In-place mutations are detected by the ORM using the sqlalchemy.ext.mutable extension, introduced in 0.7. The removal of MutableType and associated constructs removes a great deal of complexity from SQLAlchemy's internals. The approach performed poorly as it would incur a scan of the full contents of the Session when in use. [ticket:2442]
Diffstat (limited to 'test/aaa_profiling')
-rw-r--r--test/aaa_profiling/test_memusage.py48
1 files changed, 0 insertions, 48 deletions
diff --git a/test/aaa_profiling/test_memusage.py b/test/aaa_profiling/test_memusage.py
index cffe8b71f..26e7d193c 100644
--- a/test/aaa_profiling/test_memusage.py
+++ b/test/aaa_profiling/test_memusage.py
@@ -553,54 +553,6 @@ class MemUsageTest(EnsureZeroed):
metadata.drop_all()
- def test_mutable_identity(self):
- metadata = MetaData(testing.db)
-
- table1 = Table("mytable", metadata,
- Column('col1', Integer, primary_key=True,
- test_needs_autoincrement=True),
- Column('col2', PickleType(comparator=operator.eq, mutable=True))
- )
-
- class Foo(object):
- def __init__(self, col2):
- self.col2 = col2
-
- mapper(Foo, table1)
- metadata.create_all()
-
- session = sessionmaker()()
-
- def go():
- obj = [
- Foo({'a':1}),
- Foo({'b':1}),
- Foo({'c':1}),
- Foo({'d':1}),
- Foo({'e':1}),
- Foo({'f':1}),
- Foo({'g':1}),
- Foo({'h':1}),
- Foo({'i':1}),
- Foo({'j':1}),
- Foo({'k':1}),
- Foo({'l':1}),
- ]
-
- session.add_all(obj)
- session.commit()
-
- testing.eq_(len(session.identity_map._mutable_attrs), 12)
- testing.eq_(len(session.identity_map), 12)
- obj = None
- gc_collect()
- testing.eq_(len(session.identity_map._mutable_attrs), 0)
- testing.eq_(len(session.identity_map), 0)
-
- try:
- go()
- finally:
- metadata.drop_all()
def test_type_compile(self):
from sqlalchemy.dialects.sqlite.base import dialect as SQLiteDialect