Skip to content

Commit

Permalink
Construct related, strict check for version equality (#232)
Browse files Browse the repository at this point in the history
  • Loading branch information
arekbulski authored and syssi committed Feb 26, 2018
1 parent b729455 commit 774cb75
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 11 deletions.
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"


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

0 comments on commit 774cb75

Please sign in to comment.