Xqt created this task.
Xqt added projects: Pywikibot-core, Pywikibot-General.
Herald added subscribers: pywikibot-bugs-list, Zoranzoki21, Aklapper.

TASK DESCRIPTION

Sample:

>>> from pywikibot.comms.eventstreams import EventStreams
>>> stream = EventStreams(stream='recentchange')
>>> stream.register_filter(foo=True, bar='baz')
>>> f, g = stream.filter['all']
>>> c = {'foo': True}
>>> f(c), g(c)
(False, False)
>>> c = {'bar': 'baz'}
>>> f(c), g(c)
(True, True)
>>> del streams

Expected result:

>>> f(c), g(c)
(True, False)
>>> c = {'bar': 'baz'}
>>> f(c), g(c)
(False, True)
>>>

whereas registering in single arguments works:

>>> stream = EventStreams(stream='recentchange')
>>> stream.register_filter(foo=True)
>>> stream.register_filter(bar='baz')
>>> f, g = stream.filter['all']
>>> c = {'foo': True}
>>> f(c), g(c)
(True, False)
>>> c = {'bar': 'baz'}
>>> f(c), g(c)
(False, True)
>>>

TASK DETAIL
https://phabricator.wikimedia.org/T188832

EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Xqt
Cc: Aklapper, Zoranzoki21, Xqt, pywikibot-bugs-list, Magul, Tbscho, rafidaslam, MayS, Mdupont, JJMC89, Avicennasis, jayvdb, Dalba, Masti, Alchimista, Rxy
_______________________________________________
pywikibot-bugs mailing list
pywikibot-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs

Reply via email to