diff options
author | Florian Klink <flokli@flokli.de> | 2020-06-19 18:11:35 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-19 18:11:35 +0300 |
commit | 25e79e4acaf9d7816a339c45edb12227a6c92b95 (patch) | |
tree | b36cd9d4eb14a1161d011e98f23284fa943dbd61 /certbot-compatibility-test | |
parent | db064a410927e48691406f32eeda420ede5cc91b (diff) |
tree-wide: use LooseVersion instead of StrictVersion (#8081)
According to `distutils/version.py`, StrictVersion is pretty strict in
what version numbers to accept:
> A version number consists of two or three dot-separated numeric
> components, with an optional "pre-release" tag on the end. The
> pre-release tag consists of the letter 'a' or 'b' followed by a number.
This assumption already fails for some pretty basic python libraries
itself, like setuptools, also available in `46.1.3.post20200610`, a
completely valid version number according to
https://www.python.org/dev/peps/pep-0440/#post-releases.
There doesn't seem to be a particular reason on why StrictVersion has
been used here, so let's use LooseVersion, to be compatible with these
versions.
Co-authored-by: Adrien Ferrand <adferrand@users.noreply.github.com>
Diffstat (limited to 'certbot-compatibility-test')
-rw-r--r-- | certbot-compatibility-test/setup.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/certbot-compatibility-test/setup.py b/certbot-compatibility-test/setup.py index 9a646d7ce..53875123f 100644 --- a/certbot-compatibility-test/setup.py +++ b/certbot-compatibility-test/setup.py @@ -1,4 +1,4 @@ -from distutils.version import StrictVersion +from distutils.version import LooseVersion import sys from setuptools import __version__ as setuptools_version @@ -15,7 +15,7 @@ install_requires = [ 'zope.interface', ] -setuptools_known_environment_markers = (StrictVersion(setuptools_version) >= StrictVersion('36.2')) +setuptools_known_environment_markers = (LooseVersion(setuptools_version) >= LooseVersion('36.2')) if setuptools_known_environment_markers: install_requires.append('mock ; python_version < "3.3"') elif 'bdist_wheel' in sys.argv[1:]: |