jayvdb created this task. jayvdb added a subscriber: jayvdb. jayvdb added projects: pywikibot-core, Pywikibot-pagegenerators. jayvdb changed Security from none to none.
TASK DESCRIPTION The pagegenerator LogpagesPageGenerator exists in the old compat codebase, and needs to be copied and possibly re-worked to exist in the new codebase.
old code:
http://git.wikimedia.org/blob/pywikibot%2Fcompat.git/64f6f0671646506863b6582...
TASK DETAIL https://phabricator.wikimedia.org/T76555
REPLY HANDLER ACTIONS Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
To: jayvdb Cc: Aklapper, jayvdb, pywikipedia-bugs
jayvdb added a comment.
and the command line usage
http://git.wikimedia.org/blob/pywikibot%2Fcompat.git/64f6f0671646506863b6582...
note in core site.logpages is called site.logevents
TASK DETAIL https://phabricator.wikimedia.org/T76555
REPLY HANDLER ACTIONS Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
To: jayvdb Cc: Aklapper, jayvdb, pywikipedia-bugs
jayvdb moved this task to New generators on the Pywikibot-pagegenerators workboard.
TASK DETAIL https://phabricator.wikimedia.org/T76555
REPLY HANDLER ACTIONS Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
To: jayvdb Cc: Aklapper, jayvdb, pywikipedia-bugs
jayvdb added a comment.
Added as a CGI task. https://www.google-melange.com/gci/task/edit/google/gci2014/5043131036729344
TASK DETAIL https://phabricator.wikimedia.org/T76555
REPLY HANDLER ACTIONS Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
To: jayvdb Cc: Aklapper, jayvdb, pywikipedia-bugs
jayvdb moved this task to Ready to go on the pywikibot-core workboard.
TASK DETAIL https://phabricator.wikimedia.org/T76555
REPLY HANDLER ACTIONS Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
To: jayvdb Cc: Aklapper, jayvdb, pywikipedia-bugs
Daviskr added a subscriber: Daviskr. Daviskr added a comment.
I am porting the code over and assuming `logpages()` changes to `logevents()` [site.py]. When adapting the arguments from `LogpagesPageGenerator`, I assumed that `number` changes to `total` but two other arguments (`namespace` and `repeat`) seem to not fit in.
The port of the generator below this (`NewpagesPageGenerator`) ended up deprecating the `repeat` argument all together and changing `namespace` to `namespaces` and passing it to the respective `recentchanges()` [site.py] and then to `_generator()` as an argument of `spaces`.
`logevents()` does not accept `namespaces` as an arguments. So, should I change `logevents()` to accept a `namespaces` argument?
TASK DETAIL https://phabricator.wikimedia.org/T76555
REPLY HANDLER ACTIONS Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
To: Daviskr Cc: Aklapper, jayvdb, Daviskr, pywikipedia-bugs
XZise added a subscriber: XZise. XZise added a comment.
As `action=query&list=logevents` support namespaces I'd suggest that `APISite.logevents` does support it too (unless there is a reason not to).
And `repeat` is afaik replaced by `RepeatingGenerator` so you could drop the parameter as well (via `@deprecated_args`).
TASK DETAIL https://phabricator.wikimedia.org/T76555
REPLY HANDLER ACTIONS Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
To: XZise Cc: Aklapper, jayvdb, Daviskr, XZise, pywikipedia-bugs
jayvdb added a comment.
(repeating and agreeing with a lot of what XZise has already said)
All great deductions. repeat was previously (compat) a capability of every generator, which is not very modular and they all only provided very basic repeat functionality; in core, we've decided that isnt desirable , so we have built RepeatingGenerator (which has many options and usage patterns) and there is another 'repeat' like capability being built.
Yes, we will need to implement a namespace argument in APISite.logevents, both for backwards compatibility and because the MediaWiki PHP API method accepts a namespace argument (singular; not plural), so we need expose that in the Python API.
https://en.wikipedia.org/w/api.php?action=paraminfo&modules=query+logeve...
I recommend you initially build LogpagesPageGenerator with namespace as a parameter that is not implemented , build unit tests, etc, submit the code to be reviewed, and then add the namespace functionality after the initial code reviews.
TASK DETAIL https://phabricator.wikimedia.org/T76555
REPLY HANDLER ACTIONS Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
To: jayvdb Cc: Aklapper, jayvdb, Daviskr, XZise, pywikipedia-bugs
gerritbot added a project: Patch-For-Review. gerritbot added a comment.
Change 178773 had a related patch set uploaded (by Daviskr): Add LogpagesPageGenerator
[[https://gerrit.wikimedia.org/r/178773]]
#patch-for-review
TASK DETAIL https://phabricator.wikimedia.org/T76555
REPLY HANDLER ACTIONS Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
To: gerritbot Cc: Aklapper, jayvdb, Daviskr, XZise, pywikipedia-bugs
gerritbot added a comment.
Change 178773 merged by jenkins-bot: Add LogeventsPageGenerator, LogpagesPageGenerator
https://gerrit.wikimedia.org/r/178773
TASK DETAIL https://phabricator.wikimedia.org/T76555
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: gerritbot Cc: Aklapper, jayvdb, Daviskr, XZise, pywikipedia-bugs
Daviskr added a comment.
Build Passed https://travis-ci.org/wikimedia/pywikibot-core/builds/43673202
TASK DETAIL https://phabricator.wikimedia.org/T76555
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: Daviskr Cc: Aklapper, jayvdb, Daviskr, XZise, pywikipedia-bugs
Daviskr closed this task as "Resolved".
TASK DETAIL https://phabricator.wikimedia.org/T76555
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: Daviskr Cc: Aklapper, jayvdb, Daviskr, XZise, pywikipedia-bugs
jayvdb added a project: Google-Code-in-2014.
TASK DETAIL https://phabricator.wikimedia.org/T76555
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, Daviskr, XZise, pywikipedia-bugs
pywikipedia-bugs@lists.wikimedia.org