Skip to content
This repository has been archived by the owner on Oct 21, 2020. It is now read-only.

Construct compatibility problems #4

Open
a6a3uh opened this issue Jul 26, 2018 · 5 comments
Open

Construct compatibility problems #4

a6a3uh opened this issue Jul 26, 2018 · 5 comments
Assignees
Labels
compatibility Compatibility and portability issues

Comments

@a6a3uh
Copy link

a6a3uh commented Jul 26, 2018

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

@pavel-kirienko
Copy link
Member

Which Python version are you using?

@a6a3uh
Copy link
Author

a6a3uh commented Jul 27, 2018

Python version is 3.6.6.

@pavel-kirienko
Copy link
Member

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])))

@a6a3uh
Copy link
Author

a6a3uh commented Jul 27, 2018

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.

@pavel-kirienko
Copy link
Member

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.

@pavel-kirienko pavel-kirienko changed the title python version can not be imported as it asserts in register.py during import Construct compatibility problems Jul 27, 2018
@pavel-kirienko pavel-kirienko self-assigned this Jul 27, 2018
@pavel-kirienko pavel-kirienko added the compatibility Compatibility and portability issues label Jul 27, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
compatibility Compatibility and portability issues
Projects
None yet
Development

No branches or pull requests

2 participants