]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
Changed urllib.quote_plus to urllib.parse.quote_plus (Python 3 versio…
authorericdeansanchez <ericdeansanchez@berkeley.edu>
Mon, 18 Mar 2019 14:51:26 +0000 (10:51 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Mon, 18 Mar 2019 14:51:53 +0000 (10:51 -0400)
Fixes: #4542
Closes: #4546
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/4546
Pull-request-sha: 95d905cdcc33f44ff21d13e411e4a17843e6b54a

Change-Id: Ibaf0852822e281e79770763e7e3550270d26cf66

lib/sqlalchemy/dialects/mssql/pyodbc.py

index 8ee32882725d85fd55a2273d6ee2fe820d39cfb0..02d70a3731407483ddef5de6649393310ecc1564 100644 (file)
@@ -56,10 +56,10 @@ Pass through exact Pyodbc string
 A PyODBC connection string can also be sent exactly as specified in
 `ConnectionStrings <https://code.google.com/p/pyodbc/wiki/ConnectionStrings>`_
 into the driver using the parameter ``odbc_connect``.  The delimeters must be
-URL escaped, however, as illustrated below using ``urllib.quote_plus``::
+URL escaped, however, as illustrated below using ``urllib.parse.quote_plus``::
 
     import urllib
-    params = urllib.quote_plus("DRIVER={SQL Server Native Client 10.0};SERVER=dagger;DATABASE=test;UID=user;PWD=password")
+    params = urllib.parse.quote_plus("DRIVER={SQL Server Native Client 10.0};SERVER=dagger;DATABASE=test;UID=user;PWD=password")
 
     engine = create_engine("mssql+pyodbc:///?odbc_connect=%s" % params)