Xqt added a comment.
I made a simple test for sseclient.EventSource (see above).
It fails as expected with sseclient 0.0.24 but passes with 0.0.22:
C:\pwb\GIT\core>pip install "sseclient == 0.0.24"
Collecting sseclient==0.0.24
...
Successfully installed sseclient-0.0.24
C:\pwb\GIT\core>pwb eventstreams_tests -v TestEventSource
tests: max_retries reduced from 15 to 1
test_stream (__main__.TestEventSource)
Verify that the EventSource delivers events without problems. ... ERROR
======================================================================
ERROR: test_stream (__main__.TestEventSource)
Verify that the EventSource delivers events without problems.
----------------------------------------------------------------------
Traceback (most recent call last):
File ".\tests\eventstreams_tests.py", line 270, in __iter__
element = json.loads(event.data)
File "C:\python37\lib\json\__init__.py", line 348, in loads
return _default_decoder.decode(s)
File "C:\python37\lib\json\decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "C:\python37\lib\json\decoder.py", line 353, in raw_decode
obj, end = self.scan_once(s, idx)
json.decoder.JSONDecodeError: Unterminated string starting at: line 1
column 226
(char 225)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File ".\tests\eventstreams_tests.py", line 298, in test_stream
self.assertLength(list(self.es), limit)
File ".\tests\eventstreams_tests.py", line 277, in __iter__
.format(number=n, event=event, error=e))
ValueError: Unterminated string starting at: line 1 column 226 (char 225)
Event no 6: Could not load json data from source
${"bot":false,"comment":"/* wbcreateclaim-create:1| */ [[Property:P31]]:
[[Q4167
836]],
#quickstatements","id":974515190,"length":{"new":1240,"old":810},"meta":{
"domain":"www.wikidata.org","dt":"2019-05-09T18:58:19+00:00","id":"68c158bc-728c
$
----------------------------------------------------------------------
Ran 1 test in 0.964s
FAILED (errors=1)
C:\pwb\GIT\core>pip install "sseclient == 0.0.22"
Collecting sseclient==0.0.22
...
Successfully installed sseclient-0.0.22
C:\pwb\GIT\core>pwb eventstreams_tests -v TestEventSource
tests: max_retries reduced from 15 to 1
test_stream (__main__.TestEventSource)
Verify that the EventSource delivers events without problems. ... ok
----------------------------------------------------------------------
Ran 1 test in 2.723s
OK
C:\pwb\GIT\core>
TASK DETAIL
https://phabricator.wikimedia.org/T222885
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: Xqt
Cc: Ottomata, Aklapper, pywikibot-bugs-list, Dvorapa, Xqt, joker88john, Viztor,
DannyS712, CucyNoiD, NebulousIris, Wenyi, Gaboe420, Versusxo,
Majesticalreaper22, Giuliamocci, Adrian1985, Cpaulf30, Baloch007,
Darkminds3113, Bsandipan, Lordiis, Adik2382, Th3d3v1ls, Ramalepe, Liugev6,
Tbscho, MayS, WSH1906, Lewizho99, Mdupont, JJMC89, Maathavan, Avicennasis,
mys_721tx, jayvdb, Dalba, Masti, Alchimista, Rxy, Krenair
_______________________________________________
pywikibot-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs