diff -Nru python-pymysql-0.7.5/debian/changelog python-pymysql-0.7.5/debian/changelog --- python-pymysql-0.7.5/debian/changelog 2016-06-29 23:04:55.000000000 +0200 +++ python-pymysql-0.7.5/debian/changelog 2016-07-05 10:52:13.000000000 +0200 @@ -1,3 +1,15 @@ +python-pymysql (0.7.5-1ubuntu1) UNRELEASED; urgency=medium + + * Fix ftfs with MySQL 5.7 + - d/run_tests.sh was using old MySQL initialization. Updated for 5.7: + - Switched mysql_install_db with mysqld --initialize + - Removed deprecated option --skip-grant from mysqld + - Added -uroot to client commands + - Added patch to fix test failure with 5.7 + (LP: #1592664) + + -- Lars Tangvald Tue, 05 Jul 2016 10:37:47 +0200 + python-pymysql (0.7.5-1) unstable; urgency=medium * New upstream release diff -Nru python-pymysql-0.7.5/debian/control python-pymysql-0.7.5/debian/control --- python-pymysql-0.7.5/debian/control 2016-06-20 20:09:31.000000000 +0200 +++ python-pymysql-0.7.5/debian/control 2016-07-05 10:52:16.000000000 +0200 @@ -1,7 +1,8 @@ Source: python-pymysql Section: python Priority: optional -Maintainer: PKG OpenStack +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: PKG OpenStack Uploaders: Thomas Goirand , Ondřej Nový , Build-Depends: debhelper (>= 9), diff -Nru python-pymysql-0.7.5/debian/patches/fix_test_failures_mysql-5.7.patch python-pymysql-0.7.5/debian/patches/fix_test_failures_mysql-5.7.patch --- python-pymysql-0.7.5/debian/patches/fix_test_failures_mysql-5.7.patch 1970-01-01 01:00:00.000000000 +0100 +++ python-pymysql-0.7.5/debian/patches/fix_test_failures_mysql-5.7.patch 2016-07-05 10:52:13.000000000 +0200 @@ -0,0 +1,21 @@ +Description: Fix failing test with 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-07-05 + +--- python-pymysql-0.7.5.orig/pymysql/tests/test_issues.py ++++ python-pymysql-0.7.5/pymysql/tests/test_issues.py +@@ -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 -Nru python-pymysql-0.7.5/debian/patches/series python-pymysql-0.7.5/debian/patches/series --- python-pymysql-0.7.5/debian/patches/series 2016-06-28 12:03:00.000000000 +0200 +++ python-pymysql-0.7.5/debian/patches/series 2016-07-05 10:52:13.000000000 +0200 @@ -1,2 +1,3 @@ skip_not_working_tests.patch remove_intersphinx.patch +fix_test_failures_mysql-5.7.patch diff -Nru python-pymysql-0.7.5/debian/run_tests.sh python-pymysql-0.7.5/debian/run_tests.sh --- python-pymysql-0.7.5/debian/run_tests.sh 2016-05-31 21:51:57.000000000 +0200 +++ python-pymysql-0.7.5/debian/run_tests.sh 2016-07-05 10:52:13.000000000 +0200 @@ -30,9 +30,8 @@ MYTEMP_DIR=`mktemp -d` 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 & +mysqld --no-defaults --initialize-insecure --datadir=${MYTEMP_DIR} --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 @@ -40,7 +39,7 @@ echo -n pinging mysqld. attempts=0 -while ! /usr/bin/mysqladmin --socket=${MYTEMP_DIR}/mysql.sock ping ; do +while ! /usr/bin/mysqladmin -uroot --socket=${MYTEMP_DIR}/mysql.sock ping ; do sleep 3 attempts=$((attempts+1)) if [ ${attempts} -gt 10 ] ; then @@ -50,8 +49,8 @@ done # Create the db -mysql --socket=${MYTEMP_DIR}/mysql.sock --execute="CREATE DATABASE test_pymysql;" -mysql --socket=${MYTEMP_DIR}/mysql.sock --execute="CREATE DATABASE test_pymysql2;" +mysql -uroot --socket=${MYTEMP_DIR}/mysql.sock --execute="CREATE DATABASE test_pymysql;" +mysql -uroot --socket=${MYTEMP_DIR}/mysql.sock --execute="CREATE DATABASE test_pymysql2;" ##################### ### RUN THE TESTS ### @@ -73,5 +72,5 @@ ############################################### ### SHUTDOWN MYSQL AND CLEAN ITS TMP FOLDER ### ############################################### -/usr/bin/mysqladmin --socket=${MYTEMP_DIR}/mysql.sock shutdown +/usr/bin/mysqladmin -uroot --socket=${MYTEMP_DIR}/mysql.sock shutdown rm -rf ${MYTEMP_DIR}