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

python-miio not compatible with Python <=3.5.1 #494

Closed
j-muller opened this issue Apr 8, 2019 · 1 comment · Fixed by #560
Closed

python-miio not compatible with Python <=3.5.1 #494

j-muller opened this issue Apr 8, 2019 · 1 comment · Fixed by #560

Comments

@j-muller
Copy link

j-muller commented Apr 8, 2019

Hi guys,

Thank you for your amazing work.
While playing with the library, I realized that the library may not be compatible with Python 3.5.1 (and prior versions) because of the behavior of typing that changed.

In Python 3.5, running a simple from miio.vacuum import Vacuum, results in:

[...]

/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/typing.py in _type_check(arg, msg)
    297         arg = _ForwardRef(arg)
    298     if not isinstance(arg, (type, _TypeAlias)):
--> 299         raise TypeError(msg + " Got %.100r." % (arg,))
    300     return arg
    301

TypeError: Union[arg, ...]: each arg must be a type. Got <built-in function callable>.
@rytilahti
Copy link
Owner

Hi and thanks for letting us know! Maybe we should bump the requirement to require at least 3.5.3 (or move simply to support only 3.6 and above, as soon as home-assistant/architecture#167 gets implemented). I don't see a reason to spend time supporting old, more obscure python versions (debian stable, which is already very old, ships 3.5.3 already).

rytilahti added a commit that referenced this issue Oct 10, 2019
homeassistant requires now 3.6.1 or newer, so we can bump our requirement.
this will allow us to convert the code-base to use f-strings.

Closes #494
syssi pushed a commit that referenced this issue Oct 11, 2019
homeassistant requires now 3.6.1 or newer, so we can bump our requirement.
this will allow us to convert the code-base to use f-strings.

Closes #494
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.

2 participants