diff --git a/acme/acme/__init__.py b/acme/acme/__init__.py index 1e21b5896..51034a301 100644 --- a/acme/acme/__init__.py +++ b/acme/acme/__init__.py @@ -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 diff --git a/certbot/CHANGELOG.md b/certbot/CHANGELOG.md index dd682d0ba..39251a40e 100644 --- a/certbot/CHANGELOG.md +++ b/certbot/CHANGELOG.md @@ -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 diff --git a/certbot/certbot/__init__.py b/certbot/certbot/__init__.py index cf4ffab00..83099c370 100644 --- a/certbot/certbot/__init__.py +++ b/certbot/certbot/__init__.py @@ -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 diff --git a/certbot/certbot/_internal/main.py b/certbot/certbot/_internal/main.py index 2fa80e364..107443b5f 100644 --- a/certbot/certbot/_internal/main.py +++ b/certbot/certbot/_internal/main.py @@ -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) diff --git a/pytest.ini b/pytest.ini index 65932b071..55c8435fd 100644 --- a/pytest.ini +++ b/pytest.ini @@ -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