[Pywikipedia-bugs] [Maniphest] [Commented On] T188832: evenstreams filter doesn't register multiple arguments at one

2018-03-06 Thread gerritbot
gerritbot added a comment. Change 416239 merged by jenkins-bot: [pywikibot/core@master] [bugfix] Enable EventStreams filter for multiple arguments https://gerrit.wikimedia.org/r/416239TASK DETAILhttps://phabricator.wikimedia.org/T188832EMAIL

[Pywikipedia-bugs] [Maniphest] [Commented On] T188832: evenstreams filter doesn't register multiple arguments at one

2018-03-04 Thread Xqt
Xqt added a comment. changed test to callable(...)TASK DETAILhttps://phabricator.wikimedia.org/T188832EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: XqtCc: gerritbot, Mpaa, zhuyifei1999, valhallasw, Dalba, Ottomata, Aklapper, Zoranzoki21, Xqt,

[Pywikipedia-bugs] [Maniphest] [Commented On] T188832: evenstreams filter doesn't register multiple arguments at one

2018-03-04 Thread Xqt
Xqt added a comment. @Mpaa: Thanks for your proposal but the unittest fails then: FAIL: test_filter_settings (__main__.TestEventStreamsSettingTests) Test EventStreams filter settings. -- Traceback (most recent call last): File

[Pywikipedia-bugs] [Maniphest] [Commented On] T188832: evenstreams filter doesn't register multiple arguments at one

2018-03-03 Thread gerritbot
gerritbot added a comment. Change 416239 had a related patch set uploaded (by Xqt; owner: Xqt): [pywikibot/core@master] [bugfix] Enable EventStreams filter for multiple arguments https://gerrit.wikimedia.org/r/416239TASK DETAILhttps://phabricator.wikimedia.org/T188832EMAIL

[Pywikipedia-bugs] [Maniphest] [Commented On] T188832: evenstreams filter doesn't register multiple arguments at one

2018-03-03 Thread Mpaa
Mpaa added a comment. OK, I didn't see zhuyifei1999 answered as well while I was writing :-)TASK DETAILhttps://phabricator.wikimedia.org/T188832EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: Xqt, MpaaCc: Mpaa, zhuyifei1999, valhallasw, Dalba, Ottomata,

[Pywikipedia-bugs] [Maniphest] [Commented On] T188832: evenstreams filter doesn't register multiple arguments at one

2018-03-03 Thread Mpaa
Mpaa added a comment. I think it is because in for key, value in kwargs.items(): # append function for singletons if isinstance(value, (bool, type(None))): self.filter[ftype].append(lambda e: key in e and e[key] is value) ... the last key, value pair is

[Pywikipedia-bugs] [Maniphest] [Commented On] T188832: evenstreams filter doesn't register multiple arguments at one

2018-03-03 Thread zhuyifei1999
zhuyifei1999 added a comment. One way to solve this without using more lambdas: diff --git a/pywikibot/comms/eventstreams.py b/pywikibot/comms/eventstreams.py index a74baa1..b48ecc8 100644 --- a/pywikibot/comms/eventstreams.py +++ b/pywikibot/comms/eventstreams.py @@ -219,16 +219,16 @@ class

[Pywikipedia-bugs] [Maniphest] [Commented On] T188832: evenstreams filter doesn't register multiple arguments at one

2018-03-03 Thread zhuyifei1999
zhuyifei1999 added a comment. See also https://stackoverflow.com/q/7546285. It's indeed a hidden trap :(TASK DETAILhttps://phabricator.wikimedia.org/T188832EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: Xqt, zhuyifei1999Cc: zhuyifei1999, valhallasw, Dalba,

[Pywikipedia-bugs] [Maniphest] [Commented On] T188832: evenstreams filter doesn't register multiple arguments at one

2018-03-03 Thread zhuyifei1999
zhuyifei1999 added a comment. In T188832#4021015, @Xqt wrote: I have no glue why the current implementation doesn't work. Variable scopes. diff --git a/pywikibot/comms/eventstreams.py b/pywikibot/comms/eventstreams.py index a74baa1..e5ccd9c 100644 --- a/pywikibot/comms/eventstreams.py +++