summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/dialects
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sqlalchemy/dialects')
-rw-r--r--lib/sqlalchemy/dialects/mysql/provision.py11
-rw-r--r--lib/sqlalchemy/dialects/oracle/provision.py4
-rw-r--r--lib/sqlalchemy/dialects/sqlite/pysqlite.py2
3 files changed, 6 insertions, 11 deletions
diff --git a/lib/sqlalchemy/dialects/mysql/provision.py b/lib/sqlalchemy/dialects/mysql/provision.py
index bbe752d78..a1d82222d 100644
--- a/lib/sqlalchemy/dialects/mysql/provision.py
+++ b/lib/sqlalchemy/dialects/mysql/provision.py
@@ -1,5 +1,3 @@
-import copy
-
from ... import exc
from ...testing.provision import configure_follower
from ...testing.provision import create_db
@@ -9,7 +7,7 @@ from ...testing.provision import temp_table_keyword_args
@generate_driver_url.for_db("mysql", "mariadb")
-def generate_driver_url(url, driver, query):
+def generate_driver_url(url, driver, query_str):
backend = url.get_backend_name()
if backend == "mysql":
@@ -17,10 +15,9 @@ def generate_driver_url(url, driver, query):
if dialect_cls._is_mariadb_from_url(url):
backend = "mariadb"
- new_url = copy.copy(url)
- new_url.query = dict(new_url.query)
- new_url.drivername = "%s+%s" % (backend, driver)
- new_url.query.update(query)
+ new_url = url.set(
+ drivername="%s+%s" % (backend, driver)
+ ).update_query_string(query_str)
try:
new_url.get_dialect()
diff --git a/lib/sqlalchemy/dialects/oracle/provision.py b/lib/sqlalchemy/dialects/oracle/provision.py
index 9de14bff0..01854fdce 100644
--- a/lib/sqlalchemy/dialects/oracle/provision.py
+++ b/lib/sqlalchemy/dialects/oracle/provision.py
@@ -97,9 +97,7 @@ def _reap_oracle_dbs(url, idents):
@follower_url_from_main.for_db("oracle")
def _oracle_follower_url_from_main(url, ident):
url = sa_url.make_url(url)
- url.username = ident
- url.password = "xe"
- return url
+ return url.set(username=ident, password="xe")
@temp_table_keyword_args.for_db("oracle")
diff --git a/lib/sqlalchemy/dialects/sqlite/pysqlite.py b/lib/sqlalchemy/dialects/sqlite/pysqlite.py
index 8da2a0323..3c88dab8e 100644
--- a/lib/sqlalchemy/dialects/sqlite/pysqlite.py
+++ b/lib/sqlalchemy/dialects/sqlite/pysqlite.py
@@ -491,7 +491,7 @@ class SQLiteDialect_pysqlite(SQLiteDialect):
util.coerce_kw_type(opts, key, type_, dest=pysqlite_opts)
if pysqlite_opts.get("uri", False):
- uri_opts = opts.copy()
+ uri_opts = dict(opts)
# here, we are actually separating the parameters that go to
# sqlite3/pysqlite vs. those that go the SQLite URI. What if
# two names conflict? again, this seems to be not the case right