jenkins-bot submitted this change.

View Change

Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
[mysql] Revert deprecation warning when using PyMySQL < 0.7.11

This partially reverts Change-Id: I550b7c56fcce1a5a50f8ea6d5a0c47b781f80dc3

The revert is made because current Toolforge installation supports
PyMySQL 0.7.10 currently and no warning should be printed in that case.

Bug: T216741
Change-Id: I0d436c4b5eca670c5ddfc86f3421528a72048160
---
M pywikibot/data/mysql.py
1 file changed, 3 insertions(+), 12 deletions(-)

diff --git a/pywikibot/data/mysql.py b/pywikibot/data/mysql.py
index da74f75..87117cd 100644
--- a/pywikibot/data/mysql.py
+++ b/pywikibot/data/mysql.py
@@ -1,8 +1,4 @@
-"""Miscellaneous helper functions for mysql queries.
-
-.. deprecated:: 7.0
- Support of pymysql < 0.7.11
-"""
+"""Miscellaneous helper functions for mysql queries."""
#
# (C) Pywikibot team, 2016-2021
#
@@ -16,7 +12,6 @@
import pywikibot
from pywikibot import config
from pywikibot.backports import removesuffix
-from pywikibot.tools import issue_deprecation_warning


try:
@@ -32,11 +27,10 @@

"""Representation of a socket with a mysql server.

- This class is used to patch close() method for pymysql<0.7.11 (T216741).
+ This class is used to patch close() method for pymysql<0.7.11 on
+ toolforge (T216741).

.. versionadded:: 7.0
- .. deprecated:: 7.0
- Update your pymysql package
"""

def close(self):
@@ -100,9 +94,6 @@
}

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.0.0')
connection = _OldConnection(**args, **credentials)
else:
connection = pymysql.connect(**args, **credentials)

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

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: I0d436c4b5eca670c5ddfc86f3421528a72048160
Gerrit-Change-Number: 750799
Gerrit-PatchSet: 3
Gerrit-Owner: Xqt <info@gno.de>
Gerrit-Reviewer: Dvorapa <dvorapa@seznam.cz>
Gerrit-Reviewer: Xqt <info@gno.de>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged