Construct compatibility problems
Opened this issue · 5 comments
python popcop_test.py
Traceback (most recent call last):
File "popcop_test.py", line 30, in
import popcop
File "... popcop/python/popcop/init.py", line 37, in
from . import transport, standard, physical
File "... popcop/python/popcop/standard/init.py", line 32, in
from . import register
File "... popcop/python/popcop/standard/register.py", line 526, in
assert _decode_value(bytes([3, 0, 1, 2, 3])) == (ValueType.BOOLEAN, [False, True, True, True])
AssertionError
Which Python version are you using?
Python version is 3.6.6.
This is alarming. The assertion check is supposed to validate that the marshaller operates properly; apparently, it doesn't. May I ask you to replace that assertion with the following and post the output here?
print((ValueType.BOOLEAN, [False, True, True, True]))
print(_decode_value(bytes([3, 0, 1, 2, 3])))
It gives something like this
(<ValueType.BOOLEAN: 3>, [False, True, True, True])
(<ValueType.BOOLEAN: 3>, [False, True, False, True])
I think thats a construct
version issue. Because when register is invoked by importing from kucher
app with correct old version of construct
no assertion happens.
I think thats a
construct
version issue.
Crap. Bad news. I am going to rename this ticket and keep it open - someday I will get around to fix it. The developers of Construct could take better care of its API compatibility tbh.