Proposal
--
The last main release Pywikibot 9 was released in March 2023. I propose to **drop support for Python 3.7 with Pywikibot 10**, deployed probably in at the beginning of 2025. Python 3.7 reached EOL in June 2023 [[https://devguide.python.org/versions/|(1)]]. The current download statistic of the last 6 months is as follows [[https://pypistats.org/api/packages/pywikibot/python_minor|(2)]]:
| **Version **| **Downloads [%]**| 263 843 |
| 3.13 | 0.0 |
| 3.12 | 14.5 | ⏹
| 3.11 | 56.2 | ⏹⏹⏹⏹⏹⏹
| 3.10 | 15.9 | ⏹⏹
| 3.9 | 5.4 |
| 3.8 | 1.2 |
| 3.7 | 1.0 |
| unknown | 5.6 |
Please add your remarks, expand pros and cons and maybe draw attention to it when you find a blocker.
Pros
--
- Toolforge k8s 3.9 available since May 2022 (T268438)
- Python 3.8 has importlib.metadata and does not need any external package
- Also a lot of packages do not support Python 3.7 any longer with their current release.
- Python 3.8 comes with improvements like `assignment expressions`, `positional-only parameters`, `self-documenting f-strings`, `functools.singledispatchmethod()` and is much faster than Python 3.7 [[https://docs.python.org/3.8/whatsnew/3.8.html|(3)]]
- L10N updates can still be done by a maintenance script for older Pywikibot versions
- Pywikibot 3.7 is not used very often (~ 1.0 %)
- CI tests can be run faster without Python 3.7 support
- Python 3.7 is not available on latest ubuntu os but needs 22.04
- Python 3.7 can still be used with Pywikbot 9.
Cons
--
- Toolforge Buster bastion still has 3.7 available
- Python 3.8 has syntax changes that cannot be backported in any way.
- Pywikibot is no longer updated for older Python versions
- Bugfixes are not available for older Pywikibot versions