Xqt created this task. Xqt added projects: Pywikibot, Pywikibot-Announce, Pywikibot-RfCs. Restricted Application added subscribers: pywikibot-bugs-list, Aklapper.
TASK DESCRIPTION Proposal -------- The last main release Pywikibot 11 was released in February 2026. I propose to **drop support for Python 3.9 with Pywikibot 12**, which will likely be deployed at the end of 2026 or later and **if the usage rate is below 1 %**. Python 3.9 reached EOL in October 2025 (1) <https://devguide.python.org/versions/>. A warning message will be added in Pywikibot 11 (master only) in October 2026. The current download statistic of the last 6 months is as follows (2) <https://pypistats.org/api/packages/pywikibot/python_minor>: **Pywikibot downloads by Python version** (last 6 months) — April 2026 | **Python** | **%** | **rank** | | 3.16 | 0.0 | | | 3.15 | 0.0 | | | 3.14 | 0.3 | | | 3.13 | 0.8 | | | //3.12// | 59.3 | ⏹⏹⏹⏹⏹⏹ | | //3.11// | 28.0 | ⏹⏹⏹ | | //3.10// | 6.9 | ⏹ | | **3.9** | 1.3 | | | 3.8 | 0.3 | | | other | 0.1 | | | unknown | 1.9 | | | Please add your remarks, expand pros and cons list, and note any potential blockers. Pros ---- - **Vulnerability was found for pytest** and some tests cannot be done with Python 3.9 - Toolforge already supports Python 3.13 (T381899 <https://phabricator.wikimedia.org/T381899>) and Python 3.14 I guess - Many third-party packages have dropped Python 3.9 support - Dropping Python 3.9 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.10 introduced useful feature such as Structural Pattern Matching, parenthesized context managers or simplified union types (3) <https://docs.python.org/3.10/whatsnew/3.10.html> - GitHub CI runs will be faster without Python 3.9 in the test matrix - Users can continue using Python 3.9 with Pywikibot 11. Cons ---- - Python 3.10 introduces syntax changes that cannot be backported like structuaral pattern matching - Users on older environments will no longer receive Pywikibot updates after version 12 - Bugfixes for Python 3.9 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.9 support will not break existing scripts immediately. Users who still rely on Python 3.9 can continue using Pywikibot 11 without changes. However, they will not receive further updates, new features, or bugfixes in later releases. Migrating to Python ≥ 3.10 is recommended to ensure compatibility with future Pywikibot versions and third-party packages. **Conclusion** Ending Python 3.9 support in Pywikibot 12 aligns with upstream EOL, reduces maintenance overhead, and enables the use of modern Python features without compatibility workarounds. Given the very low adoption rate (currently ~1.3%), the benefits clearly outweigh the drawbacks. TASK DETAIL https://phabricator.wikimedia.org/T423572 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/
_______________________________________________ pywikibot-bugs mailing list -- [email protected] To unsubscribe send an email to [email protected]
