certbot/acme
Adrien Ferrand a03e7b95d3 Deprecate all tls-sni related objects in acme module (#6859)
This PR is a part of the tls-sni-01 removal plan described in #6849.

As `acme` is a library, we need to put some efforts to make a decent deprecation path before totally removing tls-sni in it. While initialization of `acme.challenges.TLSSNI01` was already creating deprecation warning, not all cases were covered.

For instance, and innocent call like this ...
```python
if not isinstance(challenge, acme.challenges.TLSSNI01):
    print('I am not using this TLS-SNI deprecated stuff, what could possibly go wrong?')
```
... would break if we suddenly remove all objects related to this challenge.

So, I use the _Deprecator Warning Machine, Let's Pacify this Technical Debt_ (Guido ®), to make `acme.challenges` and `acme.standalone` patch themselves, and display a deprecation warning on stderr for any access to the tls-sni challenge objects.

No dev should be able to avoid the deprecation warning. I set the deprecation warning in the idea to remove the code on `0.34.0`, but the exact deprecation window is open to discussion of course.

* Modules challenges and standalone patch themselves to generated deprecation warning when tls-sni related objects are accessed.

* Correct unit tests

* Correct lint

* Update challenges_test.py

* Correct lint

* Fix an error during tests

* Update coverage

* Use multiprocessing for coverage

* Add coverage

* Update test_util.py

* Factor the logic about global deprecation warning when accessing TLS-SNI-01 attributes

* Fix coverage

* Add comment for cryptography example.

* Use warnings.

* Add a changelog

* Fix deprecation during tests

* Reload

* Update acme/acme/__init__.py

Co-Authored-By: adferrand <adferrand@users.noreply.github.com>

* Update CHANGELOG.md

* Pick a random free port.
2019-03-26 18:26:38 -07:00
..
acme Deprecate all tls-sni related objects in acme module (#6859) 2019-03-26 18:26:38 -07:00
docs Remove ACMEv1 example. (#6668) 2019-01-22 10:39:31 +01:00
examples Add acme library usage example (http-01) (#5494) 2019-02-22 18:02:43 -08:00
LICENSE.txt Update Copyright notice in subpackages LICENSE. 2015-10-04 10:10:41 +00:00
MANIFEST.in Fixes #6085. (#6091) 2018-06-12 17:31:22 -07:00
pytest.ini Fixes #6085. (#6091) 2018-06-12 17:31:22 -07:00
README.rst Fix ACME module description 2015-10-21 17:06:35 -07:00
readthedocs.org.requirements.txt Per subpkg requirements.txt for RTD 2015-10-21 17:06:36 -07:00
setup.cfg Make wheel universal 2016-01-21 10:11:23 +01:00
setup.py Bump version to 0.33.0 2019-03-06 12:47:29 -08:00

ACME protocol implementation in Python