From 4476dca00786adef5da3bcf74699e0b217f8ffa6 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Wed, 24 Mar 2021 11:33:04 -0400 Subject: Repair pysqlcipher and use sqlcipher3 The ``pysqlcipher`` dialect now imports the ``sqlcipher3`` module for Python 3 by default. Regressions have been repaired such that the connection routine was not working. To better support the post-connection steps of the pysqlcipher dialect, a new hook Dialect.on_connect_url() is added, which supersedes Dialect.on_connect() and is passed the URL object. The dialect now pulls the passphrase and other cipher args from the URL directly without including them in the "connect" args. This will allow any user-defined extensibility to connecting to work as it would for other dialects. The commit also builds upon the extended routines in sqlite/provisioning.py to better support running tests against multiple simultaneous SQLite database files. Additionally enables backend for test_sqlite which was skipping everything for aiosqlite too, fortunately everything there is passing. Fixes: #5848 Change-Id: I43f53ebc62298a84a4abe149e1eb699a027b7915 --- lib/sqlalchemy/engine/create.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/sqlalchemy/engine/create.py') diff --git a/lib/sqlalchemy/engine/create.py b/lib/sqlalchemy/engine/create.py index 789030f2b..682d0dd5d 100644 --- a/lib/sqlalchemy/engine/create.py +++ b/lib/sqlalchemy/engine/create.py @@ -646,7 +646,7 @@ def create_engine(url, **kwargs): engine = engineclass(pool, dialect, u, **engine_args) if _initialize: - do_on_connect = dialect.on_connect() + do_on_connect = dialect.on_connect_url(url) if do_on_connect: def on_connect(dbapi_connection, connection_record): -- cgit v1.2.1