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 v0.5.0 incomplete utils.py #659

Closed
starkillerOG opened this issue Mar 29, 2020 · 4 comments · Fixed by #661
Closed

python-miio v0.5.0 incomplete utils.py #659

starkillerOG opened this issue Mar 29, 2020 · 4 comments · Fixed by #661

Comments

@starkillerOG
Copy link
Contributor

When I look at the master branch of rytilahti/python-miio in the file: python-miio/miio/utils.py the function int_to_brightness is there.
However when I download the source_code of the v0.5.0 release from: https://github.com/rytilahti/python-miio/archive/0.5.0.zip
And extract the files and then look into python-miio/miio/utils.py the function int_to_brightness is not there.

This causes an import error when installing python-miio through pip3 install --upgrade python-miio and then trying to import the gateway class:

from miio import DeviceException, gateway
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Program Others\Python37\lib\site-packages\miio\gateway.py", line 8, in <module>
    from .utils import int_to_rgb, int_to_brightness, brightness_and_color_to_int
ImportError: cannot import name 'int_to_brightness' from 'miio.utils' (...\Python37\lib\site-packages\miio\utils.py)

@starkillerOG
Copy link
Contributor Author

@rytilahti do you have any idea what is going on?

@rytilahti
Copy link
Owner

Uhhh, that's really odd.. Must be caused by basing the preparations branch & tagging over wrong tip... I'll prepare 0.5.0.1 to fix that asap.

rytilahti added a commit that referenced this issue Mar 29, 2020
Some changes were left out from the previous release, this simply
adds them back.

Fixes #659
rytilahti added a commit that referenced this issue Mar 29, 2020
Some changes were left out from the previous release, this simply
adds them back.

Fixes #659
@starkillerOG
Copy link
Contributor Author

@rytilahti thanks for fixing this so quickly!

@rytilahti
Copy link
Owner

Thank you for quick testing & reporting :-) Goes much faster this way, than realizing it after it's been propagated to downstream. I think this shows the release process needs some improvements though, to avoid having this again in the future...

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