summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/testing/assertsql.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2020-08-21 14:44:04 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2020-08-25 20:10:16 -0400
commit3668b3a30c4b9a9f4af13457f43bfc34c28cf448 (patch)
tree6be6b991de7f3eb06181fd045b003e1b6d7e250e /lib/sqlalchemy/testing/assertsql.py
parent9b6b867fe59d74c23edca782dcbba9af99b62817 (diff)
downloadsqlalchemy-3668b3a30c4b9a9f4af13457f43bfc34c28cf448.tar.gz
make URL immutable
it's not really correct that URL is mutable and doesn't do any argument checking. propose replacing it with an immutable named tuple with rich copy-and-mutate methods. At the moment this makes a hard change to the CreateEnginePlugin docs that previously recommended url.query.pop(). I can't find any plugins on github other than my own that are using this feature, so see if we can just make a hard change on this one. Fixes: #5526 Change-Id: I28a0a471d80792fa8c28f4fa573d6352966a4a79
Diffstat (limited to 'lib/sqlalchemy/testing/assertsql.py')
-rw-r--r--lib/sqlalchemy/testing/assertsql.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/sqlalchemy/testing/assertsql.py b/lib/sqlalchemy/testing/assertsql.py
index c86e26ccf..e20209ba5 100644
--- a/lib/sqlalchemy/testing/assertsql.py
+++ b/lib/sqlalchemy/testing/assertsql.py
@@ -83,7 +83,7 @@ class CompiledSQL(SQLMatchRule):
params = {"implicit_returning": True}
else:
params = {}
- return url.URL(self.dialect).get_dialect()(**params)
+ return url.URL.create(self.dialect).get_dialect()(**params)
def _received_statement(self, execute_observed):
"""reconstruct the statement and params in terms