Xqt created this task.
Xqt added projects: Pywikibot, Pywikibot-Announce.
Restricted Application added subscribers: pywikibot-bugs-list, Aklapper.

TASK DESCRIPTION
  Proposal
  --------
  
  The last main release Pywikibot 10 was released in March 2024. I propose to 
**drop support for Python 3.8 with Pywikibot 11**, which will likely be 
deployed at the end of 2025 or later.  Python 3.8 reached EOL in October 2024 
(1) <https://devguide.python.org/versions/>. A warning message will be added in 
Pywikibot 10.5 (October 2025). The current download statistic of the last 6 
months is as follows (2) 
<https://pypistats.org/api/packages/pywikibot/python_minor> (API currently not 
reachable):
  
  **Pywikibot downloads by Python version** (last 6 months) — July 2025
  
  | **Python** | **%** | **rank** |
  | 3.15       | 0.0   |          |
  | 3.14       | 0.0   |          |
  | 3.13       | 1.9   |          |
  | //3.12//   | 51.7  | ⏹⏹⏹⏹⏹    |
  | //3.11//   | 28.7  | ⏹⏹⏹      |
  | //3.10//   | 9.7   | ⏹        |
  | 3.9        | 2.7   |          |
  | **3.8**    | 0.3   |          |
  | other      | 0.2   |          |
  | unknown    | 4.7   |          |
  |
  
  Please add your remarks, expand pros and cons list, and note any potential 
blockers.
  
  Pros
  ----
  
  - Toolforge already supports Python 3.13 (T381899 
<https://phabricator.wikimedia.org/T381899>)
  - Many third-party packages have dropped Python 3.8 support; building 
Pywikibot packages (e.g., for pywikibot.org nightly dumps) causes numerous 
warnings due to outdated settings.
  - Dropping Python 3.8 removes the need to keep compatibility workarounds and 
suppress deprecation warnings for features removed in newer Python versions, 
see changelog <https://doc.wikimedia.org/pywikibot/master/changelog.html>.
  - Python 3.9 introduced useful feature such as `str.removeprefix(prefix)` and 
`str.removesuffix(suffix)` (3) <https://docs.python.org/3.9/whatsnew/3.9.html>
  - `concurrent.futures.shutdown()` in Python 3.9 supports the 
//cancel_futures// parameter, replacing the current workaround of manually 
calling `cancel()` on each `Future`.
  - The new `graphlib` module (added in Python 3.9) could be leveraged for 
category tree processing
  - Very low usage of Python 3.8 (~0.3%).
  - GitHub CI runs will be faster without Python 3.8 in the test matrix
  - PyPy 3.8 is no longer available on the latest Ubuntu OS (requires Ubuntu 
22.04)
  - Users can continue using Python 3.8 with Pywikibot 10.
  
  
  
  Cons
  ----
  
  - Python 3.9 introduces syntax changes that cannot be backported
  - Users on older environments will no longer receive Pywikibot updates after 
version 10
  - Bugfixes for Python 3.8 users will not be available in newer Pywikibot 
versions.
  - Potential disruption for users on legacy systems (e.g., shared hosting, old 
enterprise distributions)
  - Changes listed in the Pywikibot changelog 
<https://doc.wikimedia.org/pywikibot/master/changelog.html> may require 
modifications to private scripts when upgrading, especially if deprecated 
features have been removed
  
  **Backward compatibility**
  
  Dropping Python 3.8 support will not break existing scripts immediately. 
Users who still rely on Python 3.8 can continue using Pywikibot 10 without 
changes. However, they will not receive further updates, new features, or 
bugfixes in later releases. Migrating to Python ≥ 3.9 is recommended to ensure 
compatibility with future Pywikibot versions and third-party packages.
  
  **Conclusion**
  
  Ending Python 3.8 support in Pywikibot 11 aligns with upstream EOL, reduces 
maintenance overhead, and enables the use of modern Python features without 
compatibility workarounds. Given the very low adoption rate (~0.3%), the 
benefits clearly outweigh the drawbacks.

TASK DETAIL
  https://phabricator.wikimedia.org/T401802

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

_______________________________________________
pywikibot-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to