[Sqlalchemy-tickets] Issue #3285: an exception which occurs when forming row processors in loading.
Brought to you by:
zzzeek
|
From: Mike B. <iss...@bi...> - 2015-01-06 02:20:56
|
New issue 3285: an exception which occurs when forming row processors in loading.py leaves the cursor open https://bitbucket.org/zzzeek/sqlalchemy/issue/3285/an-exception-which-occurs-when-forming-row Mike Bayer: e.g. such as this: ``` #! test/orm/test_eager_relations.py::EagerTest::test_disable_dynamic FAILED ===================================================== FAILURES ====================================================== __________________________________________ EagerTest.test_disable_dynamic ___________________________________________ Traceback (most recent call last): File "/home/mbayer/dev/sqlalchemy/test/orm/test_eager_relations.py", line 433, in test_disable_dynamic sess.query(User).options(joinedload(User.addresses)).first() File "/home/mbayer/dev/sqlalchemy/test/../lib/sqlalchemy/orm/query.py", line 2447, in first ret = list(self[0:1]) File "/home/mbayer/dev/sqlalchemy/test/../lib/sqlalchemy/orm/query.py", line 2283, in __getitem__ return list(res) File "/home/mbayer/dev/sqlalchemy/test/../lib/sqlalchemy/orm/loading.py", line 50, in instances for query_entity in query._entities File "/home/mbayer/dev/sqlalchemy/test/../lib/sqlalchemy/orm/query.py", line 3280, in row_processor polymorphic_discriminator=self._polymorphic_discriminator File "/home/mbayer/dev/sqlalchemy/test/../lib/sqlalchemy/orm/loading.py", line 249, in instance_processor context, path, mapper, result, adapter, populators) File "/home/mbayer/dev/sqlalchemy/test/../lib/sqlalchemy/orm/interfaces.py", line 477, in create_row_processor mapper, result, adapter, populators) File "/home/mbayer/dev/sqlalchemy/test/../lib/sqlalchemy/orm/strategies.py", line 1442, in create_row_processor self InvalidRequestError: 'User.addresses' does not support object population - eager loading cannot be applied. ``` in that test, if we just swallow the error, the cursor stays open, and pypy gets screwed up; even closing the connection it keeps the table locked. |