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.
Description
Details
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Invalid | None | T72936 Important tasks to be solved (tracking) | |||
Resolved | Xqt | T60053 Pywikibot Python 3 compatibility (tracking) | |||
Resolved | Xqt | T75704 Python 3 library support | |||
Resolved | Xover | T265640 phe-tools: Match&Split bot is not running because of python2 deprecation in pywikibot | |||
Resolved | Xqt | T213287 Drop support of Python 2.7 | |||
Resolved | Xqt | T243770 Pywikibot Python 2 compatibility (tracking) | |||
Resolved | hashar | T243154 Drop support for MySQLdb | |||
Resolved | Mpaa | T187122 Make pywikibot work with SQL on all platforms and all Python versions supported | |||
Resolved | Mpaa | T89976 mysql support should fall back to dependency on pure python package PyMySQL | |||
Resolved | Andrew | T189052 install pymysql on tools-bastion-03 |
Event Timeline
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.
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
Change 416370 merged by jenkins-bot:
[pywikibot/core@master] mysql.py: add PyMySql as pure-Python MySQL client library
Change 495739 had a related patch set uploaded (by Hashar; owner: Hashar):
[pywikibot/core@master] mysql: remove traces of 'oursql' dependency
Change 495740 had a related patch set uploaded (by Hashar; owner: Hashar):
[pywikibot/core@master] mysql: drop support for MySQLdb module
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.
Change 495739 merged by jenkins-bot:
[pywikibot/core@master] mysql: remove traces of 'oursql' dependency
Change 565757 had a related patch set uploaded (by Xqt; owner: Hashar):
[pywikibot/core@master] mysql: update requirements
Change 565757 merged by jenkins-bot:
[pywikibot/core@master] mysql: update requirements
Change 495740 restored by Xqt:
mysql: drop support for MySQLdb module
Reason:
T243154. May be removed after 1 year.
Change 495740 had a related patch set uploaded (by Xqt; owner: Hashar):
[pywikibot/core@master] mysql: drop support for MySQLdb module
Change 495740 merged by jenkins-bot:
[pywikibot/core@master] mysql: drop support for MySQLdb module