1
0
mirror of https://github.com/certbot/certbot.git synced 2026-01-26 07:41:33 +03:00
Files
certbot/pytest.ini
Adrien Ferrand cc359dab46 Migrate pkg_resources usages to importlib.resources (#9748)
* Migrate pkg_resources API related to resources to importlib_resources

* Fix lint and mypy + pin lexicon

* Update filterwarnings

* Update oldest tests requirements

* Update pinned dependencies

* Fix for modern versions of python

* Fix assets load in nginx integration tests

* Fix a warning

* Isolate static generation from importlib.resource into a private function

---------

Co-authored-by: Adrien Ferrand <adrien.ferrand@amadeus.com>
2023-09-07 11:38:44 -07:00

47 lines
2.7 KiB
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]
# Warnings being triggered by our plugins using deprecated features in
# acme/certbot should be fixed by having our plugins no longer using the
# deprecated code rather than adding them to the list of ignored warnings here.
# Fixing things in this way prevents us from shipping packages raising our own
# deprecation warnings and gives time for plugins that don't use the deprecated
# API to propagate, especially for plugins packaged as an external snap, before
# we release breaking changes.
#
# The current warnings being ignored are:
# 1) A deprecation warning is raised in dnspython==1.15.0 in the oldest tests for
# certbot-dns-rfc2136.
# 2) pytest-cov uses deprecated functionality in pytest-xdist, to be resolved by
# https://github.com/pytest-dev/pytest-cov/issues/557.
# 3) requests-toolbelt<0.10.1 can cause this warning to be raised during our
# unit tests. This warning should be ignored until our (transitive)
# dependency on requests-toolbelt is removed or our pinned version can be
# updated.
# 4) Ignore our own PendingDeprecationWarning about update_symlinks soon to be dropped.
# See https://github.com/certbot/certbot/issues/6284.
# 5) Ignore pkg_resources.declare_namespace used in a large number of Google's Python
# libs. e.g. https://github.com/googleapis/google-auth-library-python/issues/1229.
# It is also is used in sphinxcontrib-devhelp 1.0.2 which as of writing this
# is the latest version of that library. See
# https://github.com/sphinx-doc/sphinxcontrib-devhelp/blob/1.0.2/setup.py#L69.
# 6) Ignore DeprecationWarning from using pkg_resources API
# 7) Ignore our own PendingDeprecationWarning about Python 3.7 soon to be dropped.
# 8) Ignore DeprecationWarning for datetime.utcfromtimestamp() triggered
# when importing the pytz.tzinfo module
# https://github.com/stub42/pytz/issues/105
# 9) Boto3 is dropping support for Python 3.7 by end of 2023. Let's ignore the associated
# deprecation warning since we will also drop Python 3.7 soon.
filterwarnings =
error
ignore:decodestring\(\) is a deprecated alias:DeprecationWarning:dns
ignore:.*rsyncdir:DeprecationWarning
ignore:'urllib3.contrib.pyopenssl:DeprecationWarning:requests_toolbelt
ignore:update_symlinks is deprecated:PendingDeprecationWarning
ignore:.*declare_namespace\(':DeprecationWarning
ignore:pkg_resources is deprecated as an API:DeprecationWarning
ignore:Python 3.7 support will be dropped:PendingDeprecationWarning
ignore:datetime.utcfromtimestamp\(\) is deprecated:DeprecationWarning:pytz.tzinfo
ignore:Boto3 will no longer support Python 3.7