From 79a53645ba8e6c12aff33d9ba1318ea4328ab7de Mon Sep 17 00:00:00 2001 From: Gord Thompson Date: Wed, 26 Feb 2020 12:50:01 -0700 Subject: Fix tests failing for SQLite file databases; repair provisioning 1. ensure provision.py loads dialect implementations when running reap_dbs.py. Reapers haven't been working since 598f2f7e557073f29563d4d567f43931fc03013f . 2. add some exclusion rules to allow the sqlite_file target to work; add to tox. 3. add reap dbs target for SQLite, repair SQLite drop_db routine which also wasn't doing the right thing for memory databases etc. 4. Fix logging in provision files, as the main provision logger is the one that's enabled by reap_dbs and maybe others, have all the provision files use the provision logger. Fixes: #5180 Fixes: #5168 Change-Id: Ibc1b0106394d20f5bcf847f37b09d185f26ac9b5 --- lib/sqlalchemy/dialects/sqlite/pysqlite.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'lib/sqlalchemy/dialects/sqlite/pysqlite.py') diff --git a/lib/sqlalchemy/dialects/sqlite/pysqlite.py b/lib/sqlalchemy/dialects/sqlite/pysqlite.py index 0585e69ad..4485631ce 100644 --- a/lib/sqlalchemy/dialects/sqlite/pysqlite.py +++ b/lib/sqlalchemy/dialects/sqlite/pysqlite.py @@ -421,8 +421,15 @@ class SQLiteDialect_pysqlite(SQLiteDialect): return sqlite @classmethod - def get_pool_class(cls, url): + def _is_url_file_db(cls, url): if url.database and url.database != ":memory:": + return True + else: + return False + + @classmethod + def get_pool_class(cls, url): + if cls._is_url_file_db(url): return pool.NullPool else: return pool.SingletonThreadPool -- cgit v1.2.1