jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/374002 )
Change subject: EventStreams.__doc__: Change `iter(stream).next` to `next(iter(stream))` ......................................................................
EventStreams.__doc__: Change `iter(stream).next` to `next(iter(stream))`
Python 3 generators don't have the next method. Use the built-in next function.
Change-Id: Iecf55f31ab41a6d2eb7fe0e23a544d2a40d3e408 --- M pywikibot/comms/eventstreams.py 1 file changed, 1 insertion(+), 1 deletion(-)
Approvals: jenkins-bot: Verified Xqt: Looks good to me, approved
diff --git a/pywikibot/comms/eventstreams.py b/pywikibot/comms/eventstreams.py index 0c8aece..061f4ac 100644 --- a/pywikibot/comms/eventstreams.py +++ b/pywikibot/comms/eventstreams.py @@ -42,7 +42,7 @@ Usage:
>>> stream = EventStreams(stream='recentchange') - >>> change = iter(stream).next() + >>> change = next(iter(stream)) >>> change {'comment': '/* wbcreateclaim-create:1| */ [[Property:P31]]: [[Q4167836]]', 'wiki': 'wikidatawiki', 'type': 'edit', 'server_name': 'www.wikidata.org',
pywikibot-commits@lists.wikimedia.org