dissect.cstruct 4.5.dev2__py3-none-any.whl → 4.5.dev3__py3-none-any.whl

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.
@@ -76,12 +76,12 @@ class EnumMetaType(EnumMeta, MetaType):
76
76
 
77
77
  __len__ = MetaType.__len__
78
78
 
79
- if not PY_312:
80
- # Backport __contains__ from CPython 3.12
81
- def __contains__(cls, value: Any) -> bool:
82
- if isinstance(value, cls):
83
- return True
84
- return value in cls._value2member_map_
79
+ def __contains__(cls, value: Any) -> bool:
80
+ # We used to let stdlib enum handle `__containts``` but this commit is incompatible with our API:
81
+ # https://github.com/python/cpython/commit/8a9aee71268c77867d3cc96d43cbbdcbe8c0e1e8
82
+ if isinstance(value, cls):
83
+ return True
84
+ return value in cls._value2member_map_
85
85
 
86
86
  def _read(cls, stream: BinaryIO, context: dict[str, Any] | None = None) -> Self:
87
87
  return cls(cls.type._read(stream, context))
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dissect.cstruct
3
- Version: 4.5.dev2
3
+ Version: 4.5.dev3
4
4
  Summary: A Dissect module implementing a parser for C-like structures: structure parsing in Python made easy
5
5
  Author-email: Dissect Team <dissect@fox-it.com>
6
6
  License: Apache License 2.0
@@ -11,7 +11,7 @@ dissect/cstruct/tools/stubgen.py,sha256=x-jlIet9mzONfl4sbaz6fTgEJ-FXg50HqdLhFKCE
11
11
  dissect/cstruct/types/__init__.py,sha256=e9Z6BhhAPquT4MJoK3i_SjC9AgIGWFH_-tAVFCFBiqE,847
12
12
  dissect/cstruct/types/base.py,sha256=UFDolAxpVW1W9JoVlykEf96wBzt_suXvuYy08iB54Sw,9677
13
13
  dissect/cstruct/types/char.py,sha256=9XYCjCF0D_5o3EYnmIcjev-5GI2NzxOhd1ct1xF6SAM,2457
14
- dissect/cstruct/types/enum.py,sha256=9mzlIeHYLHOdNtTmiPgGNvGBYe71HeDX5qQDspX5O80,7409
14
+ dissect/cstruct/types/enum.py,sha256=fT-Hv9LBYD3HvNVLbOK1WNDP7RJ6B9Jf8DnDOdwTcqk,7522
15
15
  dissect/cstruct/types/flag.py,sha256=7xxQjFEDPHSQOxBHgcc75WzPiAxflOquwr7Z7c3erLE,2347
16
16
  dissect/cstruct/types/int.py,sha256=MGsdUxJt-lj3nl9wzAgGX8cb_vJOtGLiCHwYZs1j_IA,1156
17
17
  dissect/cstruct/types/leb128.py,sha256=kDmsWGXX6vr1bm4uJcilsrQ7JABdQRio16rBZV21pno,2243
@@ -20,10 +20,10 @@ dissect/cstruct/types/pointer.py,sha256=PqeJOoNBUfMd5uO2kpF6OHeW7Q6R1N1W1V4q1Mak
20
20
  dissect/cstruct/types/structure.py,sha256=6OBxXr7hMYhufe4GvHkBHpME1fvJQYlfbFxchouHIIc,29814
21
21
  dissect/cstruct/types/void.py,sha256=VL2qJ86rq-oBUnkBprNsPPgPGgHV6UENRJTQ2jw0rxc,669
22
22
  dissect/cstruct/types/wchar.py,sha256=N9Y_XX2_hZEe2DwepJjxsB6xuRJ6zINRalcUofR59kY,2608
23
- dissect_cstruct-4.5.dev2.dist-info/licenses/COPYRIGHT,sha256=H-18RXfshdH9AdHwW2eO1Xa-5s6tY5eipHh5c0whDu4,316
24
- dissect_cstruct-4.5.dev2.dist-info/licenses/LICENSE,sha256=PhUqiw6jAh2KbBdVRPBq_hfAvfcTBin7nZ3CK7NQbTM,11341
25
- dissect_cstruct-4.5.dev2.dist-info/METADATA,sha256=jJ60UIxIC5oHEK1G3inE5hDUoBhknSdgai5UwoidrI4,8649
26
- dissect_cstruct-4.5.dev2.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
27
- dissect_cstruct-4.5.dev2.dist-info/entry_points.txt,sha256=z53zqZqwD2OLrAkRwrP4wTeiU9CQe7xrMly0T2c0_wQ,71
28
- dissect_cstruct-4.5.dev2.dist-info/top_level.txt,sha256=Mn-CQzEYsAbkxrUI0TnplHuXnGVKzxpDw_po_sXpvv4,8
29
- dissect_cstruct-4.5.dev2.dist-info/RECORD,,
23
+ dissect_cstruct-4.5.dev3.dist-info/licenses/COPYRIGHT,sha256=H-18RXfshdH9AdHwW2eO1Xa-5s6tY5eipHh5c0whDu4,316
24
+ dissect_cstruct-4.5.dev3.dist-info/licenses/LICENSE,sha256=PhUqiw6jAh2KbBdVRPBq_hfAvfcTBin7nZ3CK7NQbTM,11341
25
+ dissect_cstruct-4.5.dev3.dist-info/METADATA,sha256=wiU5dN76m_-WhfLO2E9yRzKY3XHkISWNYziHVfIplho,8649
26
+ dissect_cstruct-4.5.dev3.dist-info/WHEEL,sha256=ck4Vq1_RXyvS4Jt6SI0Vz6fyVs4GWg7AINwpsaGEgPE,91
27
+ dissect_cstruct-4.5.dev3.dist-info/entry_points.txt,sha256=z53zqZqwD2OLrAkRwrP4wTeiU9CQe7xrMly0T2c0_wQ,71
28
+ dissect_cstruct-4.5.dev3.dist-info/top_level.txt,sha256=Mn-CQzEYsAbkxrUI0TnplHuXnGVKzxpDw_po_sXpvv4,8
29
+ dissect_cstruct-4.5.dev3.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (78.1.0)
2
+ Generator: setuptools (80.0.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5