From 6fcdfb0e5006be85500fad67a5a67b47befedb2a Mon Sep 17 00:00:00 2001 From: sydneyli Date: Wed, 30 Oct 2019 10:57:46 -0700 Subject: [PATCH] Deprecation warnings for Python 3.4 (#7378) Fixes #7367 * Deprecation warnings for Python 3.4 users * CHANGELOG.md and AUTHORS.md * double equals typo --- AUTHORS.md | 1 + CHANGELOG.md | 2 ++ acme/acme/__init__.py | 7 +++++++ certbot/main.py | 4 ++++ 4 files changed, 14 insertions(+) diff --git a/AUTHORS.md b/AUTHORS.md index 8468cbc56..1b521548e 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -230,6 +230,7 @@ Authors * [Stavros Korokithakis](https://github.com/skorokithakis) * [Stefan Weil](https://github.com/stweil) * [Steve Desmond](https://github.com/stevedesmond-ca) +* [sydneyli](https://github.com/sydneyli) * [Tan Jay Jun](https://github.com/jayjun) * [Tapple Gao](https://github.com/tapple) * [Telepenin Nikolay](https://github.com/telepenin) diff --git a/CHANGELOG.md b/CHANGELOG.md index ba301a553..398b2e07b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,8 @@ Certbot adheres to [Semantic Versioning](https://semver.org/). ### Changed +* We deprecated support for Python 3.4 in Certbot and its ACME library. Support + for Python 3.4 will be removed in the next major release of Certbot. * Removed `--fast` flag from the test farm tests * `--server` may now be combined with `--dry-run`. Certbot will, as before, use the staging server instead of the live server when `--dry-run` is used. diff --git a/acme/acme/__init__.py b/acme/acme/__init__.py index 20c008d64..13bdd41aa 100644 --- a/acme/acme/__init__.py +++ b/acme/acme/__init__.py @@ -48,3 +48,10 @@ class _TLSSNI01DeprecationModule(object): def __dir__(self): # pragma: no cover return ['_module'] + dir(self._module) + +if sys.version_info[:2] == (3, 4): + warnings.warn( + "Python 3.4 support will be dropped in the next release of " + "acme. Please upgrade your Python version.", + PendingDeprecationWarning, + ) # pragma: no cover diff --git a/certbot/main.py b/certbot/main.py index fc91aca5f..30d0f1d94 100644 --- a/certbot/main.py +++ b/certbot/main.py @@ -1368,6 +1368,10 @@ def main(cli_args=None): if config.func != plugins_cmd: raise + if sys.version_info[:2] == (3, 4): + logger.warning("Python 3.4 support will be dropped in the next release " + "of Certbot - please upgrade your Python version.") + set_displayer(config) # Reporter