Page MenuHomePhabricator

Drop support for Python 3.5.0 - 3.5.2
Closed, ResolvedPublic

Description

Proposal
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.

Pros

  • 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

Cons

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

Refs
[1] https://docs.python.org/3.6/whatsnew/3.6.html
[2] https://codesearch.wmcloud.org/pywikibot/?q=%5B%3C%3D%3E%5D%20%5B'%22%5D3%5C.6&i=nope&files=&excludeFiles=&repos=
[3] https://devguide.python.org/devcycle/#end-of-life-branches
[4] https://doc.wikimedia.org/pywikibot/stable/index.html
[5] https://ci.appveyor.com/project/Ladsgroup/pywikibot-g4xqx/builds/40034703/job/vtsbfsuih2a3h1xo
[6] https://codesearch.wmcloud.org/pywikibot/?q=%5C(3%2C%205&i=nope&files=&excludeFiles=&repos=
[7] https://docs.python.org/3.5/reference/datamodel.html#async-iterators
[8] https://docs.python.org/3.5/whatsnew/3.5.html#asyncio
[9] https://docs.python.org/3.5/whatsnew/changelog.html#python-3-5-3-release-candidate-1
[10] https://pypi.org/project/pywikibot/#history
[11] https://gerrit.wikimedia.org/r/admin/repos/pywikibot/core,tags

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:

User:BotMultichill
User:FrescoBot
User:Larske
User:LarskeBot
User:LogainmBot
User:Pinthura
User:SalweenBot

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.

Change 710316 had a related patch set uploaded (by Xqt; author: Xqt):

[pywikibot/core@master] [doc] Announcement: Pywikibot 3.5.0-3.5.2 will be dropped

https://gerrit.wikimedia.org/r/710316

Change 710316 merged by jenkins-bot:

[pywikibot/core@master] [doc] Announcement: Pywikibot 3.5.0-3.5.2 will be dropped

https://gerrit.wikimedia.org/r/710316

Change 713472 had a related patch set uploaded (by Xqt; author: Xqt):

[pywikibot/core@master] [3.5.2] Show a FutureWarning for Python 3.5.0-3.5.2

https://gerrit.wikimedia.org/r/713472

Change 713472 merged by jenkins-bot:

[pywikibot/core@master] [3.5.2] Show a FutureWarning for Python 3.5.0-3.5.2

https://gerrit.wikimedia.org/r/713472

Change 721264 had a related patch set uploaded (by Xqt; author: Xqt):

[pywikibot/core@master] [py3.5] Drop support for Python 3.5.0 - 3.5.2

https://gerrit.wikimedia.org/r/721264

Change 721264 merged by jenkins-bot:

[pywikibot/core@master] [py3.5] Drop support for Python 3.5.0 - 3.5.2

https://gerrit.wikimedia.org/r/721264

Xqt claimed this task.