jenkins-bot has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/985360 )
Change subject: eventstreams: stop checking requests version ......................................................................
eventstreams: stop checking requests version
pywikibot requires requests>=2.21.0
Change-Id: I3525f7fee43280d5d45f86934229ec6e822b5692 --- M pywikibot/comms/eventstreams.py 1 file changed, 15 insertions(+), 10 deletions(-)
Approvals: JJMC89: Looks good to me, approved jenkins-bot: Verified
diff --git a/pywikibot/comms/eventstreams.py b/pywikibot/comms/eventstreams.py index e0b1f63..8618b87 100644 --- a/pywikibot/comms/eventstreams.py +++ b/pywikibot/comms/eventstreams.py @@ -19,8 +19,6 @@ import json from functools import partial
-from pkg_resources import parse_version -from requests import __version__ as requests_version from requests.packages.urllib3.exceptions import ProtocolError from requests.packages.urllib3.util.response import httplib
@@ -35,12 +33,6 @@ EventSource = e
-if parse_version(requests_version) < parse_version('2.20.1'): - raise ImportError( - 'requests >= 2.20.1 is required for EventStreams;\n' - "install it with 'pip install "requests>=2.20.1"'\n") - - class EventStreams(GeneratorWrapper):
"""Generator class for Server-Sent Events (SSE) protocol. @@ -142,8 +134,10 @@ parameter. """ if isinstance(EventSource, Exception): - raise ImportError('sseclient is required for EventStreams;\n' - 'install it with "pip install sseclient"\n') + raise ImportError( + 'sseclient is required for EventStreams;\n' + 'install it with "pip install sseclient==0.0.22"\n' + ) self.filter = {'all': [], 'any': [], 'none': []} self._total = None self._canary = kwargs.pop('canary', False)
pywikibot-commits@lists.wikimedia.org