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

Incorrect sequence of "Callable" imports. Python-dbg #91

Open
vzarutskiy opened this issue Apr 6, 2023 · 0 comments
Open

Incorrect sequence of "Callable" imports. Python-dbg #91

vzarutskiy opened this issue Apr 6, 2023 · 0 comments

Comments

@vzarutskiy
Copy link

vzarutskiy commented Apr 6, 2023

controls.py includes imports:

try:
    # begin try for python <= 3.5
    from collections import Callable
except ImportError:
    # after try for python >= 3.10
    from typing import Callable

But python-dbg reported warning in this place:

[_showwarnmsg_impl]: /home/user/.local/lib/python3.8/site-packages/pywebostv/controls.py:3: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3, and in 3.10 it will stop working
  from collections import Callable

Sequence must be like:

try:
    from typing import Callable
except ImportError:
    from collections import Callable

Or you can use "sys.version_info" for python version checking.

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

No branches or pull requests

1 participant