Version 4.0 is a complete rewrite of how structures are handled as Python classes and instances. Structures and structure members are now proper Python class(instances) and can be used for e.g. typing purposes.
There is a good chance that your code that depends on dissect.csturct needs at least some slight modifications to work with version 4.0. You can look at the other dissect projects to get a feel on what these changes may be; look for the commits titled: "Compatibility with cstruct v4".
What's Changed
* Rewrite type system and compiler (v4) by Schamper in https://github.com/fox-it/dissect.cstruct/pull/35
* Fix expression parser on empty expressions by Schamper in https://github.com/fox-it/dissect.cstruct/pull/90
* Fix enum membership checks by Schamper in https://github.com/fox-it/dissect.cstruct/pull/91
* Use __align__ instead of align in StructureMetaType.__init__ by Miauwkeru in https://github.com/fox-it/dissect.cstruct/pull/92
* fix offsets in generate fields by Miauwkeru in https://github.com/fox-it/dissect.cstruct/pull/93
* Update descriptions and examples by Miauwkeru in https://github.com/fox-it/dissect.cstruct/pull/94
* Bump the version of virtualenv in tox.ini to pull in the correct version of pip by pyrco in https://github.com/fox-it/dissect.cstruct/pull/95
* Add __hash__ function to make StructureMetaType classes hashable by Miauwkeru in https://github.com/fox-it/dissect.cstruct/pull/97
**Full Changelog**: https://github.com/fox-it/dissect.cstruct/compare/3.14...4.0