Skip to content

failure on python 3.11+ #40

@mike-dubman

Description

@mike-dubman

The original error: TypeError: 'Timeout' object does not support the context manager protocol
Cause: In Python 3.11+, async_timeout.timeout() must be used with async with, not with. Current code used with, which raised this error.
Proposed Fix : Replace all with async_timeout.timeout(...) with async with async_timeout.timeout(...) in:

pyControl4/account.py
pyControl4/director.py
pyControl4/websocket.py

unless backward compat is important for python before 3.11 version

Please advise and can submit patch or you are welcome to quick fix it.

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