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

Construct related, strict check for version equality #232

Merged
merged 3 commits into from
Feb 26, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ This is a bugfix release which provides improved stability and compatibility.
**Merged pull requests:**

- Proper handling of the device\_id representation [\#228](https://github.com/rytilahti/python-miio/pull/228) ([syssi](https://github.com/syssi))
- construct-code uptodate [\#226](https://github.com/rytilahti/python-miio/pull/226) ([arekbulski](https://github.com/arekbulski))
- Construct related, support upto 2.9.31 [\#226](https://github.com/rytilahti/python-miio/pull/226) ([arekbulski](https://github.com/arekbulski))

## [0.3.6](https://github.com/rytilahti/python-miio/tree/0.3.6)

Expand Down
4 changes: 4 additions & 0 deletions miio/protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,17 @@
from construct import (Struct, Bytes, Const, Int16ub, Int32ub, GreedyBytes,
Adapter, Checksum, RawCopy, Rebuild, IfThenElse,
Default, Pointer, Hex, Probe)
import construct

from cryptography.hazmat.primitives.ciphers import Cipher, algorithms, modes
from cryptography.hazmat.backends import default_backend
from cryptography.hazmat.primitives import padding

_LOGGER = logging.getLogger(__name__)

# needs to be maintained in sync with setup.py and requirements.txt
assert construct.version_string == "2.9.31"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

undefined name 'construct'

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.



class Utils:
""" This class is adapted from the original xpn.py code by gst666 """
Expand Down
23 changes: 13 additions & 10 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,19 @@ def readme():
packages=["miio", "mirobo"],

python_requires='>=3.4',
install_requires=['construct==2.9.31',
'click',
'cryptography',
'pretty_cron',
'typing; python_version < "3.5"',
'zeroconf',
'attrs',
'android_backup',
'pytz',
'appdirs'],

install_requires=[
'construct==2.9.31',
'click',
'cryptography',
'pretty_cron',
'typing; python_version < "3.5"',
'zeroconf',
'attrs',
'android_backup',
'pytz',
'appdirs',
],

entry_points={
'console_scripts': [
Expand Down