veekun_pokedex/pokedex
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
..
cli Stub out a CLI search interface, which can also work with JSON and strings 2016-02-02 10:13:38 -08:00
data/csv Remove some extraneous form names that broke lookup 2017-11-27 09:58:23 -08:00
db fix test suite under SQLAlchemy 1.2.x 2018-03-30 12:01:21 -07:00
doc Addressed all of pyflakes3's complaints 2016-11-24 21:29:58 +00:00
struct Addressed all of pyflakes3's complaints 2016-11-24 21:29:58 +00:00
tests Fix tests, since Farfetch’d got a name change 2017-09-04 10:04:23 -07:00
util Addressed all of pyflakes3's complaints 2016-11-24 21:29:58 +00:00
__init__.py Speed up import pokedex.db slightly. 2011-04-03 03:13:07 -07:00
__main__.py Make the library work with python -m. 2013-08-09 13:00:37 -07:00
compatibility.py Addressed all of pyflakes3's complaints 2016-11-24 21:29:58 +00:00
defaults.py Speed up import pokedex.db slightly. 2011-04-03 03:13:07 -07:00
formulae.py Addressed all of pyflakes3's complaints 2016-11-24 21:29:58 +00:00
lookup.py Fix references to "ja" (which is now ja-Hrkt) 2017-06-18 00:15:05 -07:00
main.py Allow common CLI arguments to work both before and after the subcommand 2016-02-02 11:01:45 -08:00
roomaji.py Compat with Python 3.3+ 2015-10-05 08:12:23 -07:00
search.py Stub out a CLI search interface, which can also work with JSON and strings 2016-02-02 10:13:38 -08:00