From issues on T157734 it'd be nice to try it on python3 for any performance gains...
Description
Description
Details
Details
Subject | Repo | Branch | Lines +/- | |
---|---|---|---|---|
Make captcha python scripts python3 compatible | mediawiki/extensions/ConfirmEdit | master | +34 -34 |
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Restricted Task | |||||
Open | None | T150049 Enable $wgCaptchaDeleteOnSolve | |||
Resolved | Reedy | T157736 Speed up captcha generation | |||
Resolved | Reedy | T157888 Make captcha(-old)?.py python3 compatible |
Event Timeline
Comment Actions
Change 337247 had a related patch set uploaded (by Reedy):
Swap print statements to python3 compatible print
Comment Actions
That fixes one problem
The second one is, even with python3-pil installed...
This script requires the Python Imaging Library - http://www.pythonware.com/products/pil/
Comment Actions
time python3 'captcha-old.py' --key 'CHANGE_THIS_SECRET!' --output '/tmp/mw-fancycaptcha-1486771866-0b4ca9' --count '100' --dirs '0' --wordlist '/home/reedy/words' --font '/usr/share/fonts/truetype/freefont/FreeMonoBoldOblique.ttf' --blacklist '/home/reedy/badwords' Generating 100 CAPTCHA images separated in 100.0 image(s) per chunk run by 1 threads... Exception in thread Thread-1: Traceback (most recent call last): File "/usr/lib/python3.5/threading.py", line 914, in _bootstrap_inner self.run() File "/usr/lib/python3.5/threading.py", line 862, in run self._target(*self._args, **self._kwargs) File "captcha-old.py", line 185, in run_in_thread for i in range(count): TypeError: 'float' object cannot be interpreted as an integer
Comment Actions
Ok, https://gerrit.wikimedia.org/r/337247 makes them now work on python3
And the thread patch also updated for similar reasons, and rebased ontop of it