jayvdb created this task.
jayvdb added a subscriber: jayvdb.
jayvdb added a project: pywikibot-core.
TASK DESCRIPTION
core Page.interwiki() returns Links whereas compat Page.interwiki() returns Pages
The core implementation of Page.interwiki was created in 2008, with an incompatible return type to compat.
As an example of the problems this cases, the imagetransfer script -interwiki argument was ported incorrectly and nobody has noticed in over one year.
```
Traceback (most recent call last):
File "pwb.py", line 222, in <module>
run_python_file(filename, argv, argvu, file_package)
File "pwb.py", line 81, in run_python_file
main_mod.__dict__)
File "./scripts/imagetransfer.py", line 353, in <module>
main()
File "./scripts/imagetransfer.py", line 350, in main
bot.run()
File "./scripts/imagetransfer.py", line 269, in run
imagelist.append(linkedPage.imagelinks(followRedirects=True))
AttributeError: 'Link' object has no attribute 'imagelinks'
Found 1 wikipedia:mk processes running, including this one.
Dropped throttle(s).
<type 'exceptions.AttributeError'>
```
Note also even the basic attributes of a Link are different from Page. e.g. Link.title and Link.namespace are a property and title() and namespace() are an error, whereas Page.title and Page.namespace are a method and must be called as title() and namespace().
TASK DETAIL
https://phabricator.wikimedia.org/T86623
REPLY HANDLER ACTIONS
Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: jayvdb
Cc: Aklapper, jayvdb, pywikipedia-bugs
Halfak added a comment.
I'd like to support this work on top of the MediaWiki-OAuth library. I'll commit to responding quickly re. necessary changes to support what's needed.
As for signing requests, https://github.com/wikimedia/MediaWiki-OAuth/blob/master/examples/request-o… shows how you can do that with requests_oauthlib and MediaWiki-OAuth. Note "auth=auth1" on line 41. 'requests' handles the rest.
@jayvdb I'm interested in co-mentoring. Please contact me about what kind of commitment you'd need.
TASK DETAIL
https://phabricator.wikimedia.org/T74065
REPLY HANDLER ACTIONS
Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: Halfak
Cc: pywikipedia-bugs, Krinkle, MZMcBride, jayvdb, Halfak, Nemo_bis, valhallasw, csteipp
yuvipanda added a comment.
I'm not sure if we should support daemonize. Jobs should just go on the grid instead.
TASK DETAIL
https://phabricator.wikimedia.org/T86015
REPLY HANDLER ACTIONS
Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: yuvipanda
Cc: pywikipedia-bugs, Aklapper, jayvdb, Ricordisamoa, yuvipanda, droid, scfc, coren