mirror of
https://github.com/certbot/certbot.git
synced 2026-06-08 00:02:14 -04:00
deprecate python 3.9 (#10390)
i based this PR on https://github.com/certbot/certbot/pull/10034/
this is maybe a little early since [python 3.9's EOL is in
october](https://devguide.python.org/versions/#supported-versions), but
i thought this would be good to do now to ensure we didn't forget, help
keep us on schedule when we're not releasing every month, allow us to
fix the security alert those with access can see at
https://github.com/certbot/certbot/security/dependabot which is caused
by [us (transitively) needing an old version of urllib3 with python
3.9](d80b1d395a/tools/requirements.txt (L195)),
and simplify development ever so slightly as discussed at
https://github.com/certbot/certbot/pull/10179
i created https://github.com/certbot/certbot/issues/10389 to track
dropping support entirely
This commit is contained in:
parent
581977c92d
commit
3d8be0c3b2
5 changed files with 25 additions and 0 deletions
|
|
@ -6,6 +6,7 @@ This module is an implementation of the `ACME protocol`_.
|
|||
|
||||
"""
|
||||
import sys
|
||||
import warnings
|
||||
|
||||
# This code exists to keep backwards compatibility with people using acme.jose
|
||||
# before it became the standalone josepy package.
|
||||
|
|
@ -19,3 +20,10 @@ for mod in list(sys.modules):
|
|||
# preserved (acme.jose.* is josepy.*)
|
||||
if mod == 'josepy' or mod.startswith('josepy.'):
|
||||
sys.modules['acme.' + mod.replace('josepy', 'jose', 1)] = sys.modules[mod]
|
||||
|
||||
if sys.version_info[:2] == (3, 9):
|
||||
warnings.warn(
|
||||
"Python 3.9 support will be dropped in the next planned release of "
|
||||
"acme. Please upgrade your Python version.",
|
||||
DeprecationWarning,
|
||||
) # pragma: no cover
|
||||
|
|
|
|||
|
|
@ -1,4 +1,14 @@
|
|||
"""Certbot client."""
|
||||
import sys
|
||||
import warnings
|
||||
|
||||
# version number like 1.2.3a0, must have at least 2 parts, like 1.2
|
||||
__version__ = '4.2.0.dev0'
|
||||
|
||||
|
||||
if sys.version_info[:2] == (3, 9):
|
||||
warnings.warn(
|
||||
"Python 3.9 support will be dropped in the next planned release of "
|
||||
"certbot. Please upgrade your Python version.",
|
||||
DeprecationWarning,
|
||||
) # pragma: no cover
|
||||
|
|
|
|||
|
|
@ -1867,6 +1867,10 @@ def main(cli_args: Optional[List[str]] = None) -> Optional[Union[str, int]]:
|
|||
if config.func != plugins_cmd: # pylint: disable=comparison-with-callable
|
||||
raise
|
||||
|
||||
if sys.version_info[:2] == (3, 9):
|
||||
logger.warning("Python 3.9 support will be dropped in the next planned release "
|
||||
"of Certbot - please upgrade your Python version.")
|
||||
|
||||
with make_displayer(config) as displayer:
|
||||
display_obj.set_display(displayer)
|
||||
|
||||
|
|
|
|||
1
newsfragments/10390.changed
Normal file
1
newsfragments/10390.changed
Normal file
|
|
@ -0,0 +1 @@
|
|||
Support for Python 3.9 was deprecated and will be removed in our next planned release.
|
||||
|
|
@ -29,6 +29,7 @@
|
|||
# See https://github.com/certbot/certbot/issues/10291.
|
||||
# 13) Removing probe_sni from public acme, since it's only used in certbot-compatibility-test
|
||||
# after TLS-ALPN support is removed.
|
||||
# 14) Ignore our own DeprecationWarning about Python 3.9 soon to be dropped.
|
||||
filterwarnings =
|
||||
error
|
||||
ignore:.*rsyncdir:DeprecationWarning
|
||||
|
|
@ -44,3 +45,4 @@ filterwarnings =
|
|||
ignore:TLSServer is deprecated:DeprecationWarning
|
||||
ignore:enforce_openssl_binary_usage parameter is deprecated:DeprecationWarning
|
||||
ignore:probe_sni is deprecated:DeprecationWarning
|
||||
ignore:Python 3.9 support will be dropped:DeprecationWarning
|
||||
|
|
|
|||
Loading…
Reference in a new issue