diff options
Diffstat (limited to 'lib/sqlalchemy/dialects/sqlite/pysqlite.py')
-rw-r--r-- | lib/sqlalchemy/dialects/sqlite/pysqlite.py | 9 |
1 files changed, 8 insertions, 1 deletions
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 |