You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As noted in #12248, some modules can raise warnings at import time. If this happens during AssertionRewritingHook's actions, then they get raised early and cannot be controlled by the pytest filterwarnings config, which is unfortunate. There should be a good way to suppress these with normal pytest config options.
Currently witnessing this on platform linux -- Python 3.11.9, pytest-8.1.1, pluggy-1.4.0
Example issue:
% pytest some_test.py
<venv>/lib/python3.11/site-packages/_pytest/assertion/rewrite.py:178: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
exec(co, module.__dict__)
<venv>/lib/python3.11/site-packages/pkg_resources/__init__.py:2832: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('sphinxcontrib')`.
Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
declare_namespace(pkg)
============================================= test session starts =============================================
platform linux -- Python 3.11.9, pytest-8.1.1, pluggy-1.4.0
...
The text was updated successfully, but these errors were encountered:
As noted in #12248, some modules can raise warnings at import time. If this happens during
AssertionRewritingHook
's actions, then they get raised early and cannot be controlled by the pytestfilterwarnings
config, which is unfortunate. There should be a good way to suppress these with normal pytest config options.Currently witnessing this on
platform linux -- Python 3.11.9, pytest-8.1.1, pluggy-1.4.0
Example issue:
The text was updated successfully, but these errors were encountered: