From 0ac36e3d7dd22af743661f89e6cd9d28a0dcc7bf Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Fri, 13 Nov 2020 16:24:35 -0500 Subject: [PATCH] Revert "Added ssl_mode flag to mysqldb" 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 | 6 ------ lib/sqlalchemy/dialects/mysql/mysqldb.py | 1 - test/dialect/mysql/test_dialect.py | 2 -- 3 files changed, 9 deletions(-) delete mode 100644 doc/build/changelog/unreleased_13/5692.rst diff --git a/doc/build/changelog/unreleased_13/5692.rst b/doc/build/changelog/unreleased_13/5692.rst deleted file mode 100644 index 475cafc596..0000000000 --- a/doc/build/changelog/unreleased_13/5692.rst +++ /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. diff --git a/lib/sqlalchemy/dialects/mysql/mysqldb.py b/lib/sqlalchemy/dialects/mysql/mysqldb.py index 664c7a0474..b20e061fb5 100644 --- a/lib/sqlalchemy/dialects/mysql/mysqldb.py +++ b/lib/sqlalchemy/dialects/mysql/mysqldb.py @@ -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. diff --git a/test/dialect/mysql/test_dialect.py b/test/dialect/mysql/test_dialect.py index d9aadb92d1..abd3a491ff 100644 --- a/test/dialect/mysql/test_dialect.py +++ b/test/dialect/mysql/test_dialect.py @@ -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, -- 2.47.3