You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
nice package!
But I'm wondering if you could support pep-526 annotations (python3.6+) as an alternative to the "name" / type syntax for constructing struct types:
Hi, short answer is no. I am not developing this library anymore. Especially if it requires Python 3.6 or later. Its a neat example tho. Thanks for sharing.
I think that Construct as it stands could do with a more wholesale refactor/reworking too, at the moment. Perhaps to add this method of definition to replace the ""name" / type" syntax which does seem rather clunky (PyCharm warns users about this syntax, as an example).
Construct is overdue a major release IMO, with one of the initial authors blogging about it 6(!) years ago. I think @arekbulski had several ideas of features currently baked into 2.X that make Construct a nightmare to maintain; Embeds, I think.
@DanseMacabre is correct. The library grew almost too big to be refactorable.I wont accept a PR because I wont understand how it works. Also correct about Embed. I am also struggling atm with infrastructure: readthedocs doesnt build uptodate docs anymore, uploading to pip doesnt work either, travisci stopped working also. And I have no idea how to fix those. Until those 3 are fixed, there is no PRs accepted and no features implemented.
I had the same idea as @joernheissler and implemented something similar a few days earlier (before I knew about this project, which I've just found now) - deconstruct. It's much more simple than Construct, but it's a tiny codebase which means it should be easier to maintain (re @DanseMacabre) if that's all you need.
Activity
arekbulski commentedon Oct 14, 2019
Hi, short answer is no. I am not developing this library anymore. Especially if it requires Python 3.6 or later. Its a neat example tho. Thanks for sharing.
Evidlo commentedon Oct 16, 2019
@arekbulski Have you considered bringing in new maintainers?
Tadaboody commentedon Oct 20, 2019
Would you accept a PR adding this as an alternative
AnnotatedStructclass? (raising some error if imported from a<3.6interperter?DanseMacabre commentedon Oct 21, 2019
I think that Construct as it stands could do with a more wholesale refactor/reworking too, at the moment. Perhaps to add this method of definition to replace the ""name" / type" syntax which does seem rather clunky (PyCharm warns users about this syntax, as an example).
Construct is overdue a major release IMO, with one of the initial authors blogging about it 6(!) years ago. I think @arekbulski had several ideas of features currently baked into 2.X that make Construct a nightmare to maintain; Embeds, I think.
arekbulski commentedon Oct 21, 2019
@DanseMacabre is correct. The library grew almost too big to be refactorable.I wont accept a PR because I wont understand how it works. Also correct about Embed. I am also struggling atm with infrastructure: readthedocs doesnt build uptodate docs anymore, uploading to pip doesnt work either, travisci stopped working also. And I have no idea how to fix those. Until those 3 are fixed, there is no PRs accepted and no features implemented.
waszil commentedon Nov 19, 2019
Indeed, a great package! Can I ask, what is this "Embed" or "Embeds" that you've mentioned?
DanseMacabre commentedon Nov 19, 2019
@waszil https://construct.readthedocs.io/en/latest/meta.html#nesting-and-embedding
biqqles commentedon Jan 2, 2020
I had the same idea as @joernheissler and implemented something similar a few days earlier (before I knew about this project, which I've just found now) - deconstruct. It's much more simple than Construct, but it's a tiny codebase which means it should be easier to maintain (re @DanseMacabre) if that's all you need.
arekbulski commentedon Jan 3, 2020
Deconstruct only supports structs, ints and floats AFAIK.
biqqles commentedon Jan 4, 2020
It supports all C's basic types and exact-width types (plus a couple more), and arrays of all those types. A full list is here.
arekbulski commentedon Jan 17, 2020
I do not understand how annotations or metaclasses work, so I am rejecting this ticket. Case closed.