diff --git a/setup.cfg b/setup.cfg index b307755abb2..be9413c545c 100644 --- a/setup.cfg +++ b/setup.cfg @@ -141,6 +141,15 @@ filterwarnings = ignore:The loop argument is deprecated since Python 3.8, and scheduled for removal in Python 3.10.:DeprecationWarning:asyncio ignore:Creating a LegacyVersion has been deprecated and will be removed in the next major release:DeprecationWarning:: ignore::ResourceWarning + # The following deprecation warning is triggered by importing + # `gunicorn.util`. Hopefully, it'll get fixed in the future. See + # https://github.com/benoitc/gunicorn/issues/2840 for detail. + ignore:module 'sre_constants' is deprecated:DeprecationWarning:pkg_resources._vendor.pyparsing + # The deprecation warning below is happening under Python 3.11 and + # is fixed by https://github.com/certifi/python-certifi/pull/199. It + # can be dropped with the next release of `certify`, specifically + # `certify > 2022.06.15`. + ignore:path is deprecated. Use files.. instead. Refer to https.//importlib-resources.readthedocs.io/en/latest/using.html#migrating-from-legacy for migration advice.:DeprecationWarning:certifi.core junit_suite_name = aiohttp_test_suite norecursedirs = dist docs build .tox .eggs minversion = 3.8.2 diff --git a/tests/test_circular_imports.py b/tests/test_circular_imports.py index d37a3232845..ba7d46ed21e 100644 --- a/tests/test_circular_imports.py +++ b/tests/test_circular_imports.py @@ -71,6 +71,17 @@ def test_no_warnings(import_path: str) -> None: This is seeking for any import errors including ones caused by circular imports. """ - imp_cmd = sys.executable, "-W", "error" + imp_cmd = ( + # fmt: off + sys.executable, + "-W", "error", + # The following deprecation warning is triggered by importing + # `gunicorn.util`. Hopefully, it'll get fixed in the future. See + # https://github.com/benoitc/gunicorn/issues/2840 for detail. + "-W", "ignore:module 'sre_constants' is " + "deprecated:DeprecationWarning:pkg_resources._vendor.pyparsing", + "-c", f"import {import_path!s}", + # fmt: on + ) subprocess.check_call(imp_cmd)