I apologize if his is not the right process.
With reference to T142021, Pywikibot is going to use PyMySql.
Is it possible to install it on tools-bastion-03 (and other tool-labs environments if needed), both python2 and python3 versions?
Thanks
I apologize if his is not the right process.
With reference to T142021, Pywikibot is going to use PyMySql.
Is it possible to install it on tools-bastion-03 (and other tool-labs environments if needed), both python2 and python3 versions?
Thanks
| Subject | Repo | Branch | Lines +/- | |
|---|---|---|---|---|
| toollabs: install python{,3}-pymysql on exec_environ | operations/puppet | production | +2 -0 |
| 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 | bd808 | T55704 Packages to be added to toollabs puppet | |||
| Resolved | Andrew | T189052 install pymysql on tools-bastion-03 |
@Mpaa can this python package not be installed in a python virtualenv local to the tool?
I think in the long term, if pywikibot starts to prefer pymysql as the solution to access databases, having a global pymysql install can make a less steep learning curve. Also considering the number of users that will need it, why not? After all, we even ported python2 oursql to aptly (T51063)
10:35:11 0 ✓ zhuyifei1999@tools-bastion-02: ~$ apt-cache search 'oursql|pymysql|mysqldb'
python-mysqldb - Python interface to MySQL
python-mysqldb-dbg - Python interface to MySQL (debug extension)
bibus - bibliographic database
mysql-utilities - collection of scripts for managing MySQL servers
python-oursql - MySQL bindings for python.
python-pymysql - Pure-Python MySQL driver - Python 2.x
python3-pymysql - Pure-Python MySQL Driver - Python 3.x
10:35:45 0 ✓ zhuyifei1999@tools-bastion-02: ~$ apt-cache policy python-mysqldb python-oursql python{,3}-pymysql
python-mysqldb:
Installed: 1.2.3-2ubuntu1
Candidate: 1.2.3-2ubuntu1
Version table:
*** 1.2.3-2ubuntu1 0
500 http://nova.clouds.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
100 /var/lib/dpkg/status
python-oursql:
Installed: 0.9.3.1-1
Candidate: 0.9.3.1-1
Version table:
*** 0.9.3.1-1 0
1500 http://tools-services-01.tools.eqiad.wmflabs/repo/ trusty-tools/main amd64 Packages
100 /var/lib/dpkg/status
python-pymysql:
Installed: (none)
Candidate: 0.6.2-2
Version table:
0.6.2-2 0
1001 http://apt.wikimedia.org/wikimedia/ trusty-wikimedia/universe amd64 Packages
python3-pymysql:
Installed: (none)
Candidate: 0.7.2-1
Version table:
0.7.2-1 0
1001 http://apt.wikimedia.org/wikimedia/ trusty-wikimedia/universe amd64 PackagesAnd we don't have a global python 3 solution to access the databases.
Change 416874 had a related patch set uploaded (by Zhuyifei1999; owner: Zhuyifei1999):
[operations/puppet@production] toollabs: install python{,3}-pymysql on exec_environ
I tried this workaround, but I could not manage to run any Pywikibot script from venv (File not found error).
Change 416874 merged by Andrew Bogott:
[operations/puppet@production] toollabs: install python{,3}-pymysql on exec_environ
@Mpaa I followed the manual here (and also other similar manuals to work with venv in Toollabs). When calling Pywikibot from venv shell, it errored like this: File pwb.py not found in /shared/pywikibot/core/ directory or something similar. No way how to run any Pywikibot script from inside the venv shell worked for me.
I used local core folders and files symlinks to the shared core. But I'm not sure why this should matter?