pyvider-cty 2025-03-29
Major simplification pass: removed capsule type system and serializer
59 files · 3,983+ · 6,275-

Capsule Type Removal

3 files changed
  • capsule.py Removed `capsule.py`, `types/capsule.py` (283 lines), `encoding/capsule_serializer.py` (711 lines)
  • capsule.py Removed `capsule.py`, `types/capsule.py` (283 lines), `encoding/capsule_serializer.py` (711 lines)
  • __init__.py Removed capsule exports from `types/__init__.py`
  • Removed capsule.py, types/capsule.py (283 lines), encoding/capsule_serializer.py (711 lines) decouple internal
    2 files
    • capsule.py
    • capsule.py
  • Removed all capsule tests (5 test files) qualify internal
    3 files
    • capsule.py
    • capsule.py
    • __init__.py
  • Removed capsule exports from types/__init__.py decouple internal
    1 file
    • __init__.py

CtyObject Simplification

2 files changed
  • object.py `structural/object.py`: 674 lines of changes (net reduction ~425 lines initially, then additions)
  • base.py Added `CtyValue` import and changed `validate()` to return `CtyValue`
  • structural/object.py: 674 lines of changes (net reduction ~425 lines initially, then additions) decouple internal
    1 file
    • object.py
  • Added CtyValue import and changed validate() to return CtyValue interface behavioral
    1 file
    • base.py
  • Multiple iterations simplifying then re-adding object features decouple internal
    2 files
    • object.py
    • base.py
  • Added ctype ClassVar field instantiate internal
    2 files
    • object.py
    • base.py

Collection Improvements

3 files changed
  • list.py `list.py`: 165 lines of changes streamlining validation
  • map.py `map.py`: 678 lines of significant restructuring
  • set.py `set.py`: 22 lines of adjustments

Primitive Type Updates

4 files changed
  • bool.py `bool.py`: 93 lines of changes
  • number.py `number.py`: 86 lines of improvements
  • string.py `string.py`: 64 lines of updates
  • dynamic.py `dynamic.py`: 25 lines of enhancements

Serializer Reductions

1 file changed
  • codec.py `msgpack_serializer.py`: Removed 175 lines (capsule support)
  • json_serializer.py: Removed 124 lines (capsule support) instantiate internal
    1 file
    • json_serializer.py
  • msgpack_serializer.py: Removed 175 lines (capsule support) instantiate internal
    1 file
    • codec.py

Test Reorganization

6 files changed
  • test_cty_collections_list.py Simplified list tests: reduced `test_cty_collections_list.py` (333 lines removed), `test_cty_coll...
  • test_cty_collections_list_improve.py Simplified list tests: reduced `test_cty_collections_list.py` (333 lines removed), `test_cty_coll...
  • test_cty_list_nested.py Renamed `test_list_with_nested_types.py` to `test_cty_list_nested.py`
  • test_cty_list_comparison.py Added `test_cty_list_comparison.py` (86 lines), `test_cty_list_operations.py` (253 lines)
  • test_cty_list_operations.py Added `test_cty_list_comparison.py` (86 lines), `test_cty_list_operations.py` (253 lines)
  • test_object_init.py Updated object tests: `test_object_validation.py` (393 lines changed), `test_object_init.py` adju...
  • Removed dynamic structural test (xtest_cty_structural_dynamic.py) qualify internal
    1 file
    • xtest_cty_structural_dynamic.py
  • Simplified list tests: reduced test_cty_collections_list.py (333 lines removed), test_cty_collections_list_improve.py (371 lines removed) qualify internal
    2 files
    • test_cty_collections_list.py
    • test_cty_collections_list_improve.py
  • Renamed test_list_with_nested_types.py to test_cty_list_nested.py decouple internal
    1 file
    • test_cty_list_nested.py
  • Added test_cty_list_comparison.py (86 lines), test_cty_list_operations.py (253 lines) instantiate internal
    2 files
    • test_cty_list_comparison.py
    • test_cty_list_operations.py
  • Updated object tests: test_object_validation.py (393 lines changed), test_object_init.py adjustments qualify internal
    1 file
    • test_object_init.py
2 files changed
  • base.py `values/base.py`: 126 lines of changes
  • env.sh Added `env.sh` (20 lines) for development environment setup