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

Change subject: cleanup:  drop support for Python 3.8
......................................................................

cleanup:  drop support for Python 3.8

- remove Python 3.8 code from tools.collections.py and scripts/archivebot.py
- update documentation

Bug: T401802
Change-Id: Ic9665a96ff29f96b25b413ad01721a7a2025c5c7
---
M HISTORY.rst
M ROADMAP.rst
M docs/compatibility.rst
M docs/index.rst
M pywikibot/README.rst
M pywikibot/tools/collections.py
M scripts/CHANGELOG.rst
M scripts/archivebot.py
8 files changed, 62 insertions(+), 81 deletions(-)

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




diff --git a/HISTORY.rst b/HISTORY.rst
index ce530c7..fcea1de 100644
--- a/HISTORY.rst
+++ b/HISTORY.rst
@@ -263,7 +263,6 @@
 * Require ``requests >= 2.31.0`` (:phab:`T347031`).
 * Python 3.7 support was dropped (:phab:`T378893`), including 
*importlib_metadata* of
   :mod:`backports`.
-* See also Current Deprecations below.


 9.6.3
diff --git a/ROADMAP.rst b/ROADMAP.rst
index e746905..bae4daf 100644
--- a/ROADMAP.rst
+++ b/ROADMAP.rst
@@ -2,25 +2,37 @@
 ===========================

 **Improvements**
+
 * (no changes yet)

 **Bugfixes**
-* (no changes yet)
+
+* Import ``typing.cast`` in :mod:`_wbtypes` module to prevent ``NameError`` in
+  :class:`pywikibot.WbTime`

 **Code cleanups**
-* (no changes yet)
+
+* Several typing types were removed from :mod:`backports`.
+* The ``cache`` decorator was removed from :mod:`backports`. The 
:pylib:`@functools.cache()
+  <functools#functools.cache>` can be used instead. (:phab:`T401802`)
+* The functions ``removeprefix`` and ``removesuffix`` were removed from 
:mod:`backports`. The
+  :pylib:`stdlib methods<stdtypes.html#str.removeprefix>` can be used instead. 
(:phab:`T401802`)

 **Other breaking changes**
-* (no changes yet)
+
+* Package requirements were updated (``wikitextparser``, ``mwoauth``, 
``pydot``, ``python-stdnum``,
+  ``Pillow``, ``requests-sse``, ``PyMySQL``, ``beautifulsoup4``, 
``fake-useragent``)
+* Python 3.8 support was dropped. (:phab:`T401802`)
+* Remove predefined ``yu-tld`` fix in :mod`fixes`. (:phab:`T402088`)
 
 Deprecations
 ============

 This section lists features, methods, parameters, or attributes that are 
deprecated
-and scheduled for removal in future Pywikibot releases.
+and scheduled for removal in future Pywikibot releases.

 Deprecated items may still work in the current release but are no longer 
recommended for use.
-Users should update their code according to the recommended alternatives.
+Users should update their code according to the recommended alternatives.

 Pywikibot follows a clear deprecation policy: features are typically 
deprecated in one release and
 removed in in the third subsequent major release, remaining available for the 
two releases in between.
diff --git a/docs/compatibility.rst b/docs/compatibility.rst
index 9158fac..46231db 100644
--- a/docs/compatibility.rst
+++ b/docs/compatibility.rst
@@ -4,44 +4,35 @@

 This page summarizes Pywikibot compatibility with Python and MediaWiki 
versions.

-Python version support
-======================
+Python and MediaWiki version support
+====================================

-Released Pywikibot versions support all Python versions that are actively 
maintained
-at the time of the release:
+Released Pywikibot versions support all actively maintained Python and 
MediaWiki
+versions at the time of release:

-=================  ===================== ====
-Pywikibot version  Python version        PyPy
-=================  ===================== ====
-10.0+              3.8–3.14              Yes
-9.0+               3.7–3.13              Yes
-8.0+               3.6.1–3.12            Yes
-7.0+               3.5.3–3.11            Yes
-4.0+               3.5–3.8               No
-3.0.20190301+      2.7.4–2.7.18, 3.4–3.8 No
-3.0.20180403+      2.7.2–2.7.18, 3.4–3.8 No
-3.0+               2.6–2.7.18, 3.3–3.8   No
-2.0                2.7, 3.3–3.5          No
-1.0                2.5–2.7               No
-=================  ===================== ====
+=================  ===================== ====  =================  
================
+Pywikibot version  Python version        PyPy  MediaWiki version  1st Release 
Date
+=================  ===================== ====  =================  
================
+11.0+              3.9–3.15              ✅    1.31–1.45          2025
+10.0–10.7          3.8–3.14              ✅    1.31–1.44          2025-03-01
+9.0–9.6.3          3.7–3.13              ✅    1.27–1.42          2024-03-08
+8.0–8.6            3.6.1–3.12            ✅    1.27–1.41          2023-01-21
+7.0–7.7.3          3.5.3–3.11            ✅    1.23–1.39          2022-02-26
+6.0–6.6.5          3.5–3.10              ❌    1.23–1.37          2021-03-16
+5.0–5.6            3.5–3.10              ❌    1.19–1.36          2020-10-19
+4.0–4.3            3.5–3.9               ❌    1.14–1.36          2020-08-04
+3.0.20190301+      2.7.4–2.7.18, 3.4–3.8 ❌    1.14–1.33          2019-03-01
+3.0.20180403+      2.7.2–2.7.18, 3.4–3.8 ❌    1.14–1.31          2018-04-03
+3.0.20170403+      2.6–2.7.18, 3.3–3.8   ❌    1.14–1.29          2017-04-04
+2.0                2.7, 3.3–3.5          ❌    1.14–1.25          2015-05-25
+1.0                2.5–2.7               ❌    1.2–1.24           2003–2016
+=================  ===================== ====  =================  
================

-`Status of Python versions <https://devguide.python.org/versions/>`__.
+.. note::
+   All versions listed refer to the **stable releases**. Early releases before
+   version 3.0 were considered "perpetual beta". The first Pywikibot package,
+   formerly known as Pywikipediabot, is also called "trunk" or a "compat" 
release.

-Mediawiki version support
-=========================
-
-Released Pywikibot versions support all MediaWiki versions that are actively 
maintained
-at the time of the release:
-
-=================  =================
-Pywikibot version  MediaWiki version
-=================  =================
-10.0+              1.31–1.44
-9.0+               1.27–1.42
-8.0+               1.27–1.40
-7.0+               1.23–1.38
-6.0+               1.23–1.36
-5.0+               1.19–1.36
-=================  =================
-
-`Status of MediaWiki versions 
<https://www.mediawiki.org/wiki/Version_lifecycle>`__.
+.. seealso::
+   - `Status of Python versions <https://devguide.python.org/versions/>`__
+   - `Status of MediaWiki versions 
<https://www.mediawiki.org/wiki/Version_lifecycle>`__.
diff --git a/docs/index.rst b/docs/index.rst
index 1673cd2..f1c0712 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -21,8 +21,7 @@
 whether you have Python installed and to find its version, just type
 ``python`` at the CMD or shell prompt.

-Python 3.8 or higher is currently required to run the bot but Python 3.9 or
-higher is recommended. Python 3.8 support will be dropped with Pywikibot 11 
soon.
+Python 3.9 or higher is currently required to run the bot.

 Pywikibot and this documentation are licensed under the
 :ref:`MIT license`;
diff --git a/pywikibot/README.rst b/pywikibot/README.rst
index 0de4358..959af38 100644
--- a/pywikibot/README.rst
+++ b/pywikibot/README.rst
@@ -17,17 +17,10 @@
 **External software can be used with Pywikibot:**
   * Pydot, Pyparsing and Graphviz for use with interwiki_graph.py
   * PyMySQL to access MySQL database for use with pagegenerators.py
-  * google to access Google Web API for use with pagegenerators.py
+  * googlesearch-python to access Google Web API for use with pagegenerators.py


-Pywikibot makes use of some modules that are part of python, but that
-are not installed by default on some Linux distributions:
-
-  * python-xml (required to parse XML via SaX2)
-  * python-tkinter (optional, used by some experimental GUI stuff)
-
-
-You need to have at least Python version `3.8 
<https://www.python.org/downloads/>`_
+You need to have at least Python version `3.9 
<https://www.python.org/downloads/>`_
 or newer installed on your computer to be able to run any of the code in this
 package. Please refer the manual at mediawiki for further details and
 restrictions.
diff --git a/pywikibot/tools/collections.py b/pywikibot/tools/collections.py
index a04e0e0..4ea3d87 100644
--- a/pywikibot/tools/collections.py
+++ b/pywikibot/tools/collections.py
@@ -15,11 +15,7 @@
 from typing import Any, NamedTuple

 from pywikibot.exceptions import ArgumentDeprecationWarning
-from pywikibot.tools import (
-    PYTHON_VERSION,
-    deprecated_args,
-    issue_deprecation_warning,
-)
+from pywikibot.tools import deprecated_args, issue_deprecation_warning


 __all__ = (
@@ -313,8 +309,7 @@
             self._started_gen.throw(value)
             return

-        if PYTHON_VERSION > (3, 8) and not (value is None
-                                            and traceback is None):
+        if value is not None or traceback is not None:
             # Old-style (type, value, traceback) signature
             issue_deprecation_warning(
                 'The (type, value, traceback) signature of throw()',
diff --git a/scripts/CHANGELOG.rst b/scripts/CHANGELOG.rst
index 7c1c04c..053ed91 100644
--- a/scripts/CHANGELOG.rst
+++ b/scripts/CHANGELOG.rst
@@ -1,6 +1,12 @@
 Scripts Changelog
 =================

+11.0.0
+------
+
+* ``create_isbn_edition`` script was removed from scripts package 
(:phab:`T398140`)
+
+
 10.7.0
 ------

diff --git a/scripts/archivebot.py b/scripts/archivebot.py
index e1c90d1..2886388 100755
--- a/scripts/archivebot.py
+++ b/scripts/archivebot.py
@@ -218,7 +218,6 @@
     to_local_digits,
 )
 from pywikibot.time import MW_KEYS, parse_duration, str2timedelta
-from pywikibot.tools import PYTHON_VERSION
 from pywikibot.tools.threading import BoundedPoolExecutor


@@ -1107,31 +1106,18 @@

         botargs = tmpl, salt, force, keep, sort
         botkwargs = {'asynchronous': asynchronous}
-        futures = []  # needed for Python < 3.9
         with context as executor:
             for pg in gen:
                 if asynchronous:
-                    future = executor.submit(
-                        process_page, pg, *botargs, **botkwargs)
+                    executor.submit(process_page, pg, *botargs, **botkwargs)

-                    if PYTHON_VERSION < (3, 9):
-                        futures.append(future)
-
-                    if not exiting.is_set():
-                        continue
-
-                    pywikibot.info(
-                        '<<lightyellow>>Canceling pending Futures...')
-
-                    if PYTHON_VERSION < (3, 9):
-                        canceled = sum(future.cancel() for future in futures)
-                        pywikibot.info(f'{canceled} canceled')
-                    else:
+                    if exiting.is_set():
+                        pywikibot.info(
+                            '<<lightyellow>>Canceling pending Futures...')
                         executor.shutdown(cancel_futures=True)
+                        break

-                    break
-
-                if not process_page(pg, *botargs, **botkwargs):
+                elif not process_page(pg, *botargs, **botkwargs):
                     break



--
To view, visit 
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1200609?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: Ic9665a96ff29f96b25b413ad01721a7a2025c5c7
Gerrit-Change-Number: 1200609
Gerrit-PatchSet: 4
Gerrit-Owner: Xqt <[email protected]>
Gerrit-Reviewer: Xqt <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
Pywikibot-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to