Closed Bug 1277797 Opened 9 years ago Closed 9 years ago

Switch from the MySQLdb driver to the maintained fork mysqlclient

Categories

(Tree Management :: Treeherder, defect, P3)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: emorley, Assigned: emorley)

Details

Attachments

(2 files)

We're currently using the MySQLdb driver: https://github.com/farcepest/MySQLdb1 https://pypi.python.org/pypi/MySQL-python However it's no longer actively maintained. The Django docs mention some alternatives: https://docs.djangoproject.com/en/1.9/ref/databases/#mysql-db-api-drivers One of these is mysqlclient: https://pypi.python.org/pypi/mysqlclient https://github.com/PyMySQL/mysqlclient-python ...which is a fork of the above (and thus a drop-in replacement) that has several fixes that might be handy (for example handling of microseconds in timestamps, that we had to work around a while back): https://github.com/PyMySQL/mysqlclient-python/blob/master/HISTORY (anything >1.2.5 is only fixed in the fork)
Assignee: nobody → emorley
Attachment #8769730 - Flags: review?(cdawson)
Comment on attachment 8769730 [details] [review] [treeherder] mozilla:switch-to-mysqlclient > mozilla:master It's just a straight swap? Awesome! :)
Attachment #8769730 - Flags: review?(cdawson) → review+
Commit pushed to master at https://github.com/mozilla/treeherder https://github.com/mozilla/treeherder/commit/e99b3b2f2d0d243b4928f18c864f66a3f6c3b598 Bug 1277797 - Switch from the MySQLdb driver to mysqlclient Since the latter is actually being maintained, and is recommended by the Django docs: https://docs.djangoproject.com/en/1.9/ref/databases/#mysql-db-api-drivers mysqlclient has had several bug fixes as well as Python 3 support added since it forked from upstream 1.2.5: https://github.com/PyMySQL/mysqlclient-python/blob/master/HISTORY
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Due to the Travis cached virtualenv, the tests passed even though datasource was still trying to pull in MySQL-python (which is no longer pinned, so gets hash errors). I've created a new datasource release that switches from MySQL-python to mysqlclient too, and this followup updates us to this new datasource release.
Commit pushed to master at https://github.com/mozilla/treeherder https://github.com/mozilla/treeherder/commit/3e4a1b5085ba801c312f48b8eda47bd39224fcb5 Bug 1277797 - Update to datasource 0.11.0 To pick up Datasource's switch to mysqlclient: https://github.com/jeads/datasource/releases/tag/v0.11.0 (Otherwise we still try to install MySQL-python alongside mysqlclient)
Commit pushed to master at https://github.com/mozilla/treeherder https://github.com/mozilla/treeherder/commit/7257ccfec3c7a9f1ae2e3a83d4f0a4e13448b34c Bug 1277797 - Update hash of datasource 0.11.0 Since the 0.11.0 release was updated since it was first tagged, to pick up the setup.py version bump.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: