Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[codebase] Python 3.6 required #3

Merged
merged 12 commits into from
Nov 20, 2020
53 changes: 53 additions & 0 deletions design/###-codebase-python.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Proposal: Codebase - Python 3.6 required

| **Status** | **Proposed/Accepted/Deprecated** |
|:------------------|:---------------------------------------------|
| **RFC #** | #### |
| **Submitted** | 2020-11-20 |
| **Dependencies** | RFC #, # |

---

## Summary
Declare **Python 3.6** as the minimum Python version supported.


## Motivation
Python ecosystem is moving forward,
[Python 3.5 has reached EOL](https://www.python.org/dev/peps/pep-0478/), and some
core Conan dependencies will stop to support it, like
[requests >2.25](https://requests.readthedocs.io/en/latest/community/updates/#id1).

Python 3.6 has also [some valuable features](https://docs.python.org/3/whatsnew/3.6.html)
that will help to improve the codebase and write more maintainable source:

* Formatted strig literals aka _f-strings_.
* Type hints for classes and instance variables.


## Proposal
Python 3.6 will be the minimal supported version. Conan 2.0 is expected to be released
on 2021, by that date Python 3.6 will be the oldest release alive (EOL on December 2021) and
[Python 3.10 will be already released (October 2021)](https://www.python.org/dev/peps/pep-0619/).

About Linux distros: starting on Debian 10 Buster (July 2019), the [Python 3
version installed is Python 3.7](https://wiki.debian.org/Python). Ubuntu 18.04 (April 2018) already included Python 3.6.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am curious about the thoughts on CentOS 7 support, which is LTS'd for another 4 years as I recall, many enterprises are burdened with still maintaining the platform in a bare/clean install.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CentOS 7 is Python 2.7.5. I can't see conan retaining python 2.x as a target now (with all the major upstream packages dropping it), so you're going to have to install an an updated python from somewhere (e.g. https://github.com/iusrepo/python36)

But 3.7 is harder, since python now requires OpenSSL 1.1, (as I understand it) so you start needing to backport a lot more packages.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes but it's very easy to install 3.6, the oldest supported release is typically backported... yum install -y python3
Anything else would require a software collection

https://www.liquidweb.com/kb/how-to-install-python-3-on-centos-7/
https://developers.redhat.com/blog/2018/08/13/install-python3-rhel/

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I build >50 packages on Centos 7 using a combination of devtoolset-9 and python 3.6 from software collections. Here's a docker file that shows it's not that hard to do.
I wouldn't worry about it too much :)

Copy link
Contributor

@prince-chrismc prince-chrismc Nov 13, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I love your optimism, bring more of it please 😄

Sadly my industry has not gone containerization, let's not mention cloud... It's already a problem we have to deal with. it's a very uncomfortable thorn.
We build in a similar image (devtoolset7 however) but it still runs on a stock CentOS 7.
Many companies see changing tools as a waste of time and money since it does not generate sales or meet costumer demands. CentOS 7 enterprise users are there because they don't want to change, we gotten a massive push back from them even changing the development compiler, and that was a dev cut of the software not a major TLS.

We need to be contentious of c runtimes and ABI requirements, software still needs to be installed on a host machine (not just shipped in a container) for as much pain as it brings it also bring in sales.



## Alternative Approaches
Newer Python versions provide several enhacenments on type annotation that could help
to write and maintain code and some nice language features, but those are not _needed_
and can block Conan 2.0 from being deployed on some wide-spread systems.


## Detailed Design
As soon as we include some f-string in the sources, the test suite will start to fail
for any Python version older than 3.6.


## Open issues
Not known yet.


## Future Extensions
Not applicable.