Skip to content

Releases: timrid/construct-typing

v0.7.0

27 Oct 19:26

Choose a tag to compare

  • Added Python 3.12 and 3.13 support to CI (#32)
  • added internal Construct methods (_parse, _parsereport, _build and _sizeof) used when inheriting the class (#30)
  • updated to construct==2.10.70 (#33)
  • Switch to pyproject.toml and trusted publishing (#34)

v0.6.2

03 Aug 07:30

Choose a tag to compare

  • fixed error message from EnumBase and FlagsEnumBase that occures since pyright v1.1.320
  • removed unnessasary __new__ methods in DataclassStruct, TEnum and TFlagsEnum

v0.6.1

24 Jul 09:56

Choose a tag to compare

fixed missmatch between stub and runtime type for Array

v0.6.0

24 Jul 09:15

Choose a tag to compare

  • Reworked construct-stubs so that it supports pyright>=v1.1.310. To support pyright and mypy in the past, __new__ and __init__ had to be defined. However, this is no longer supported by pyright. Now in most cases only __init__ is defined. Only for some special cases __new__ is used (e.g. for FormatField, Const, Hex, HexDump, IfThenElse, Switch)
  • Added stubs for cs.Compiled.
  • Added some more missing definitions (__author__, __version__, possiblestringencodings, hexdump, hexundump, PY)
  • Use PEP688 buffer protocol for the parse method (fixes #24). This requires a dependency to typing_extensions>=4.6.0.
  • build_stream and build_file do not return anything (fixes #25).

v0.5.6

09 May 11:05

Choose a tag to compare

  • Fixed python 3.11 error when using dataclasses.asdict for dataclasses that contains an EnumBase instance. (fixes #21)
  • Changed BinaryIO to IO[bytes] as StreamType. (fixes #19)

v0.5.5

09 Jan 14:21

Choose a tag to compare

  • added type hints for cs.Struct._subcons, cs.Sequence._subcons, cs.FocusedSeq._subcons, cs.Union._subcons, cs.LazyStruct._subcons, cs.LazyStruct._subconsindexes
  • added generic wrapper for cs.Array
  • added __init__ methods for all constructs that currently only define an __new__ method
  • using __new__ instead of __init__ for EnumBase to create enum member objects (fixes #18)

v0.5.4

24 Dec 11:22

Choose a tag to compare

  • fixed static analysis issues so that the latest versions are supported
    • pyright: 1.1.285
    • mypy: 0.991
  • updated IfThenElse so that it represents the real implementation as a class and not a method
  • enhanced EnumBase and FlagsEnumBase to support individual documentation for each enum value via EnumValue

v0.5.3

31 Oct 09:12

Choose a tag to compare

  • added python 3.11 support
  • fixed static analysis issues so that the latest versions are supported
    • pyright: 1.1.277
    • mypy: 0.982
  • Use os.PathLike for file names
  • fixed BuildTypes of construct.Const
  • upgrade requirement to construct==2.10.68

v0.5.2

23 Oct 11:11

Choose a tag to compare

  • fixed setup.py for sdist (.tar.gz file)
  • added stub for evaluate()
  • fixed Switch.default
  • fixed IfThenElse for pyright

v0.5.1

19 Jul 18:53

Choose a tag to compare

Enhancement for cs.Checksum, so that bytesfunc can return any object and not only bytes.