mirror of
https://github.com/certbot/certbot.git
synced 2026-01-26 07:41:33 +03:00
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.
19 lines
973 B
INI
19 lines
973 B
INI
# This file isn't used while testing packages in tools/_release.sh so any
|
|
# settings we want to also change there must be added to the release script
|
|
# directly.
|
|
[pytest]
|
|
# In general, all warnings are treated as errors. Here are the exceptions:
|
|
# 1- decodestring: https://github.com/rthalley/dnspython/issues/338
|
|
# 2- ignore our own TLS-SNI-01 warning
|
|
# 3- ignore warn for importing abstract classes from collections instead of collections.abc,
|
|
# too much third party dependencies are still relying on this behavior,
|
|
# but it should be corrected to allow Certbot compatiblity with Python >= 3.8
|
|
# 4- ipdb uses deprecated functionality of IPython. See
|
|
# https://github.com/gotcha/ipdb/issues/144.
|
|
filterwarnings =
|
|
error
|
|
ignore:decodestring:DeprecationWarning
|
|
ignore:(TLSSNI01|TLS-SNI-01):DeprecationWarning
|
|
ignore:.*collections\.abc:DeprecationWarning
|
|
ignore:The `color_scheme` argument is deprecated:DeprecationWarning:IPython.*
|