]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
Revert "Added ssl_mode flag to mysqldb"
authorMike Bayer <mike_mp@zzzcomputing.com>
Fri, 13 Nov 2020 21:24:35 +0000 (16:24 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Fri, 13 Nov 2020 21:24:35 +0000 (16:24 -0500)
This reverts commit 2e4dec934cb5215d628e02ed717454c165a33e4d.

I approved this merge before observing that the "ssl_mode"
flag is not actually part of the separate "ssl" dictionary,
so this patch as given is unnecessary as we already pass
all strings into opts.  but also I can't get the flag to work
on either mysqlclient or pymysql, it's not recognized.  so
I need specific info from the submitter what it is that is
actually needed, and if a change is needed it has to be
appropriate for the drivers in use.

doc/build/changelog/unreleased_13/5692.rst [deleted file]
lib/sqlalchemy/dialects/mysql/mysqldb.py
test/dialect/mysql/test_dialect.py

diff --git a/doc/build/changelog/unreleased_13/5692.rst b/doc/build/changelog/unreleased_13/5692.rst
deleted file mode 100644 (file)
index 475cafc..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-.. change::
-    :tags: mysql, usecase
-    :tickets: 5692
-
-    Added ``ssl_mode`` dialect keyword to MySQL dialect for use with mysqldb.
-    Pull request courtesy Teodor Moroz.
index 664c7a047429703d172a22458a1ab1ce808ae10e..b20e061fb50e50fa8a2841823986e9d54da016f0 100644 (file)
@@ -189,7 +189,6 @@ class MySQLDialect_mysqldb(MySQLDialect):
         util.coerce_kw_type(opts, "write_timeout", int)
         util.coerce_kw_type(opts, "client_flag", int)
         util.coerce_kw_type(opts, "local_infile", int)
-        util.coerce_kw_type(opts, "ssl_mode", str)
         # Note: using either of the below will cause all strings to be
         # returned as Unicode, both in raw SQL operations and with column
         # types like String and MSString.
index d9aadb92d10fb5a892dc58f72594e2deddafdf4e..abd3a491ff1a8a1d533fa8e091cf0e3a6de954b3 100644 (file)
@@ -141,7 +141,6 @@ class DialectTest(fixtures.TestBase):
             make_url(
                 "mysql://scott:tiger@localhost:3306/test"
                 "?ssl_ca=/ca.pem&ssl_cert=/cert.pem&ssl_key=/key.pem"
-                "&ssl_mode=REQUIRED"
             )
         )[1]
         # args that differ among mysqldb and oursql
@@ -157,7 +156,6 @@ class DialectTest(fixtures.TestBase):
                     "cert": "/cert.pem",
                     "key": "/key.pem",
                 },
-                "ssl_mode": "REQUIRED",
                 "host": "localhost",
                 "user": "scott",
                 "port": 3306,