depecate py38 support (#10034)

This commit is contained in:
Brad Warren 2024-10-31 15:48:57 -07:00 committed by GitHub
parent 3078c2f3db
commit 320cf92944
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 25 additions and 0 deletions

View file

@ -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, 8):
warnings.warn(
"Python 3.8 support will be dropped in the next planned release of "
"acme. Please upgrade your Python version.",
PendingDeprecationWarning,
) # pragma: no cover

View file

@ -18,6 +18,8 @@ Certbot adheres to [Semantic Versioning](https://semver.org/).
* The `certbot_dns_route53.authenticator` module has been removed. This should
not affect any users of the plugin and instead would only affect developers
trying to develop on top of the old code.
* Support for Python 3.8 was deprecated and will be removed in our next planned
release.
### Fixed

View file

@ -1,4 +1,13 @@
"""Certbot client."""
import sys
import warnings
# version number like 1.2.3a0, must have at least 2 parts, like 1.2
__version__ = '2.12.0.dev0'
if sys.version_info[:2] == (3, 8):
warnings.warn(
"Python 3.8 support will be dropped in the next planned release of "
"certbot. Please upgrade your Python version.",
PendingDeprecationWarning,
) # pragma: no cover

View file

@ -1866,6 +1866,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, 8):
logger.warning("Python 3.8 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)

View file

@ -25,6 +25,7 @@
# dependencies) until https://github.com/certbot/certbot/issues/9828 is resolved.
# 6) Similarly to 6), CSR support is deprecated in pyOpenSSL since 24.2, we silence
# the warning until https://github.com/certbot/certbot/issues/9992 is resolved.
# 7) Ignore our own PendingDeprecationWarning about Python 3.8 soon to be dropped.
filterwarnings =
error
ignore:decodestring\(\) is a deprecated alias:DeprecationWarning:dns
@ -33,3 +34,4 @@ filterwarnings =
ignore:.*datetime.utcfromtimestamp\(\) is deprecated:DeprecationWarning:dateutil
ignore:X509Extension support in pyOpenSSL is deprecated:DeprecationWarning
ignore:CSR support in pyOpenSSL is deprecated:DeprecationWarning
ignore:Python 3.8 support will be dropped:PendingDeprecationWarning