gerritbot added a comment.
Change 406579 merged by jenkins-bot:
[pywikibot/core@master] [bugfix] Update dependencies for eventstreams
https://gerrit.wikimedia.org/r/406579TASK DETAILhttps://phabricator.wikimedia.org/T184713EMAIL
Xqt added a comment.
I think this patch doesn't care current installations. Currently requests>=2.4.1 is required I guess for socket_timeout. If an older release is installed, config2.py patches it and the pwb is still working. Now we require 2.9 which is needed for sseclient. If an older release
Xqt added a comment.
@Dalba: It is required to use EventStreams after the last change on server side. I checked every release of requests and sseclient to find the right combination. Anyway it the requests < 2.9 the framework can be used except of EventStreams which either finds empty messages or
Dalba added a comment.
The default requests version available on Toolforge is 2.2.1. Is it OK to require 2.9?TASK DETAILhttps://phabricator.wikimedia.org/T184713EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: Xqt, DalbaCc: Dalba, Petrb, gerritbot, Framawiki,
Xqt added a comment.
I guess I have it. sseclient >= 0.0.18 and requests >= 2.9 should solve this problem.TASK DETAILhttps://phabricator.wikimedia.org/T184713EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: XqtCc: gerritbot, Framawiki, zhuyifei1999, Ottomata,
Xqt added a comment.
sseclient>=0.0.18 is required for py2TASK DETAILhttps://phabricator.wikimedia.org/T184713EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: XqtCc: gerritbot, Framawiki, zhuyifei1999, Ottomata, Aklapper, Xqt, pywikibot-bugs-list, Adrian1985,
gerritbot added a comment.
Change 406579 had a related patch set uploaded (by Xqt; owner: Xqt):
[pywikibot/core@master] [bugfix] requests>=2.9 is required for sse client
https://gerrit.wikimedia.org/r/406579TASK DETAILhttps://phabricator.wikimedia.org/T184713EMAIL
Xqt added a comment.
I found out that eventstreams/sseclient doesn't work with requests < 2.9 (for me)TASK DETAILhttps://phabricator.wikimedia.org/T184713EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: XqtCc: Framawiki, zhuyifei1999, Ottomata, Aklapper, Xqt,
Xqt added a comment.
I have requests 2.7.0 for my production environment; I get no response from sseclient because next(self.resp_iterator) is empty there. For the development environment I have requests 2.13.0. and I get an empty message from sseclient. sseclient is 0.0.18 for production and
Xqt added a comment.
I have no glue what is failing there. Our pagegenerators_tests on Travis ci works fine for all python versions. On the other hand I have two scripts running with EventStreams and both where failing yesterday about 18.00 after a reestablished connection. The framework codebase
Ottomata added a comment.
event.data in python 2 is an instance of unicode
Hm, you are right.
I'm not sure what is going on then. I can't really reproduce this either, but I'm just testing in Python, not with pywikibot.TASK DETAILhttps://phabricator.wikimedia.org/T184713EMAIL
zhuyifei1999 added a comment.
In T184713#3893484, @Ottomata wrote:
To fix on your side, you'd either: A. run in python3, where everything is utf-8 anyway, or B. change this line to say element = json.loads(event.data.decode('utf-8').
event.data in python 2 is an instance of unicode.
zhuyifei1999 added a comment.
I can't reproduce this locally with python2:
$ PYWIKIBOT2_NO_USER_CONFIG=1 python pwb.py shell
No handlers could be found for logger "pywiki"
Welcome to the Pywikibot interactive shell!
>>> import pwb, pywikibot
>>> from pywikibot.comms.eventstreams import
Xqt added a comment.
Here the sseclient dict itself:
{'buf': u'\x00\ufffd\ufffdm\x08\x01E\ufffd\x11\\K&=w\'\ufffd?\ufffd\ufffdP
Xqt added a comment.
The Event.__dict__ gives always:
{'data': '', 'event': 'message', 'id': None, 'retry': None}TASK DETAILhttps://phabricator.wikimedia.org/T184713EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: XqtCc: Ottomata, Aklapper, Xqt,
15 matches
Mail list logo