jenkins-bot submitted this change.

View Change

Approvals: DannyS712: Looks good to me, but someone else must approve Xqt: Looks good to me, approved jenkins-bot: Verified
[dist] Show a deprecation warning when using PyMySQL < 0.7.11

0.7.10 support was held due to the preinstalled package on toolforge.
With the migration from Stretch to Bastion Pywikibot 3.7.3 is present
and supported PyMySQL version is 0.9.3. The old code will be removed
with Pywikibot 8.

This reverts commit 5e3a5c392329eddb3661e19776493a10bbdbb7b3.

Bug: T216741
Change-Id: I5c601399c4c20939762b88de2538b0598a6a98d4
---
M pywikibot/data/mysql.py
1 file changed, 6 insertions(+), 0 deletions(-)

diff --git a/pywikibot/data/mysql.py b/pywikibot/data/mysql.py
index 69fd036..f5ef7d9 100644
--- a/pywikibot/data/mysql.py
+++ b/pywikibot/data/mysql.py
@@ -12,6 +12,7 @@
import pywikibot
from pywikibot import config
from pywikibot.backports import removesuffix
+from pywikibot.tools import issue_deprecation_warning


try:
@@ -31,6 +32,8 @@
toolforge (:phab:`T216741`).

.. versionadded:: 7.0
+ .. deprecated:: 7.4
+ Update your pymysql package
"""

def close(self) -> None: # pragma: no cover
@@ -94,6 +97,9 @@
}

if pymysql_version < pkg_resources.parse_version('0.7.11'):
+ issue_deprecation_warning(
+ 'pymysql package release {}'.format(pymysql_version),
+ instead='pymysql >= 0.7.11', since='7.4.0')
connection = _OldConnection(**args, **credentials)
else:
connection = pymysql.connect(**args, **credentials)

To view, visit change 792993. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: I5c601399c4c20939762b88de2538b0598a6a98d4
Gerrit-Change-Number: 792993
Gerrit-PatchSet: 4
Gerrit-Owner: Xqt <info@gno.de>
Gerrit-Reviewer: DannyS712 <dannys712.wiki@gmail.com>
Gerrit-Reviewer: Dvorapa <dvorapa@seznam.cz>
Gerrit-Reviewer: Xqt <info@gno.de>
Gerrit-Reviewer: Zhuyifei1999 <zhuyifei1999@gmail.com>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged