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
Updated by dkliban@redhat.com about 6 years ago
- Tracker changed from Issue to Task
- % Done set to 0
Updated by bmbouter about 6 years ago
- Has duplicate Task #4015: Switch Pulp3 to use Python 3.6 as its base version added
Updated by dalley about 6 years ago
- Status changed from NEW to ASSIGNED
- Assignee set to dalley
Updated by dalley about 6 years ago
- Status changed from ASSIGNED to POST
Added by dalley about 6 years ago
Updated by dalley about 6 years ago
- Status changed from POST to MODIFIED
- % Done changed from 0 to 100
Applied in changeset pulp|11c2a99db654fd6e23d7b4d4b80b8c7ffaef3c76.
Updated by bmbouter almost 5 years ago
- Status changed from MODIFIED to CLOSED - CURRENTRELEASE
Remove Python 3.5 support
re #3984 https://pulp.plan.io/issues/3984