From 11e83f83655ad13092e8ea73f2f70ecdcad91aae Mon Sep 17 00:00:00 2001 From: Michael Johnson Date: Thu, 28 Jun 2018 12:22:36 -0700 Subject: [PATCH] Proposing distro for global-requirements In the spirit of "python 3" first I would like to propose distro for global-requirements. The builtin platform.linux_distribution[1] is deprecated and will be removed in 3.8 and the recommended replacement is distro. Since linux_distribution is widely used in OpenStack projects[2], we should have an approved alternative. Is the library actively maintained? Yes[3] Is the library good code? Yes, it is pretty simple code with 98% coverage[4] Is the library license compatible? Yes, Apache 2.0[5] Is the library already packaged in the distros we target (Ubuntu latest / Fedora latest)? Ubuntu since artful (17.10) Fedora since 23 RHEL 6 Is the function of this library already covered by other libraries in global-requirements.txt? Not that I am aware of. Is the library required for OpenStack project or related dev or infrastructure setup? (Answer to this should be Yes, of course) Which? As noted above[2], many OpenStack projects are using the deprecated function. Octavia is one that would like to move to distro. [1] https://docs.python.org/2/library/platform.html \ #platform.linux_distribution [2] http://codesearch.openstack.org/?q=platform.linux_distribution [3] https://pypi.org/project/distro/1.2.0/#history [4] https://codecov.io/github/nir0s/distro?branch=master [5] https://github.com/nir0s/distro/blob/master/LICENSE Change-Id: Iee61fad7954a56b225221e5b5254ee8094911d43 --- global-requirements.txt | 1 + lower-constraints.txt | 1 + upper-constraints.txt | 1 + 3 files changed, 3 insertions(+) diff --git a/global-requirements.txt b/global-requirements.txt index 084dc2dea5..48367bd52e 100644 --- a/global-requirements.txt +++ b/global-requirements.txt @@ -35,6 +35,7 @@ decorator # BSD defusedxml # PSF dib-utils # Apache-2.0 diskimage-builder!=1.6.0,!=1.7.0,!=1.7.1 # Apache-2.0 +distro # Apache-2.0 Django<2;python_version<'3.0' # BSD Django<2.1;python_version>='3.0' # BSD django-babel # BSD diff --git a/lower-constraints.txt b/lower-constraints.txt index bf4640eb62..29f1bcfeae 100644 --- a/lower-constraints.txt +++ b/lower-constraints.txt @@ -551,3 +551,4 @@ xstatic-js-yaml===3.8.1.0 xstatic-json2yaml===0.1.1.0 python-qinlingclient===1.0.0 ansible-runner===1.0.3 +distro===1.2.0 diff --git a/upper-constraints.txt b/upper-constraints.txt index 4e68bb7151..b4b1fa2d9b 100644 --- a/upper-constraints.txt +++ b/upper-constraints.txt @@ -534,3 +534,4 @@ XStatic-D3===3.5.17.0 actdiag===0.5.4 sysv-ipc===1.0.0 scikit-learn===0.19.1 +distro===1.3.0