Skip to content

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

@vzarutskiy

Description

@vzarutskiy

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions