Use mysqlclient under Python 3

Description

edx-platform currently uses the MySQL-python package as its MySQL driver, but this doesn't even install under Python 3. Its fork mysqlclient works under both Python 2 and 3, but we don't have time right now to test switching to it on edx.org. Instead, we'll update the requirements files to use a different package depending on which version of Python is in use:

  • Add an environment marker to the MySQL-python dependency in requirements/edx/base.in that restricts its installation to Python 2.7. There are examples of this in requirements/constraints.txt.

  • Add a dependency in the same file on mysqlclient, but with a different environment marker which restricts installation to Python versions 3 or greater.

  • Launch a development shell via make shell (if you have devstack installed, you can use make lms-shell from there instead).

  • Run make upgrade to update the requirements files to reflect the changes.

  • Make sure the changes look correct (a few other packages may be upgraded in the process, this is usually fine) and submit a pull request.

  • If tests fail, try to diagnose why and either fix them or describe the problem and ask for help.

Steps to Reproduce

None

Current Behavior

None

Expected Behavior

None

Reason for Variance

None

Release Notes

None

User Impact Summary

None

Activity

Show:
Jeremy Bowman
February 20, 2019, 10:54 PM

Moved from INCR when I remembered about https://github.com/jazzband/pip-tools/issues/518 . This will be a little trickier to implement.

Done

Assignee

Jeremy Bowman

Reporter

Jeremy Bowman

Labels

None

Reach

None

Impact

None

Platform Area

None

Customer

None

Partner Manager

None

URL

None

Contributor Name

None

Groups with Read-Only Access

None

Actual Points

None

Category of Work

None

Platform Map Area (Levels 1 & 2)

None

Platform Map Area (Levels 3 & 4)

None

Story Points

1

Sprint

None

Priority

Unset