From 6b7d6f68a848e2f1359d92fab7bc5bc90e294d2c Mon Sep 17 00:00:00 2001 From: Jeremy Stanley Date: Wed, 20 May 2015 01:03:58 +0000 Subject: [PATCH] Switch from MySQL-python to PyMySQL As discussed in the Liberty Design Summit "Moving apps to Python 3" cross-project workshop, the way forward in the near future is to switch to the pure-python PyMySQL library as a default. https://etherpad.openstack.org/p/liberty-cross-project-python3 Change-Id: I058419b25f55dcfd93af522aa1f5f61b8f06407e --- doc/source/install/manual.rst | 2 +- setup-test-env-mysql.sh | 2 +- test-requirements.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/source/install/manual.rst b/doc/source/install/manual.rst index fb266f447f..36e3b1828d 100755 --- a/doc/source/install/manual.rst +++ b/doc/source/install/manual.rst @@ -69,7 +69,7 @@ SQLalchemy-supported DBs ceilometer.conf as follows:: [database] - connection = mysql://username:password@host/ceilometer?charset=utf8 + connection = mysql+pymysql://username:password@host/ceilometer?charset=utf8 HBase ----- diff --git a/setup-test-env-mysql.sh b/setup-test-env-mysql.sh index d473d51746..de1ab5ba99 100755 --- a/setup-test-env-mysql.sh +++ b/setup-test-env-mysql.sh @@ -22,7 +22,7 @@ mkfifo ${MYSQL_DATA}/out mysqld --datadir=${MYSQL_DATA} --pid-file=${MYSQL_DATA}/mysql.pid --socket=${MYSQL_DATA}/mysql.socket --skip-networking --skip-grant-tables &> ${MYSQL_DATA}/out & # Wait for MySQL to start listening to connections wait_for_line "mysqld: ready for connections." ${MYSQL_DATA}/out -export CEILOMETER_TEST_MYSQL_URL="mysql://root@localhost/template1?unix_socket=${MYSQL_DATA}/mysql.socket&charset=utf8" +export CEILOMETER_TEST_MYSQL_URL="mysql+pymysql://root@localhost/template1?unix_socket=${MYSQL_DATA}/mysql.socket&charset=utf8" # Yield execution to venv command $* diff --git a/test-requirements.txt b/test-requirements.txt index 768342e572..d26087eaaa 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -12,7 +12,7 @@ fixtures>=0.3.14 happybase>=0.5,!=0.7 httplib2>=0.7.5 mock>=1.0 -MySQL-python +PyMySQL>=0.6.2 # MIT License # Docs Requirements oslosphinx>=2.5.0 # Apache-2.0 oslotest>=1.5.1 # Apache-2.0