Page MenuHomePhabricator

Drop support for Python 3.5.0 - 3.5.2
Open, Needs TriagePublic


I propose to drop support for Python 3.5.0 - 3.5.2 with Pywikibot 7.0 (deployed probably in September 2021). A more important step would be dropping 3.5 completely due to further advantages (path-like objects, f-strings, variable type hints, async generators and comprehensions)[1] and pywikibot gui cannot be used with Python 3.5 due to T278743. Also a lot of packages does not support Python 3.5 with their current release.[2] Anyway Toolforge provides merely 3.5.3.

Please add your remarks, expand pros and cons and maybe draw attention to it when you find a blocker.


  • The end of life cycle of Python 3.5 has been reached since 30th September 2020 [3]
  • Our documenation recommondates Python 3.6 or higher [4]
  • Python 3.5.0-3.5.2 does not solve a lot of recursive imports well [5] which Python 3.5.3+ does; see T286844. With T286403 such imports are intensively used.
  • Python < 3.5.2 does not provide DefaultDict for type annotations [6]
  • Python < 3.5.2 needs additional work for backward compatibility with async iterators (not yet used within Pywikibot but possibly in future) [7]
  • Python 3.5 updates cannot be used with older versions [8]
  • Fixes and Improvements aren't provided with older Pythons [9]
  • Older Python versions are still supported with Pywikibot releases marked with a tag [10][11]
  • L10N updates can be done by maintenance scripts for older Python versions
  • Pywikibot 3.5.0 - 3.5.2 aren't used very often (~ 1%), see T242157 and T266984
  • Other Python 3.5 issues: T286980


  • Pywikibot is not updated for older Python versions
  • Bugfixes are not available for older Pywikibot versions


Event Timeline

I was hoping we could time dropping 3.5 (and maybe even 3.6) with the move of Toolforge from Stretch (has 3.5.3) to Buster (has 3.7.3), but WMCS hasn't announced any timelines for the transition yet.

Using the 1/128 sampled logs (NDA users only), the following bots have made requests to Wikimedia sites using a UA matching Pywikibot.*Python/3\.5\.[0-2] in the past 30 days:


Also User:Pywikibot-test, but that's under our control.

In total, those requests made 30.1k log entries. Requests matching just Pywikibot have 6.4m log entries. So 3.5.0 - 3.5.2 amounts to 0.5% of all Pywikibot requests to Wikimedia sites.

I'm fine with this. I guess strict 3.6+ support will be a greater challenge.