jenkins-bot has submitted this change. (
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/985362 )
Change subject: require PyMySQL >= 1.0.0
......................................................................
require PyMySQL >= 1.0.0
With Toolforge removing SGE, we are no longer restricted to what
is available on the grid nodes
Change-Id: Id5d5b8f8c50ed2d0e005a83c75a500f2f96ffff1
---
M setup.py
M pywikibot/data/mysql.py
M requirements.txt
3 files changed, 14 insertions(+), 11 deletions(-)
Approvals:
JJMC89: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pywikibot/data/mysql.py b/pywikibot/data/mysql.py
index ea05772..6193a4d 100644
--- a/pywikibot/data/mysql.py
+++ b/pywikibot/data/mysql.py
@@ -6,11 +6,8 @@
#
from __future__ import annotations
-import pkg_resources
-
import pywikibot
from pywikibot import config
-from pywikibot.backports import removesuffix
try:
@@ -55,8 +52,6 @@
else:
credentials = {'read_default_file': config.db_connect_file}
- pymysql_version = pkg_resources.parse_version(
- removesuffix(pymysql.__version__, '.None'))
args = {
'host': config.db_hostname_format.format(dbname),
'database': config.db_name_format.format(dbname),
@@ -66,9 +61,6 @@
}
connection = pymysql.connect(**args, **credentials)
- if pymysql_version < pkg_resources.parse_version('1.0.0'):
- from contextlib import closing
- connection = closing(connection)
with connection as conn, conn.cursor() as cursor:
if verbose:
diff --git a/requirements.txt b/requirements.txt
index b96e57c..ff2d96d 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -47,8 +47,7 @@
sseclient >= 0.0.18,< 0.0.23
# The mysql generator in pagegenerators depends on PyMySQL
-# toolforge uses 0.9.3
-PyMySQL >= 0.9.3
+PyMySQL >= 1.0.0
# core HTML comparison parser in diff module
beautifulsoup4>=4.7.1
diff --git a/setup.py b/setup.py
index 74957b6..c5da297 100755
--- a/setup.py
+++ b/setup.py
@@ -44,7 +44,7 @@
'Google': ['google>=1.7'],
'memento': ['memento_client==0.6.1'],
'wikitextparser': ['wikitextparser>=0.47.0'],
- 'mysql': ['PyMySQL >= 0.9.3'], # toolforge
+ 'mysql': ['PyMySQL >= 1.0.0'],
# vulnerability found in Pillow<8.1.2 but toolforge uses 5.4.1
'Tkinter': ['Pillow>=8.1.2, != 10.0, != 10.1'],
'mwoauth': ['mwoauth!=0.3.1,>=0.2.4'],
--
To view, visit https://gerrit.wikimedia.org/r/c/pywikibot/core/+/985362
To unsubscribe, or for help writing mail filters, visit
https://gerrit.wikimedia.org/r/settings
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: Id5d5b8f8c50ed2d0e005a83c75a500f2f96ffff1
Gerrit-Change-Number: 985362
Gerrit-PatchSet: 3
Gerrit-Owner: JJMC89 <[email protected]>
Gerrit-Reviewer: JJMC89 <[email protected]>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged
_______________________________________________
Pywikibot-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]