jenkins-bot submitted this change.
requirements: require requests >= 2.31.0 due to security issues
Bug: T347031
Change-Id: I9d4e9ad12504bdb3111a0298ec537a00d118f5a5
---
M pywikibot/data/sparql.py
M pywikibot/site_detect.py
M setup.py
3 files changed, 3 insertions(+), 12 deletions(-)
diff --git a/pywikibot/data/sparql.py b/pywikibot/data/sparql.py
index 8086052..02508ec 100644
--- a/pywikibot/data/sparql.py
+++ b/pywikibot/data/sparql.py
@@ -9,6 +9,7 @@
from textwrap import fill
from urllib.parse import quote
+from requests import JSONDecodeError
from requests.exceptions import Timeout
from pywikibot import Site
@@ -18,11 +19,6 @@
from pywikibot.exceptions import Error, NoUsernameError, ServerError
-try:
- from requests import JSONDecodeError
-except ImportError: # requests < 2.27.0
- from json import JSONDecodeError
-
DEFAULT_HEADERS = {'cache-control': 'no-cache',
'Accept': 'application/sparql-results+json'}
diff --git a/pywikibot/site_detect.py b/pywikibot/site_detect.py
index 8613f88..f1b2256 100644
--- a/pywikibot/site_detect.py
+++ b/pywikibot/site_detect.py
@@ -13,6 +13,7 @@
from http import HTTPStatus
from urllib.parse import urljoin, urlparse
+from requests import JSONDecodeError
from requests.exceptions import RequestException
import pywikibot
@@ -22,12 +23,6 @@
from pywikibot.tools import MediaWikiVersion
-try:
- from requests import JSONDecodeError
-except ImportError: # requests < 2.27.0
- from json import JSONDecodeError
-
-
SERVER_DB_ERROR_MSG = \
'<h1>Sorry! This site is experiencing technical difficulties.</h1>'
diff --git a/setup.py b/setup.py
index 6c6e4c2..8694594 100755
--- a/setup.py
+++ b/setup.py
@@ -75,7 +75,7 @@
dependencies = [
'mwparserfromhell>=0.5.2',
'packaging',
- 'requests>=2.21.0',
+ 'requests>=2.31.0',
]
# ------- setup tests_require ------- #
To view, visit change 1101467. To unsubscribe, or for help writing mail filters, visit settings.