DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
To reproduce:
$ cat run.py
from slackbot.bot import Bot
$ python -W all run.py
/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/slackbot/bot.py:3: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
import imp
Or:
$ cat test_it.py
import run
def test_it():
pass
$ pytest test_it.py
========================================================= test session starts =========================================================
platform darwin -- Python 3.8.2, pytest-5.4.1, py-1.8.1, pluggy-0.13.1
rootdir: /Users/hugo/github/foosbot
plugins: reverse-1.0.1, requests-mock-1.7.0, testmon-1.0.2, xdist-1.31.0, flaky-3.6.1, forked-1.1.3, cov-2.8.1
collected 1 item
test_it.py . [100%]
========================================================== warnings summary ===========================================================
/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/slackbot/bot.py:3
/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/slackbot/bot.py:3: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
import imp
-- Docs: https://docs.pytest.org/en/latest/warnings.html
==================================================== 1 passed, 1 warning in 0.11s =====================================================
slackbot 0.5.6 Python 3.8
There's a deprecation warning:
To reproduce:
Or: