veekun_pokedex/pokedex/db
Andrew Ekstedt e1bbe78b72 fix test suite under SQLAlchemy 1.2.x
* SQLAlchemy 1.0 introduced "baked queries" - a way to construct Query
 objects so that they can be cached and reused.

 * SQLAlchemy 1.2 changed lazyloaded columns to use baked queries under the
 hood.

 * Our MultilangQuery class attempts to set _default_language_id right
 before the query is executed by overriding the __iter__ method.

 * Baked queries bypass the __iter__ method and call a lower-level
 method, _execute_and_instances, directly.

 * This caused problems where _default_language_id wouldn't get set
 correctly on lazyloaded columns.

 * To fix, make MultilangQuery override the _execute_and_instances
 method instead of __iter__.

 * This is really just a stopgap: the root cause is that query params
 are not preserved across lazyloads.

Tested with SQLAlchemy 0.9.7, 1.1.18, and 1.2.5.

Updates #236.
2018-03-30 12:01:21 -07:00
..
__init__.py Addressed all of pyflakes3's complaints 2016-11-24 21:29:58 +00:00
dependencies.py load: Add --recursive option. 2011-04-03 03:17:08 -07:00
load.py Addressed all of pyflakes3's complaints 2016-11-24 21:29:58 +00:00
markdown.py Addressed all of pyflakes3's complaints 2016-11-24 21:29:58 +00:00
multilang.py fix test suite under SQLAlchemy 1.2.x 2018-03-30 12:01:21 -07:00
oracle.py Update the docstring on rewrite_long_table_names. 2014-02-21 17:59:52 -05:00
tables.py Addressed all of pyflakes3's complaints 2016-11-24 21:29:58 +00:00
translations.py Addressed all of pyflakes3's complaints 2016-11-24 21:29:58 +00:00
util.py Addressed all of pyflakes3's complaints 2016-11-24 21:29:58 +00:00