From 48d5380f2eab278142df9f4f70d5da8eb314b725 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Thu, 21 Sep 2017 00:15:30 +0200 Subject: [PATCH] Drop MySQL-python dependency from oslo.db In order to fade out MySQL-python from OpenStack we need to stop testing it. Add release notes entry and adjust documentation references accordingly. Depends-On: Ie1f07062ed18350bcbb9e7b5e33c7ab2390be9ab Change-Id: Ie17f4543fa3d72b507d88d2c4023a9a5a430419e --- CONTRIBUTING.rst | 3 --- doc/source/install/index.rst | 14 -------------- ...L-python-no-longer-tested-2a6c32cce6b03215.yaml | 8 ++++++++ setup.cfg | 3 --- tox.ini | 6 ------ 5 files changed, 8 insertions(+), 26 deletions(-) create mode 100644 releasenotes/notes/MySQL-python-no-longer-tested-2a6c32cce6b03215.yaml diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index bb9c2d1d..88a37f42 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -32,9 +32,6 @@ venv, so you must ensure that you have the required system packages installed for psycopg2 (PyMySQL is a pure-Python implementation and so needs no additional system packages). For Ubuntu/Debian they are python-dev, and libpq-dev. For Fedora/CentOS - gcc, python-devel and postgresql-devel. -There is also a separate env for testing with MySQL-python. If you are suppose -to run these tests as well, you need to install libmysqlclient-dev on -Ubuntu/Debian or mysql-devel for Fedora/CentOS. The oslo.db unit tests system allows to run unittests on real databases. At the moment it supports MySQL, PostgreSQL and SQLite. diff --git a/doc/source/install/index.rst b/doc/source/install/index.rst index 12621605..1390f94f 100644 --- a/doc/source/install/index.rst +++ b/doc/source/install/index.rst @@ -33,17 +33,3 @@ Note that even in a virtual environment the libpq-dev will be installed system wide. -Using with MySQL-python ------------------------ - -PyMySQL is a default MySQL DB API driver for oslo.db, as well as for the whole -OpenStack. But you still can use MySQL-python as an alternative DB API driver. -For MySQL-python you must install the MySQL client development package for -your distro. On Ubuntu this is done as follows:: - - $ sudo apt-get install libmysqlclient-dev - $ pip install MySQL-python - -The installation of MySQL-python will fail if libmysqlclient-dev is not -installed first. Note that even in a virtual environment the MySQL package will -be installed system wide. diff --git a/releasenotes/notes/MySQL-python-no-longer-tested-2a6c32cce6b03215.yaml b/releasenotes/notes/MySQL-python-no-longer-tested-2a6c32cce6b03215.yaml new file mode 100644 index 00000000..547b9266 --- /dev/null +++ b/releasenotes/notes/MySQL-python-no-longer-tested-2a6c32cce6b03215.yaml @@ -0,0 +1,8 @@ +--- +deprecations: + - | + PyMySQL is a default MySQL DB API driver for oslo.db, as well as for the whole + OpenStack. So far it was possible to use MySQL-python as an alternative DB API driver. + This driver is no longer being tested in this release, hence it should be considered + unsupported. Please switch to PyMySQL, which is an adequate replacement. Refer to + https://wiki.openstack.org/wiki/PyMySQL_evaluation for details. diff --git a/setup.cfg b/setup.cfg index 2d08daae..7d66101b 100644 --- a/setup.cfg +++ b/setup.cfg @@ -22,9 +22,6 @@ classifier = # So e.g. nova can test-depend on oslo.db[mysql] mysql = PyMySQL>=0.7.6 # MIT License -# or oslo.db[mysql-c] -mysql-c = - MySQL-python>=1.2.5:python_version=='2.7' # GPL with FOSS exception # or oslo.db[postgresql] postgresql = psycopg2>=2.6.2 # LGPL/ZPL diff --git a/tox.ini b/tox.ini index 73eb1073..7df46f52 100644 --- a/tox.ini +++ b/tox.ini @@ -33,12 +33,6 @@ commands = env TEST_EVENTLET=0 bash tools/pretty_tox.sh '{posargs}' env TEST_EVENTLET=1 bash tools/pretty_tox.sh '{posargs}' -[testenv:mysql-python] -deps = .[mysql-c,postgresql,test,fixtures] -setenv = - {[testenv]setenv} - OS_TEST_DBAPI_ADMIN_CONNECTION=mysql://openstack_citest:openstack_citest@localhost/;postgresql://openstack_citest:openstack_citest@localhost/postgres;sqlite:// - [testenv:pep8] commands = flake8