From: Mike Bayer Date: Fri, 19 Dec 2014 19:15:56 +0000 (-0500) Subject: - make the google deprecation messages more specific, use full URL X-Git-Tag: rel_1_0_0b1~158 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=182553b7409cfa6673483d03f29bc4c462336577;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git - make the google deprecation messages more specific, use full URL format - add an extra doc to MySQLdb - changelog --- diff --git a/doc/build/changelog/changelog_09.rst b/doc/build/changelog/changelog_09.rst index f92d8324b7..7505ee50c2 100644 --- a/doc/build/changelog/changelog_09.rst +++ b/doc/build/changelog/changelog_09.rst @@ -13,6 +13,15 @@ .. changelog:: :version: 0.9.9 + .. change:: + :tags: change, mysql + :versions: 1.0.0 + :tickets: 3275 + + The ``gaerdbms`` dialect is no longer necessary, and emits a + deprecation warning. Google now recommends using the MySQLdb + dialect directly. + .. change:: :tags: bug, sql :versions: 1.0.0 diff --git a/lib/sqlalchemy/dialects/mysql/gaerdbms.py b/lib/sqlalchemy/dialects/mysql/gaerdbms.py index 947b066cc4..b4daec69c1 100644 --- a/lib/sqlalchemy/dialects/mysql/gaerdbms.py +++ b/lib/sqlalchemy/dialects/mysql/gaerdbms.py @@ -17,9 +17,12 @@ developers-guide .. versionadded:: 0.7.8 - .. deprecated:: 1.0 Cloud SQL now recommends creating connections via the + .. deprecated:: 1.0 This dialect is **no longer necessary** for + Google Cloud SQL; the MySQLdb dialect can be used directly. + Cloud SQL now recommends creating connections via the mysql dialect using the URL format - `mysql://root@/?unix_socket=/cloudsql/:` + + `mysql+mysqldb://root@/?unix_socket=/cloudsql/:` Pooling @@ -42,8 +45,8 @@ from sqlalchemy.util import warn_deprecated warn_deprecated( "Google Cloud SQL now recommends creating connections via the " - "mysql dialect using the URL format " - "mysql://root@/?unix_socket=/cloudsql/:" + "MySQLdb dialect directly, using the URL format " + "mysql+mysqldb://root@/?unix_socket=/cloudsql/:" ) diff --git a/lib/sqlalchemy/dialects/mysql/mysqldb.py b/lib/sqlalchemy/dialects/mysql/mysqldb.py index 5bb67a24d3..9293174674 100644 --- a/lib/sqlalchemy/dialects/mysql/mysqldb.py +++ b/lib/sqlalchemy/dialects/mysql/mysqldb.py @@ -39,6 +39,14 @@ MySQL-python version 1.2.2 has a serious memory leak related to unicode conversion, a feature which is disabled via ``use_unicode=0``. It is strongly advised to use the latest version of MySQL-Python. +Using MySQLdb with Google Cloud SQL +----------------------------------- + +Google Cloud SQL now recommends use of the MySQLdb dialect. Connect +using a URL like the following:: + + mysql+mysqldb://root@/?unix_socket=/cloudsql/: + """ from .base import (MySQLDialect, MySQLExecutionContext,