From: Mike Bayer Date: Fri, 19 Dec 2014 23:20:11 +0000 (-0500) Subject: - ouch, this needs to be in dbapi, not module level! X-Git-Tag: rel_1_0_0b1~157 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5659ecb2e8a4aac83a1eb9b2c5ea348f0077ca72;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git - ouch, this needs to be in dbapi, not module level! --- diff --git a/lib/sqlalchemy/dialects/mysql/gaerdbms.py b/lib/sqlalchemy/dialects/mysql/gaerdbms.py index b4daec69c1..284b51bde3 100644 --- a/lib/sqlalchemy/dialects/mysql/gaerdbms.py +++ b/lib/sqlalchemy/dialects/mysql/gaerdbms.py @@ -43,13 +43,6 @@ import re from sqlalchemy.util import warn_deprecated -warn_deprecated( - "Google Cloud SQL now recommends creating connections via the " - "MySQLdb dialect directly, using the URL format " - "mysql+mysqldb://root@/?unix_socket=/cloudsql/:" -) - - def _is_dev_environment(): return os.environ.get('SERVER_SOFTWARE', '').startswith('Development/') @@ -58,6 +51,14 @@ class MySQLDialect_gaerdbms(MySQLDialect_mysqldb): @classmethod def dbapi(cls): + + warn_deprecated( + "Google Cloud SQL now recommends creating connections via the " + "MySQLdb dialect directly, using the URL format " + "mysql+mysqldb://root@/?unix_socket=/cloudsql/" + ":" + ) + # from django: # http://code.google.com/p/googleappengine/source/ # browse/trunk/python/google/storage/speckle/