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

Also set the OS_TEST_DBAPI_ADMIN_CONNECTION override variable so
that oslo.db opportunistic detection will know to use PyMySQL until
I12b32dc097a121bd43991bc38dd4d289b65e86c1 makes it the default
behavior.

Change-Id: I66b7d6053643e82d9c11af568190d82ffe7f385e
Co-Authored-By: Victor Sergeyev <vsergeyev@mirantis.com>
This commit is contained in:
Jeremy Stanley 2015-05-20 01:03:58 +00:00
parent 609fda5643
commit 98348df246
2 changed files with 2 additions and 1 deletions

View File

@ -21,7 +21,7 @@ testtools>=0.9.36,!=1.2.0
psutil>=1.1.1,<2.0.0
oslotest>=1.5.1 # Apache-2.0
# Optional packages that should be installed when testing
MySQL-python
PyMySQL>=0.6.2 # MIT License
psycopg2
pysendfile>=2.0.0
qpid-python

View File

@ -5,6 +5,7 @@ skipsdist = True
[testenv]
setenv = VIRTUAL_ENV={envdir}
OS_TEST_DBAPI_ADMIN_CONNECTION=mysql+pymysql://openstack_citest:openstack_citest@localhost/;postgresql://openstack_citest:openstack_citest@localhost/postgres;sqlite://
usedevelop = True
install_command = pip install -U {opts} {packages}
deps = -r{toxinidir}/requirements.txt