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.pyAdded `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 internal1 file
capsule.py
- Added
src/pyvider/cty/types/capsule.py(283 lines): Capsule type definition with validation instantiate internal1 file
capsule.py
- Added
encoding/capsule_serializer.py(711 lines): Serialization for capsule values instantiate internal1 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.pyqualify internal5 files
test_cty_capsule_base.pytest_cty_capsule_operations.pytest_cty_capsule_serialization.pytest_cty_capsule_type.pytest_cty_capsule_value.py
Path Module Restructure
2 files changed
base.pyReplaced `path/path.py` (501 lines) with `path/base.py` (616 lines)__init__.pyAdded `path/__init__.py` with 21 lines of exports
Collection Enhancements
6 files changed
list.py`list.py`: 136 lines of changes with improved slice method indentation fixmap.py`map.py`: 410 lines of changes with `hasattr` guard for key comparison, expanded validationset.py`set.py`: 35 lines of adjustmentsstring.py`string.py`: 82 lines of enhancementsnumber.py`number.py`: 125 lines of changesbool.py`bool.py`: 104 lines of expansion
list.py: 136 lines of changes with improved slice method indentation fix remediate internal1 file
list.py
map.py: 410 lines of changes withhasattrguard for key comparison, expanded validation decouple internal1 file
map.py
set.py: 35 lines of adjustments decouple internal1 file
set.py
string.py: 82 lines of enhancements decouple internal1 file
string.py
number.py: 125 lines of changes decouple internal1 file
number.py
bool.py: 104 lines of expansion decouple internal1 file
bool.py
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 internal1 file
base.py
Serializer Updates
1 file changed
codec.pyMsgpack 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.modAdded `go.mod` and `go.sum` for Go compatibility toolinggo.sumAdded `go.mod` and `go.sum` for Go compatibility tooling
- Added
tests/compatibility/go_cty_generator.go(428 lines): Go test fixture generator qualify internal1 file
go_cty_generator.go
- Added
tests/compatibility/py_cty_generator.py(434 lines): Python compatibility generator qualify internal1 file
py_cty_generator.py
- Added JSON structure files for comparing Go and Python type representations
instantiate
internal
2 files
go.modgo.sum
- Added
go.modandgo.sumfor Go compatibility tooling instantiate internal2 files
go.modgo.sum
Test Reorganization
5 files changed
test_collections_map.pySee points for detailstest_cty_map_base.pySee points for detailstest_cty_values_containers.pySee points for detailstest_cty_values_factory.pySee points for detailstest_values_base.pySee points for details
- Restructured encoding tests into
json/andmsgpack/subdirectories qualify architectural6 files
json_serializer.py__init__.pytest_json_serializer.pymsgpack_serializer.py__init__.pytest_msgpack_serializer.py
- Map tests: renamed
test_collections_map.pytotest_cty_map_base.pywith 131 lines of changes qualify internal2 files
test_collections_map.pytest_cty_map_base.py
- Added
tests/values/test_cty_values_containers.py(419 lines) qualify internal1 file
test_cty_values_containers.py
- Added
tests/values/test_cty_values_factory.py(232 lines) qualify internal1 file
test_cty_values_factory.py
- Removed old
tests/values/test_values_base.py(155 lines) qualify internal1 file
test_values_base.py