Я получаю одно и то же DeprecationWarning
во многих контекстах, например, при запуске pytest
или на Flask сервере:
+ pytest -s -W ignore::DeprecationWarning
========================================== test session starts ===========================================
platform linux -- Python 3.8.1, pytest-5.4.1, py-1.8.1, pluggy-0.13.1
rootdir: /home/user/projects/myproject
plugins: dash-1.9.1
collected 39 items
tests/test_cache.py ......
[...]
============================================ warnings summary ============================================
/home/user/projects/myproject/venv/lib/python3.8/site-packages/past/builtins/misc.py:45
/home/user/projects/myproject/venv/lib/python3.8/site-packages/past/builtins/misc.py:45: DeprecationWarning:
the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
-- Docs: https://docs.pytest.org/en/latest/warnings.html
===================================== 39 passed, 1 warning in 16.64s =====================================
В чем причина и как я могу подавить эту вещь?