Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DeprecationWarning: the imp module is deprecated in favour of importlib #214

Open
hugovk opened this issue Apr 22, 2020 · 0 comments · May be fixed by #215
Open

DeprecationWarning: the imp module is deprecated in favour of importlib #214

hugovk opened this issue Apr 22, 2020 · 0 comments · May be fixed by #215

Comments

@hugovk
Copy link

hugovk commented Apr 22, 2020

slackbot 0.5.6
Python 3.8

There's a deprecation warning:

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 =====================================================
@paulopaixaoamaral paulopaixaoamaral linked a pull request Apr 22, 2020 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant