Task #3984
closedRemove Python 3.5 Support
100%
Description
Problem¶
Async generators are an elegant way to write async data producers (just like synchronous generators for the sync case). Since the repo sync pipeline is fully asynchronous now, they can help to express concepts more elegantly (see e.g. [2] for a stage implementation).
However, async generators were introduced in Python 3.6 and are not available in Python 3.5.
Additional benefits of Python 3.6+ are:
- String interpolation "f-Strings" [5]
- dict objects preserve insertion-order (officially declared part of
the language with Python 3.7). Eliminates a source of subtle
"works on 3.6, sometimes works on 3.5" bugs.
- One version less to support is always a good thing (provided nobody
really requires it)
- Type annotations are currently not used by the Pulp project, but if
the project decides to use them in the future: IMHO type annotations
(which are great btw.) began to feel right with 3.6. Working with
them in 3.5 can be clumsy at times.
- And of course: [6]
OS/distribution support¶
- Python 3.6 SCL is available for RHEL 7 / CentOS 7
- It is part of Fedora as of Fedora 26
For Ubuntu, it is part of 18.04 LTS. Debian does not have Python 3.6 in stable yet.
Proposal¶
Remove Python 3.5 from Travis tests and require Python 3.6+ in the Python modules & documentation. For pulp/devel 3.6 is the current default version already.
[2] https://github.com/gmbnomis/pulp_cookbook/blob/d44ed593925b78c046e1b568810b15acbdad5ac4/pulp_cookbook/app/tasks/synchronizing.py#L98
[5] https://docs.python.org/3/whatsnew/3.6.html#pep-498-formatted-string-literals
[6] https://twitter.com/raymondh/status/844955415259463681
Related issues
Remove Python 3.5 support
re #3984 https://pulp.plan.io/issues/3984