mirror of
https://github.com/certbot/certbot.git
synced 2026-06-04 22:33:00 -04:00
deprecate get_strict_version
This commit is contained in:
parent
5c7c12afa5
commit
c1a58907bb
2 changed files with 9 additions and 5 deletions
|
|
@ -20,6 +20,8 @@ Certbot adheres to [Semantic Versioning](https://semver.org/).
|
|||
* BF6BCFC89E90747B9A680FD7B6029E8500F7DB16
|
||||
* 86379B4F0AF371B50CD9E5FF3402831161D1D280
|
||||
* 20F201346BF8F3F455A73F9A780CC99432A28621
|
||||
* The function certbot.util.get_strict_version was deprecated and will be
|
||||
removed in a future release.
|
||||
|
||||
### Fixed
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,7 @@
|
|||
"""Utilities for all Certbot."""
|
||||
# distutils.version under virtualenv confuses pylint
|
||||
# For more info, see: https://github.com/PyCQA/pylint/issues/73
|
||||
import argparse
|
||||
import atexit
|
||||
import collections
|
||||
import distutils.version
|
||||
import errno
|
||||
import logging
|
||||
import platform
|
||||
|
|
@ -613,8 +610,13 @@ def get_strict_version(normalized):
|
|||
:rtype: distutils.version.StrictVersion
|
||||
|
||||
"""
|
||||
# strict version ending with "a" and a number designates a pre-release
|
||||
return distutils.version.StrictVersion(normalized.replace(".dev", "a"))
|
||||
warnings.warn("certbot.util.get_strict_version is deprecated and will be "
|
||||
"removed in a future release.", DeprecationWarning)
|
||||
with warnings.catch_warnings():
|
||||
warnings.simplefilter("ignore", DeprecationWarning)
|
||||
import distutils.version
|
||||
# strict version ending with "a" and a number designates a pre-release
|
||||
return distutils.version.StrictVersion(normalized.replace(".dev", "a"))
|
||||
|
||||
|
||||
def is_staging(srv):
|
||||
|
|
|
|||
Loading…
Reference in a new issue