Page MenuHomePhabricator

Drop support for Python 3.7
Open, Needs TriagePublic

Description

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 (1). The current download statistic of the last 6 months is as follows (2):

Version Downloads [%]263 843
3.130.0
3.1214.5
3.1156.2⏹⏹⏹⏹⏹⏹
3.1015.9⏹⏹
3.95.4
3.81.2
3.71.0
unknown5.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) and 3.11 and bastions have 3.11
  • Legacy buster bastion still has Python 3.7 but this host is deprecated and will eventually go away.
  • 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 (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

  • 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

Event Timeline

@ChongDae: I found out that you are the only one running Pywikibot scripts with Python 3.7. Are you able to change the Python version within the next few months?

@Xqt Yes. I can change to newer version. Please go ahead.