Skip to content

FutureWarning: functools.partial usage in miot_device.py causes warning on Python 3.13+ #2034

@Bellavista

Description

@Bellavista

Hi,

I’m using the library with Python 3.13 and I’m seeing the following warning during import:

WARNING (ImportExecutor_0) [py.warnings] /usr/local/lib/python3.13/site-packages/miio/miot_device.py:23: FutureWarning: functools.partial will be a method descriptor in future Python versions; wrap it in enum.member() if you want to preserve the old behavior
Bool = partial(_str2bool)
It looks like the usage of functools.partial in miot_device.py line 23 will no longer work as expected in future Python versions (3.14+).

Would it be possible to update the code to avoid this warning and keep compatibility with future Python versions?

Thanks for your great work on the library!

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions