Page MenuHomePhabricator

mysql support should fall back to dependency on pure python package PyMySQL
Closed, ResolvedPublic

Description

The pywikibot mysql dependencies oursql depends on a C compiler. This is fine as an optional dependency, but we should depend on a pure python package.

https://pypi.python.org/pypi/PyMySQL

Event Timeline

jayvdb raised the priority of this task from to Needs Triage.
jayvdb updated the task description. (Show Details)
jayvdb added a subscriber: jayvdb.
Restricted Application added subscribers: Aklapper, Unknown Object (MLST). · View Herald TranscriptFeb 19 2015, 7:13 PM

Hmm wouldn't that solve also the oursql problem in T75704?

Hmm wouldn't that solve also the oursql problem in T75704?

Yes it would. I've seen a few py3 packages which provide an almost identical API to oursql, etc.

How will we test this. The MySQL generator needs a mysql database with a MediaWiki table structure.
Maybe there is a fake MYSQL database that can be used for testing.

How will we test this. The MySQL generator needs a mysql database with a MediaWiki table structure.

Labs?

jayvdb triaged this task as High priority.Sep 1 2015, 5:55 AM

Including the compiled package in requirements.txt causes Win32 users a problem.

Change 416370 had a related patch set uploaded (by Mpaa; owner: Mpaa):
[pywikibot/core@master] mysql.py: add PyMySql as pure-Python MySQL client library

https://gerrit.wikimedia.org/r/416370

Change 416370 merged by jenkins-bot:
[pywikibot/core@master] mysql.py: add PyMySql as pure-Python MySQL client library

https://gerrit.wikimedia.org/r/416370

Dvorapa assigned this task to Mpaa.

Change 495739 had a related patch set uploaded (by Hashar; owner: Hashar):
[pywikibot/core@master] mysql: remove traces of 'oursql' dependency

https://gerrit.wikimedia.org/r/495739

Change 495740 had a related patch set uploaded (by Hashar; owner: Hashar):
[pywikibot/core@master] mysql: drop support for MySQLdb module

https://gerrit.wikimedia.org/r/495740

Note that pywikibot now defaults to use PyMySQL which is the pure python module and defaults to it. That has been the case since October 2018.

I have send a couple patches to clean up the code of mentions to oursql and remove support for MySQLdb has a fall back.

Oursql was not needed anymore, but I would leave MySQLdb fallback perhaps.

Change 495739 merged by jenkins-bot:
[pywikibot/core@master] mysql: remove traces of 'oursql' dependency

https://gerrit.wikimedia.org/r/495739

Change 495740 abandoned by Hashar:
mysql: drop support for MySQLdb module

https://gerrit.wikimedia.org/r/495740

Change 565757 had a related patch set uploaded (by Xqt; owner: Hashar):
[pywikibot/core@master] mysql: update requirements

https://gerrit.wikimedia.org/r/565757

Change 565757 merged by jenkins-bot:
[pywikibot/core@master] mysql: update requirements

https://gerrit.wikimedia.org/r/565757

Change 495740 restored by Xqt:
mysql: drop support for MySQLdb module

Reason:
T243154. May be removed after 1 year.

https://gerrit.wikimedia.org/r/495740

Change 495740 had a related patch set uploaded (by Xqt; owner: Hashar):
[pywikibot/core@master] mysql: drop support for MySQLdb module

https://gerrit.wikimedia.org/r/495740

Change 495740 merged by jenkins-bot:
[pywikibot/core@master] mysql: drop support for MySQLdb module

https://gerrit.wikimedia.org/r/495740