[Sqlalchemy-tickets] Issue #4071: test suites that make new engines for each test will blow up the
Brought to you by:
zzzeek
From: Michael B. <iss...@bi...> - 2017-09-07 23:52:46
|
New issue 4071: test suites that make new engines for each test will blow up the LRU cache https://bitbucket.org/zzzeek/sqlalchemy/issues/4071/test-suites-that-make-new-engines-for-each Michael Bayer: firstly, that those dialects aren't garbage collected as quickly, and then that we emit a warning, test suites that raise on warning will blow up. this is currently illustrated in the keystone test suite. pdb and listing out keys: ``` #!python (<sqlalchemy.dialects.sqlite.pysqlite.SQLiteDialect_pysqlite object at 0x7f4d4725d290>, <sqlalchemy.sql.dml.Insert object at 0x7f4d481f6fd0>, ('description', 'domain_id', 'enabled', 'extra', 'id', 'is_domain', 'name', 'parent_id'), 0, False) (<sqlalchemy.dialects.sqlite.pysqlite.SQLiteDialect_pysqlite object at 0x7f4d475b61d0>, <sqlalchemy.sql.dml.Insert object at 0x7f4d481f6fd0>, ('description', 'domain_id', 'enabled', 'extra', 'id', 'is_domain', 'name', 'parent_id'), 0, False) (<sqlalchemy.dialects.sqlite.pysqlite.SQLiteDialect_pysqlite object at 0x7f4d47048550>, <sqlalchemy.sql.dml.Insert object at 0x7f4d481f6fd0>, ('description', 'domain_id', 'enabled', 'extra', 'id', 'is_domain', 'name', 'parent_id'), 0, False) (<sqlalchemy.dialects.sqlite.pysqlite.SQLiteDialect_pysqlite object at 0x7f4d473bd990>, <sqlalchemy.sql.dml.Insert object at 0x7f4d481f6fd0>, ('description', 'domain_id', 'enabled', 'extra', 'id', 'is_domain', 'name', 'parent_id'), 0, False) (<sqlalchemy.dialects.sqlite.pysqlite.SQLiteDialect_pysqlite object at 0x7f4d473b9cd0>, <sqlalchemy.sql.dml.Insert object at 0x7f4d481f6fd0>, ('description', 'domain_id', 'enabled', 'extra', 'id', 'is_domain', 'name', 'parent_id'), 0, False) (<sqlalchemy.dialects.sqlite.pysqlite.SQLiteDialect_pysqlite object at 0x7f4d470acf10>, <sqlalchemy.sql.dml.Insert object at 0x7f4d481f6fd0>, ('description', 'domain_id', 'enabled', 'extra', 'id', 'is_domain', 'name', 'parent_id'), 0, False) ``` I'm pretty relieved this is all it is, was super worried the cache was failing in some weirder way. it might be time to restructure how the compiled cache works, it needs to be mapper local and dialect local which means we probably need another elaborate weakref scheme like the event system has. |