jenkins-bot has submitted this change. ( 
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1361160?usp=email )

Change subject: cleanup: remove Python 3.9 deprecation warning
......................................................................

cleanup: remove Python 3.9 deprecation warning

Bug: T423572
Change-Id: I3280f587ebea938b0d3ab3a358790926ffbc4999
---
M pwb.py
M tests/utils.py
2 files changed, 0 insertions(+), 25 deletions(-)

Approvals:
  jenkins-bot: Verified
  Mahveotm: Looks good to me, approved




diff --git a/pwb.py b/pwb.py
index a841a5b..a10fd76 100755
--- a/pwb.py
+++ b/pwb.py
@@ -19,24 +19,12 @@
 This version of Pywikibot only supports Python 3.10+.
 """

-DEPRECATED_PYTHON_MESSAGE = """
-
-Python {version} will be dropped soon with Pywikibot 12.
-It is recommended to use Python 3.10 or above.
-See phab:T423572 for further information.
-"""
-

 def python_is_supported():
     """Check that Python is supported."""
     return sys.version_info[:3] >= (3, 10)


-def python_is_deprecated():
-    """Check that Python is deprecated."""
-    return sys.version_info[:3] < (3, 10)
-
-
 if not python_is_supported():  # pragma: no cover
     sys.exit(VERSIONS_REQUIRED_MESSAGE.format(version=sys.version))

@@ -48,13 +36,5 @@
     runpy.run_path(str(path), run_name='__main__')


-if python_is_deprecated():
-    import warnings
-    msg = DEPRECATED_PYTHON_MESSAGE.format(
-        version=sys.version.split(maxsplit=1)[0])
-    warnings.warn(msg, FutureWarning)  # adjust this line no in utils.execute()
-    del warnings
-
-
 if __name__ == '__main__':
     sys.exit(main())
diff --git a/tests/utils.py b/tests/utils.py
index eda787b..532bba9 100644
--- a/tests/utils.py
+++ b/tests/utils.py
@@ -26,7 +26,6 @@
 from pywikibot.exceptions import APIError
 from pywikibot.login import LoginStatus
 from pywikibot.site import Namespace
-from pywikibot.tools import PYTHON_VERSION
 from pywikibot.tools.collections import EMPTY_DEFAULT
 from tests import _pwb_py

@@ -497,10 +496,6 @@
         captured stderr, and the :exc:`subprocess.TimeoutExpired`
         exception if the process timed out.
     """
-    if PYTHON_VERSION < (3, 10):
-        command.insert(1, '-W ignore::FutureWarning:pwb:55')
-        command.insert(1, '-W ignore::FutureWarning:__main__:55')
-
     env = os.environ.copy()

     # Prevent output by test package; e.g. 'max_retries reduced from x to y'

--
To view, visit 
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1361160?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.wikimedia.org/r/settings?usp=email

Gerrit-MessageType: merged
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: I3280f587ebea938b0d3ab3a358790926ffbc4999
Gerrit-Change-Number: 1361160
Gerrit-PatchSet: 2
Gerrit-Owner: Xqt <[email protected]>
Gerrit-Reviewer: Mahveotm <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
Pywikibot-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to