obstruct 0.5.0__tar.gz → 0.5.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.
Files changed (30) hide show
  1. {obstruct-0.5.0 → obstruct-0.5.2}/.idea/workspace.xml +48 -3
  2. {obstruct-0.5.0 → obstruct-0.5.2}/PKG-INFO +3 -3
  3. {obstruct-0.5.0 → obstruct-0.5.2}/README.md +2 -2
  4. {obstruct-0.5.0 → obstruct-0.5.2}/src/obstruct/__init__.py +2 -2
  5. obstruct-0.5.2/src/obstruct/__version__.py +1 -0
  6. {obstruct-0.5.0 → obstruct-0.5.2}/src/obstruct/aot/unpack.py +6 -6
  7. obstruct-0.5.0/src/obstruct/__version__.py +0 -1
  8. {obstruct-0.5.0 → obstruct-0.5.2}/.idea/.gitignore +0 -0
  9. {obstruct-0.5.0 → obstruct-0.5.2}/.idea/inspectionProfiles/Project_Default.xml +0 -0
  10. {obstruct-0.5.0 → obstruct-0.5.2}/.idea/inspectionProfiles/profiles_settings.xml +0 -0
  11. {obstruct-0.5.0 → obstruct-0.5.2}/.idea/misc.xml +0 -0
  12. {obstruct-0.5.0 → obstruct-0.5.2}/.idea/modules.xml +0 -0
  13. {obstruct-0.5.0 → obstruct-0.5.2}/.idea/obstruct.iml +0 -0
  14. {obstruct-0.5.0 → obstruct-0.5.2}/.idea/vcs.xml +0 -0
  15. {obstruct-0.5.0 → obstruct-0.5.2}/BENCHMARK_TEST.md +0 -0
  16. {obstruct-0.5.0 → obstruct-0.5.2}/pyproject.toml +0 -0
  17. {obstruct-0.5.0 → obstruct-0.5.2}/src/obstruct/aot/__init__.py +0 -0
  18. {obstruct-0.5.0 → obstruct-0.5.2}/src/obstruct/aot/aot.py +0 -0
  19. {obstruct-0.5.0 → obstruct-0.5.2}/src/obstruct/aot/base.py +0 -0
  20. {obstruct-0.5.0 → obstruct-0.5.2}/src/obstruct/aot/pack.py +0 -0
  21. {obstruct-0.5.0 → obstruct-0.5.2}/src/obstruct/metadata_marks.py +0 -0
  22. {obstruct-0.5.0 → obstruct-0.5.2}/src/obstruct/methods.py +0 -0
  23. {obstruct-0.5.0 → obstruct-0.5.2}/src/obstruct/struct_type.py +0 -0
  24. {obstruct-0.5.0 → obstruct-0.5.2}/src/obstruct/types/__init__.py +0 -0
  25. {obstruct-0.5.0 → obstruct-0.5.2}/src/obstruct/types/base.py +0 -0
  26. {obstruct-0.5.0 → obstruct-0.5.2}/src/obstruct/types/types.py +0 -0
  27. {obstruct-0.5.0 → obstruct-0.5.2}/src/obstruct/types/types.pyi +0 -0
  28. {obstruct-0.5.0 → obstruct-0.5.2}/test/test.py +0 -0
  29. {obstruct-0.5.0 → obstruct-0.5.2}/test/test_speed.py +0 -0
  30. {obstruct-0.5.0 → obstruct-0.5.2}/uv.lock +0 -0
@@ -4,7 +4,7 @@
4
4
  <option name="autoReloadType" value="SELECTIVE" />
5
5
  </component>
6
6
  <component name="ChangeListManager">
7
- <list default="true" id="b482b6b4-48ce-4be1-bf3c-a72ec254fa35" name="更改" comment="chore: 更新测速脚本,添加新增的测试结果" />
7
+ <list default="true" id="b482b6b4-48ce-4be1-bf3c-a72ec254fa35" name="更改" comment="fix: 未删除的调试语句&#10;&#10;+ version: 0.5.1" />
8
8
  <option name="SHOW_DIALOG" value="false" />
9
9
  <option name="HIGHLIGHT_CONFLICTS" value="true" />
10
10
  <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
@@ -300,7 +300,47 @@
300
300
  <option name="project" value="LOCAL" />
301
301
  <updated>1787038095094</updated>
302
302
  </task>
303
- <option name="localTasksCounter" value="22" />
303
+ <task id="LOCAL-00022" summary="feat: 移除了自动生成 slots 的功能,其责任转移给 dataclass&#10;&#10;+ 更新版本号:0.5.0">
304
+ <option name="closed" value="true" />
305
+ <created>1787038912981</created>
306
+ <option name="number" value="00022" />
307
+ <option name="presentableId" value="LOCAL-00022" />
308
+ <option name="project" value="LOCAL" />
309
+ <updated>1787038912981</updated>
310
+ </task>
311
+ <task id="LOCAL-00023" summary="feat: 移除了自动生成 slots 的功能,其责任转移给 dataclass&#10;&#10;+ 更新版本号:0.5.0&#10;+ 更新测试脚本中的逻辑,启用 dataclass 的 slots 功能">
312
+ <option name="closed" value="true" />
313
+ <created>1787038979727</created>
314
+ <option name="number" value="00023" />
315
+ <option name="presentableId" value="LOCAL-00023" />
316
+ <option name="project" value="LOCAL" />
317
+ <updated>1787038979727</updated>
318
+ </task>
319
+ <task id="LOCAL-00024" summary="Update README.md">
320
+ <option name="closed" value="true" />
321
+ <created>1787039079710</created>
322
+ <option name="number" value="00024" />
323
+ <option name="presentableId" value="LOCAL-00024" />
324
+ <option name="project" value="LOCAL" />
325
+ <updated>1787039079710</updated>
326
+ </task>
327
+ <task id="LOCAL-00025" summary="fix: 未删除的调试语句">
328
+ <option name="closed" value="true" />
329
+ <created>1787040641208</created>
330
+ <option name="number" value="00025" />
331
+ <option name="presentableId" value="LOCAL-00025" />
332
+ <option name="project" value="LOCAL" />
333
+ <updated>1787040641208</updated>
334
+ </task>
335
+ <task id="LOCAL-00026" summary="fix: 未删除的调试语句&#10;&#10;+ version: 0.5.1">
336
+ <option name="closed" value="true" />
337
+ <created>1787040670022</created>
338
+ <option name="number" value="00026" />
339
+ <option name="presentableId" value="LOCAL-00026" />
340
+ <option name="project" value="LOCAL" />
341
+ <updated>1787040670022</updated>
342
+ </task>
343
+ <option name="localTasksCounter" value="27" />
304
344
  <servers />
305
345
  </component>
306
346
  <component name="TypeScriptGeneratedFilesManager">
@@ -338,6 +378,11 @@
338
378
  <MESSAGE value="fix: 更新版本号至 0.2.15,修复延迟加载不会应用到类属性的问题" />
339
379
  <MESSAGE value="feat: 添加可选的 post_unpack 钩子&#10;(注意:此功能会导致解包相关功能速度降低,请按需使用)&#10;&#10;+ 更新版本号至 0.4.0" />
340
380
  <MESSAGE value="chore: 更新测速脚本,添加新增的测试结果" />
341
- <option name="LAST_COMMIT_MESSAGE" value="chore: 更新测速脚本,添加新增的测试结果" />
381
+ <MESSAGE value="feat: 移除了自动生成 slots 的功能,其责任转移给 dataclass&#10;&#10;+ 更新版本号:0.5.0" />
382
+ <MESSAGE value="feat: 移除了自动生成 slots 的功能,其责任转移给 dataclass&#10;&#10;+ 更新版本号:0.5.0&#10;+ 更新测试脚本中的逻辑,启用 dataclass 的 slots 功能" />
383
+ <MESSAGE value="Update README.md" />
384
+ <MESSAGE value="fix: 未删除的调试语句" />
385
+ <MESSAGE value="fix: 未删除的调试语句&#10;&#10;+ version: 0.5.1" />
386
+ <option name="LAST_COMMIT_MESSAGE" value="fix: 未删除的调试语句&#10;&#10;+ version: 0.5.1" />
342
387
  </component>
343
388
  </project>
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: obstruct
3
- Version: 0.5.0
3
+ Version: 0.5.2
4
4
  Author-email: LittleNightSong <LittleNightSongYO@outlook.com>
5
5
  Classifier: Development Status :: 3 - Alpha
6
6
  Classifier: Programming Language :: Python
@@ -90,8 +90,8 @@ if __name__ == '__main__':
90
90
 
91
91
  ```
92
92
 
93
- > [!WARNING]
94
- > 不要在 dataclass 装饰器中使用 `slots=True`,`Struct` 元类已为类型添加了 `__slots__`
93
+ > [!TIP]
94
+ > 建议 dataclass 装饰器中使用 `slots=True` 以加速属性访问和内存效率
95
95
 
96
96
  在上述示例中,你可能发现 `data != restored`,这是浮点数的精度限制导致的。 因此,我们不建议使用浮点数类型,浮点数在二进制传输中也不常见。
97
97
 
@@ -76,8 +76,8 @@ if __name__ == '__main__':
76
76
 
77
77
  ```
78
78
 
79
- > [!WARNING]
80
- > 不要在 dataclass 装饰器中使用 `slots=True`,`Struct` 元类已为类型添加了 `__slots__`
79
+ > [!TIP]
80
+ > 建议 dataclass 装饰器中使用 `slots=True` 以加速属性访问和内存效率
81
81
 
82
82
  在上述示例中,你可能发现 `data != restored`,这是浮点数的精度限制导致的。 因此,我们不建议使用浮点数类型,浮点数在二进制传输中也不常见。
83
83
 
@@ -11,9 +11,9 @@ ubyte = unsigned_char
11
11
  i8 = signed_char
12
12
  i16 = short
13
13
  i32 = int
14
- i64 = long
14
+ i64 = long_long
15
15
 
16
16
  u8 = unsigned_char
17
17
  u16 = unsigned_short
18
18
  u32 = unsigned_int
19
- u64 = unsigned_long
19
+ u64 = unsigned_long_long
@@ -0,0 +1 @@
1
+ version = "0.5.2"
@@ -183,12 +183,12 @@ def create_unpack_methods(cls: type[Struct]):
183
183
  for n, *_ in array_fields:
184
184
  iter_update_inner.add_code(f'{n}.clear()')
185
185
 
186
- print(unpack.generate_code())
187
- print(update.generate_code())
188
- print(unpack_from.generate_code())
189
- print(update_from.generate_code())
190
- print(iter_unpack.generate_code())
191
- print(iter_update.generate_code())
186
+ # print(unpack.generate_code())
187
+ # print(update.generate_code())
188
+ # print(unpack_from.generate_code())
189
+ # print(update_from.generate_code())
190
+ # print(iter_unpack.generate_code())
191
+ # print(iter_update.generate_code())
192
192
 
193
193
  globals = {
194
194
  v: k for k, v in inner_classes.items() # 翻转字典
@@ -1 +0,0 @@
1
- version = "0.5.0"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes