jenkins-bot has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/792993 )
Change subject: [dist] Show a deprecation warning when using PyMySQL < 0.7.11 ......................................................................
[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(-)
Approvals: DannyS712: Looks good to me, but someone else must approve Xqt: Looks good to me, approved jenkins-bot: Verified
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)
pywikibot-commits@lists.wikimedia.org