Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions pywikibot/comms/eventstreams.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,18 @@
pip install sseclient
"""
#
# (C) xqt, 2017
# (C) Pywikibot team, 2017
# (C) xqt, 2017-2018
# (C) Pywikibot team, 2017-2018
#
# Distributed under the terms of the MIT license.
#
from __future__ import absolute_import, unicode_literals

from distutils.version import LooseVersion
import json
import socket

import requests
from requests.packages.urllib3.exceptions import ProtocolError
from requests.packages.urllib3.response import httplib

Expand All @@ -29,6 +31,12 @@
from pywikibot import config, debug, Site, warning
from pywikibot.tools import StringTypes

if LooseVersion(requests.__version__) < LooseVersion('2.9'):
raise ImportError(
'requests >= 2.9 is required for EventStreams;\n'
"install it with 'pip install \"requests>=2.9,!=2.18.2\"'\n")


_logger = 'pywikibot.eventstreams'


Expand Down
2 changes: 1 addition & 1 deletion requests-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
requests>=2.4.1,!=2.18.2
requests>=2.9,!=2.18.2

# requests security extra
# Bug T105767 on Python 2.7 release 9+
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
# $ awk -F '[#>=]' '{print $1}' requirements.txt | xargs apt-cache search

# mandatory; see README.conversion.txt
requests>=2.4.1,!=2.18.2
requests>=2.9,!=2.18.2

# requests security extra
cryptography>=1.3.4 ; python_version != '2.6' and python_full_version < '2.7.9'
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def python_is_supported():

test_deps = ['bz2file', 'mock']

dependencies = ['requests!=2.18.2']
dependencies = ['requests>=2.9,!=2.18.2']

# the irc module has no Python 2.6 support since 10.0
irc_dep = 'irc==8.9' if sys.version_info < (2, 7) else 'irc'
Expand Down