jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/462128 )
Change subject: [bugfix] re-enable notifications ......................................................................
[bugfix] re-enable notifications
- "text" value for notformat parameter is no longer available and there is not hint when this was dropped. Use 'special' instead. - "format" keyword may also be None which does not return the content values. - "prop" parameter is "list" by default.
Bug: T205184 Change-Id: Id05ee852b6f8ce0ad5aeb842f9d5a1f8e033b7e3 --- M pywikibot/site.py 1 file changed, 12 insertions(+), 5 deletions(-)
Approvals: Framawiki: Looks good to me, approved jenkins-bot: Verified
diff --git a/pywikibot/site.py b/pywikibot/site.py index c4a97e5..dea582c 100644 --- a/pywikibot/site.py +++ b/pywikibot/site.py @@ -2321,16 +2321,23 @@
@need_extension('Echo') def notifications(self, **kwargs): - """Yield Notification objects from the Echo extension.""" + """Yield Notification objects from the Echo extension. + + keyword format: If specified, notifications will be returned formatted + this way. Its value is either 'model', 'special' or None. Default + is 'special'. + type format: str or None + + Refer API reference for other keywords. + """ params = { 'action': 'query', 'meta': 'notifications', - 'notprop': 'list', - 'notformat': 'text', + 'notformat': 'special', }
- for key in kwargs: - params['not' + key] = kwargs[key] + for key, value in kwargs.items(): + params['not' + key] = value
data = self._simple_request(**params).submit() notifications = data['query']['notifications']['list']
pywikibot-commits@lists.wikimedia.org