construct-classes 0.2.0__tar.gz → 0.2.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {construct_classes-0.2.0 → construct_classes-0.2.2}/CHANGELOG.rst +18 -1
- {construct_classes-0.2.0 → construct_classes-0.2.2}/PKG-INFO +7 -13
- construct_classes-0.2.2/pyproject.toml +51 -0
- {construct_classes-0.2.0 → construct_classes-0.2.2}/src/construct_classes/__init__.py +7 -2
- construct_classes-0.2.0/pyproject.toml +0 -50
- {construct_classes-0.2.0 → construct_classes-0.2.2}/LICENSE +0 -0
- {construct_classes-0.2.0 → construct_classes-0.2.2}/README.rst +0 -0
- {construct_classes-0.2.0 → construct_classes-0.2.2}/src/construct_classes/py.typed +0 -0
|
@@ -11,7 +11,24 @@ Unreleased
|
|
|
11
11
|
|
|
12
12
|
Please see all `Unreleased Changes`_ for more information.
|
|
13
13
|
|
|
14
|
-
.. _Unreleased Changes: https://github.com/matejcik/construct-classes/compare/v0.2.
|
|
14
|
+
.. _Unreleased Changes: https://github.com/matejcik/construct-classes/compare/v0.2.2...HEAD
|
|
15
|
+
|
|
16
|
+
0.2.2 - 2025-08-26
|
|
17
|
+
--------------------
|
|
18
|
+
|
|
19
|
+
Removed
|
|
20
|
+
~~~~~~~
|
|
21
|
+
|
|
22
|
+
- Drop support for Pythons 3.9 and older. This was broken in 0.2 and improperly marked
|
|
23
|
+
by the package metadata.
|
|
24
|
+
|
|
25
|
+
0.2.1 - 2025-08-25
|
|
26
|
+
--------------------
|
|
27
|
+
|
|
28
|
+
Fixed
|
|
29
|
+
~~~~~
|
|
30
|
+
|
|
31
|
+
- Fix exception when creating a subclass of a subclass of :code:`Struct`.
|
|
15
32
|
|
|
16
33
|
|
|
17
34
|
0.2.0 - 2025-08-25
|
|
@@ -1,28 +1,23 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: construct-classes
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.2
|
|
4
4
|
Summary: Parse your binary structs into dataclasses
|
|
5
|
-
Home-page: https://github.com/matejcik/construct-classes
|
|
6
|
-
License: MIT
|
|
7
5
|
Author: matejcik
|
|
8
|
-
Author-email: ja@matejcik.cz
|
|
9
|
-
|
|
6
|
+
Author-email: matejcik <ja@matejcik.cz>
|
|
7
|
+
License-Expression: MIT
|
|
10
8
|
Classifier: Development Status :: 2 - Pre-Alpha
|
|
11
9
|
Classifier: Intended Audience :: Developers
|
|
12
10
|
Classifier: License :: OSI Approved :: MIT License
|
|
13
11
|
Classifier: Natural Language :: English
|
|
14
12
|
Classifier: Programming Language :: Python :: 3
|
|
15
|
-
Classifier: Programming Language :: Python :: 3.7
|
|
16
|
-
Classifier: Programming Language :: Python :: 3.8
|
|
17
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
18
13
|
Classifier: Programming Language :: Python :: 3.10
|
|
19
14
|
Classifier: Programming Language :: Python :: 3.11
|
|
20
15
|
Classifier: Programming Language :: Python :: 3.12
|
|
21
16
|
Classifier: Programming Language :: Python :: 3.13
|
|
22
17
|
Classifier: Programming Language :: Python :: 3.14
|
|
23
|
-
|
|
24
|
-
Requires-
|
|
25
|
-
|
|
18
|
+
Requires-Dist: construct~=2.10
|
|
19
|
+
Requires-Python: >=3.10, <4.0
|
|
20
|
+
Project-URL: Homepage, https://github.com/matejcik/construct-classes
|
|
26
21
|
Project-URL: Repository, https://github.com/matejcik/construct-classes
|
|
27
22
|
Description-Content-Type: text/x-rst
|
|
28
23
|
|
|
@@ -150,4 +145,3 @@ Footer
|
|
|
150
145
|
* Free software: MIT License
|
|
151
146
|
|
|
152
147
|
.. * Documentation: https://construct-classes.readthedocs.io.
|
|
153
|
-
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "construct-classes"
|
|
3
|
+
version = "0.2.2"
|
|
4
|
+
description = "Parse your binary structs into dataclasses"
|
|
5
|
+
authors = [{ name = "matejcik", email = "ja@matejcik.cz" }]
|
|
6
|
+
requires-python = ">=3.10,<4.0"
|
|
7
|
+
readme = "README.rst"
|
|
8
|
+
license = "MIT"
|
|
9
|
+
classifiers = [
|
|
10
|
+
"Development Status :: 2 - Pre-Alpha",
|
|
11
|
+
"Intended Audience :: Developers",
|
|
12
|
+
"License :: OSI Approved :: MIT License",
|
|
13
|
+
"Natural Language :: English",
|
|
14
|
+
"Programming Language :: Python :: 3",
|
|
15
|
+
"Programming Language :: Python :: 3.10",
|
|
16
|
+
"Programming Language :: Python :: 3.11",
|
|
17
|
+
"Programming Language :: Python :: 3.12",
|
|
18
|
+
"Programming Language :: Python :: 3.13",
|
|
19
|
+
"Programming Language :: Python :: 3.14",
|
|
20
|
+
]
|
|
21
|
+
dependencies = [
|
|
22
|
+
"construct~=2.10",
|
|
23
|
+
]
|
|
24
|
+
|
|
25
|
+
[project.urls]
|
|
26
|
+
Homepage = "https://github.com/matejcik/construct-classes"
|
|
27
|
+
Repository = "https://github.com/matejcik/construct-classes"
|
|
28
|
+
|
|
29
|
+
[dependency-groups]
|
|
30
|
+
dev = [
|
|
31
|
+
"pytest>5",
|
|
32
|
+
"black>=22.8.0,<23",
|
|
33
|
+
"isort>=5.10.1,<6",
|
|
34
|
+
"flake8>=5.0.4,<6",
|
|
35
|
+
"construct-typing>=0.5.2,<0.6",
|
|
36
|
+
"typing-extensions>4.2",
|
|
37
|
+
]
|
|
38
|
+
|
|
39
|
+
[build-system]
|
|
40
|
+
requires = ["uv_build>=0.8.13,<0.9.0"]
|
|
41
|
+
build-backend = "uv_build"
|
|
42
|
+
|
|
43
|
+
[tool.uv.build-backend]
|
|
44
|
+
source-include = [
|
|
45
|
+
"CHANGELOG.rst",
|
|
46
|
+
"LICENSE",
|
|
47
|
+
"README.rst",
|
|
48
|
+
]
|
|
49
|
+
|
|
50
|
+
[tool.isort]
|
|
51
|
+
profile = "black"
|
|
@@ -42,8 +42,9 @@ class _StructMeta(type):
|
|
|
42
42
|
**kwargs: t.Any,
|
|
43
43
|
) -> type:
|
|
44
44
|
new_cls = super().__new__(cls, name, bases, namespace)
|
|
45
|
-
if bases:
|
|
46
|
-
|
|
45
|
+
if any(isinstance(b, _StructMeta) for b in bases):
|
|
46
|
+
# skip over `Struct` itself, which does not have a StructMeta class in its
|
|
47
|
+
# bases.
|
|
47
48
|
return dataclasses.dataclass(kw_only=kw_only, **kwargs)(new_cls)
|
|
48
49
|
else:
|
|
49
50
|
return new_cls
|
|
@@ -90,3 +91,7 @@ class Struct(metaclass=_StructMeta):
|
|
|
90
91
|
def parse(cls: t.Type[Self], data: bytes) -> Self:
|
|
91
92
|
result = cls.SUBCON.parse(data)
|
|
92
93
|
return cls.from_parsed(result)
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
# check that `Struct` itself is not transformed
|
|
97
|
+
assert not dataclasses.is_dataclass(Struct)
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
[tool.poetry]
|
|
2
|
-
name = "construct-classes"
|
|
3
|
-
version = "0.2.0"
|
|
4
|
-
authors = ["matejcik <ja@matejcik.cz>"]
|
|
5
|
-
classifiers = [
|
|
6
|
-
"Development Status :: 2 - Pre-Alpha",
|
|
7
|
-
"Intended Audience :: Developers",
|
|
8
|
-
"License :: OSI Approved :: MIT License",
|
|
9
|
-
"Natural Language :: English",
|
|
10
|
-
"Programming Language :: Python :: 3",
|
|
11
|
-
"Programming Language :: Python :: 3.6",
|
|
12
|
-
"Programming Language :: Python :: 3.7",
|
|
13
|
-
"Programming Language :: Python :: 3.8",
|
|
14
|
-
"Programming Language :: Python :: 3.9",
|
|
15
|
-
"Programming Language :: Python :: 3.10",
|
|
16
|
-
"Programming Language :: Python :: 3.11",
|
|
17
|
-
"Programming Language :: Python :: 3.12",
|
|
18
|
-
"Programming Language :: Python :: 3.13",
|
|
19
|
-
"Programming Language :: Python :: 3.14",
|
|
20
|
-
]
|
|
21
|
-
description = "Parse your binary structs into dataclasses"
|
|
22
|
-
homepage = "https://github.com/matejcik/construct-classes"
|
|
23
|
-
license = "MIT"
|
|
24
|
-
repository = "https://github.com/matejcik/construct-classes"
|
|
25
|
-
readme = "README.rst"
|
|
26
|
-
include = [
|
|
27
|
-
{ path = "CHANGELOG.rst", format = "sdist" },
|
|
28
|
-
{ path = "LICENSE", format = "sdist" },
|
|
29
|
-
{ path = "README.rst", format = "sdist" }
|
|
30
|
-
]
|
|
31
|
-
|
|
32
|
-
[tool.poetry.dependencies]
|
|
33
|
-
python = ">=3.6.2,<4.0"
|
|
34
|
-
construct = "^2.10"
|
|
35
|
-
dataclasses = { version = "^0.8", python = "~3.6.0" }
|
|
36
|
-
|
|
37
|
-
[tool.poetry.dev-dependencies]
|
|
38
|
-
pytest = ">5"
|
|
39
|
-
black = "^22.8.0"
|
|
40
|
-
isort = "^5.10.1"
|
|
41
|
-
flake8 = "^5.0.4"
|
|
42
|
-
construct-typing = { version = "^0.5.2", python = ">=3.7" }
|
|
43
|
-
typing-extensions = { version = ">4.2", python = ">=3.7" }
|
|
44
|
-
|
|
45
|
-
[build-system]
|
|
46
|
-
requires = ["poetry-core>=1.0.0"]
|
|
47
|
-
build-backend = "poetry.core.masonry.api"
|
|
48
|
-
|
|
49
|
-
[tool.isort]
|
|
50
|
-
profile = "black"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|