diff -aruN python-pymysql-0.7.4/debian/patches/mysql-5.7.patch ../python-pymysql-0.7.4/debian/patches/mysql-5.7.patch --- python-pymysql-0.7.4/debian/patches/mysql-5.7.patch 1970-01-01 01:00:00.000000000 +0100 +++ ../python-pymysql-0.7.4/debian/patches/mysql-5.7.patch 2016-06-16 12:17:51.113844561 +0200 @@ -0,0 +1,30 @@ +Description: Fix tests for MySQL 5.7 + The test for issue 363 expects a warning from MySQL 5.7, but only if + python is version 3.2 or greater. However, this warning is also received + in version 2.7, causing the test to fail. Removed python version check +Author: Lars Tangvald +Bug: https://github.com/PyMySQL/PyMySQL/issues/478 +Bug-Ubuntu: https://launchpad.net/bugs/1592664 +Forwarded: no +Last-Update: 2016-06-28 + +--- python-pymysql-0.7.4.orig/pymysql/tests/test_issues.py ++++ python-pymysql-0.7.4/pymysql/tests/test_issues.py +@@ -458,7 +458,7 @@ class TestGitHubIssues(base.PyMySQLTestC + + # select WKT + query = "SELECT AsText(geom) FROM issue363" +- if sys.version_info[0:2] >= (3,2) and self.mysql_server_is(conn, (5, 7, 0)): ++ if self.mysql_server_is(conn, (5, 7, 0)): + with self.assertWarns(pymysql.err.Warning) as cm: + cur.execute(query) + else: +@@ -468,7 +468,7 @@ class TestGitHubIssues(base.PyMySQLTestC + + # select WKB + query = "SELECT AsBinary(geom) FROM issue363" +- if sys.version_info[0:2] >= (3,2) and self.mysql_server_is(conn, (5, 7, 0)): ++ if self.mysql_server_is(conn, (5, 7, 0)): + with self.assertWarns(pymysql.err.Warning) as cm: + cur.execute(query) + else: diff -aruN python-pymysql-0.7.4/debian/patches/series ../python-pymysql-0.7.4/debian/patches/series --- python-pymysql-0.7.4/debian/patches/series 2016-05-31 22:25:02.000000000 +0200 +++ ../python-pymysql-0.7.4/debian/patches/series 2016-06-16 11:47:19.393779618 +0200 @@ -1,2 +1,3 @@ skip_not_working_tests.patch remove_useless_sphinx_modules.patch +mysql-5.7.patch diff -aruN python-pymysql-0.7.4/debian/run_tests.sh ../python-pymysql-0.7.4/debian/run_tests.sh --- python-pymysql-0.7.4/debian/run_tests.sh 2016-03-06 00:39:22.000000000 +0100 +++ ../python-pymysql-0.7.4/debian/run_tests.sh 2016-06-16 11:43:35.885771694 +0200 @@ -31,8 +31,8 @@ ME=`whoami` # --force is needed because buildd's can't resolve their own hostnames to ips -mysql_install_db --no-defaults --datadir=${MYTEMP_DIR} --force --skip-name-resolve --user=${ME} -/usr/sbin/mysqld --no-defaults --skip-grant --user=${ME} --socket=${MYTEMP_DIR}/mysql.sock --datadir=${MYTEMP_DIR} --skip-networking & +mysql_install_db --no-defaults --datadir=${MYTEMP_DIR} --insecure --basedir=/usr --user=${ME} +/usr/sbin/mysqld --no-defaults --user=${ME} --socket=${MYTEMP_DIR}/mysql.sock --datadir=${MYTEMP_DIR} --skip-networking & # This sets the path of the MySQL socket for any libmysql-client users, which includes # the ./tests/test_dbi client