pyvider-cty 2025-03-28
Added capsule type system and serializer, introduced Go-cty compatibility
47 files · 5,659+ · 1,708-

Capsule Type System (New)

1 file changed
  • capsule.py Added `src/pyvider/cty/capsule.py` (92 lines): Core capsule type for custom extension types
  • Added src/pyvider/cty/capsule.py (92 lines): Core capsule type for custom extension types instantiate internal
    1 file
    • capsule.py
  • Added src/pyvider/cty/types/capsule.py (283 lines): Capsule type definition with validation instantiate internal
    1 file
    • capsule.py
  • Added encoding/capsule_serializer.py (711 lines): Serialization for capsule values instantiate internal
    1 file
    • capsule_serializer.py
  • Added capsule test suite: test_cty_capsule_base.py, test_cty_capsule_operations.py, test_cty_capsule_serialization.py, test_cty_capsule_type.py, test_cty_capsule_value.py qualify internal
    5 files
    • test_cty_capsule_base.py
    • test_cty_capsule_operations.py
    • test_cty_capsule_serialization.py
    • test_cty_capsule_type.py
    • test_cty_capsule_value.py

Path Module Restructure

2 files changed
  • base.py Replaced `path/path.py` (501 lines) with `path/base.py` (616 lines)
  • __init__.py Added `path/__init__.py` with 21 lines of exports
  • Replaced path/path.py (501 lines) with path/base.py (616 lines) decouple internal
    1 file
    • base.py
  • Added path/__init__.py with 21 lines of exports instantiate internal
    1 file
    • __init__.py
  • Improved path step resolution and error handling remediate internal
    2 files
    • base.py
    • __init__.py

Collection Enhancements

6 files changed
  • list.py `list.py`: 136 lines of changes with improved slice method indentation fix
  • map.py `map.py`: 410 lines of changes with `hasattr` guard for key comparison, expanded validation
  • set.py `set.py`: 35 lines of adjustments
  • string.py `string.py`: 82 lines of enhancements
  • number.py `number.py`: 125 lines of changes
  • bool.py `bool.py`: 104 lines of expansion

CtyValue Base Major Expansion

1 file changed
  • base.py `values/base.py`: 781 lines of changes (massive growth) adding container support, factory methods
  • values/base.py: 781 lines of changes (massive growth) adding container support, factory methods instantiate internal
    1 file
    • base.py

Serializer Updates

1 file changed
  • codec.py Msgpack serializer: 640 lines of changes for capsule support and edge cases
  • JSON serializer: 496 lines of changes improving capsule and collection handling decouple internal
    1 file
    • codec.py
  • Msgpack serializer: 640 lines of changes for capsule support and edge cases instantiate internal
    1 file
    • codec.py

Go-cty Compatibility Infrastructure

2 files changed
  • go.mod Added `go.mod` and `go.sum` for Go compatibility tooling
  • go.sum Added `go.mod` and `go.sum` for Go compatibility tooling
  • Added tests/compatibility/go_cty_generator.go (428 lines): Go test fixture generator qualify internal
    1 file
    • go_cty_generator.go
  • Added tests/compatibility/py_cty_generator.py (434 lines): Python compatibility generator qualify internal
    1 file
    • py_cty_generator.py
  • Added JSON structure files for comparing Go and Python type representations instantiate internal
    2 files
    • go.mod
    • go.sum
  • Added go.mod and go.sum for Go compatibility tooling instantiate internal
    2 files
    • go.mod
    • go.sum

Test Reorganization

5 files changed
  • test_collections_map.py See points for details
  • test_cty_map_base.py See points for details
  • test_cty_values_containers.py See points for details
  • test_cty_values_factory.py See points for details
  • test_values_base.py See points for details
  • Restructured encoding tests into json/ and msgpack/ subdirectories qualify architectural
    6 files
    • json_serializer.py
    • __init__.py
    • test_json_serializer.py
    • msgpack_serializer.py
    • __init__.py
    • test_msgpack_serializer.py
  • Map tests: renamed test_collections_map.py to test_cty_map_base.py with 131 lines of changes qualify internal
    2 files
    • test_collections_map.py
    • test_cty_map_base.py
  • Added tests/values/test_cty_values_containers.py (419 lines) qualify internal
    1 file
    • test_cty_values_containers.py
  • Added tests/values/test_cty_values_factory.py (232 lines) qualify internal
    1 file
    • test_cty_values_factory.py
  • Removed old tests/values/test_values_base.py (155 lines) qualify internal
    1 file
    • test_values_base.py