Skip to content

Commit b56d379

Browse files
authored
Make zigpy-xbee compatible with zigpy==0.23.0 (#108)
* Make zigpy-xbee compatible with zigpy==0.23.0 * Pin flake/isort versions * Drop py36
1 parent 0bada0e commit b56d379

File tree

5 files changed

+12
-11
lines changed

5 files changed

+12
-11
lines changed

.travis.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,10 @@ language: python
22
matrix:
33
fast_finish: true
44
include:
5-
- python: "3.6"
5+
- python: "3.7"
66
env: TOXENV=lint
7-
- python: "3.6"
7+
- python: "3.7"
88
env: TOXENV=black
9-
- python: "3.6"
10-
env: TOXENV=py36
119
- python: "3.7"
1210
env: TOXENV=py37
1311
- python: "3.8"

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@
2121
author_email="[email protected]",
2222
license="GPL-3.0",
2323
packages=find_packages(exclude=["*.tests"]),
24-
install_requires=["pyserial-asyncio", "zigpy>= 0.20.a1"],
24+
install_requires=["pyserial-asyncio", "zigpy>= 0.23.0"],
2525
tests_require=["pytest"],
2626
)

tox.ini

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# and then run "tox" from this directory.
55

66
[tox]
7-
envlist = py36, py37, py38, lint, black
7+
envlist = py37, py38, lint, black
88
skip_missing_interpreters = True
99

1010
[testenv]
@@ -21,8 +21,8 @@ deps =
2121
[testenv:lint]
2222
basepython = python3
2323
deps =
24-
flake8
25-
isort
24+
flake8==3.7.9
25+
isort==4.3.21
2626
commands =
2727
flake8
2828
isort --check -rc {toxinidir}/zigpy_xbee {toxinidir}/tests {toxinidir}/setup.py

zigpy_xbee/api.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77

88
import serial
99
from zigpy.exceptions import APIException, DeliveryError
10-
from zigpy.types import LVList
1110

1211
import zigpy_xbee
1312
from zigpy_xbee.config import CONF_DEVICE_BAUDRATE, CONF_DEVICE_PATH, SCHEMA_DEVICE
@@ -68,7 +67,7 @@ class ModemStatus(t.uint8_t, t.UndefinedEnum):
6867
),
6968
"create_source_route": (
7069
0x21,
71-
(t.FrameId, t.EUI64, t.NWK, t.uint8_t, LVList(t.NWK)),
70+
(t.FrameId, t.EUI64, t.NWK, t.uint8_t, t.Relays),
7271
None,
7372
),
7473
"register_joining_device": (0x24, (), None),
@@ -104,7 +103,7 @@ class ModemStatus(t.uint8_t, t.UndefinedEnum):
104103
None,
105104
),
106105
"extended_status": (0x98, (), None),
107-
"route_record_indicator": (0xA1, (t.EUI64, t.NWK, t.uint8_t, LVList(t.NWK)), None),
106+
"route_record_indicator": (0xA1, (t.EUI64, t.NWK, t.uint8_t, t.Relays), None),
108107
"many_to_one_rri": (0xA3, (t.EUI64, t.NWK, t.uint8_t), None),
109108
"node_id_indicator": (0x95, (), None),
110109
}

zigpy_xbee/types.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,10 @@ def __str__(self):
161161
return "0x{:04x}".format(self)
162162

163163

164+
class Relays(zigpy.types.LVList, item_type=NWK, length_type=uint8_t):
165+
"""List of Relays."""
166+
167+
164168
UNKNOWN_IEEE = EUI64([uint8_t(0xFF) for i in range(0, 8)])
165169
UNKNOWN_NWK = NWK(0xFFFE)
166170

0 commit comments

Comments
 (0)