pyvider
2024-12-01
Expanded DynamicValue wrapper, error hierarchy, and tftypes immutability support
59 files · 2,044+ · 6,200-
Expanded DynamicValue wrapper with msgpack and JSON encoding
1 file changed
dynamic_value_wrapper.pyFull msgpack/JSON encoding and decoding support for Terraform dynamic values (202+ lines)
- Expanded DynamicValue wrapper with full msgpack/JSON encoding and decoding support for Terraform dynamic values
instantiate
behavioral
1 file
dynamic_value_wrapper.py
Created structured error hierarchy across core subsystems
10 files changed
__init__.pyError package initializationbase.pyBase error classesgrpc.pygRPC-specific errorsprovider.pyProvider errorsresource.pyResource errorsschema.pySchema errors__init__.pytftypes error packagebase.pyBase tftypes errorsserialization.pySerialization-specific errorsvalidation.pyValidation-specific errors
- Created core/errors/ package with dedicated modules for base, gRPC, provider, resource, and schema errors
harden
behavioral
5 files
base.pygrpc.pyprovider.pyresource.pyschema.py
- Split tftypes errors.py into subpackage with base, serialization, and validation error modules
harden
internal
3 files
base.pyserialization.pyvalidation.py
Added tftypes immutability support and split types into individual modules
4 files changed
immutability.pyFrozenDict and immutable value support for Terraform state safety (48 lines)bool.pyDedicated Bool type modulenumber.pyDedicated Number type modulestring.pyDedicated String type module
- Created immutability.py with FrozenDict and immutable value support for Terraform state safety
instantiate
behavioral
1 file
immutability.py
- Split simple types into individual modules for bool, number, and string
decouple
internal
3 files
bool.pynumber.pystring.py
Enhanced provider service and schema wrapper with protobuf integration
5 files changed
provider_service.pyExpanded with proper handler registration and request routing (95+ lines)schema_wrapper.pyImproved protobuf serialization round-trips (339 lines changed)wrapper.pyBetter validation (46+ lines)main.pyRebuilt with improved provider initialization and graceful shutdown (174 lines)terraform_handshake.pyImproved environment variable handling
- Expanded provider service with proper handler registration and rebuilt main.py with improved initialization and graceful shutdown
streamline
internal
2 files
provider_service.pymain.py
- Refactored schema wrapper with improved protobuf serialization round-trips and better validation
streamline
internal
2 files
schema_wrapper.pywrapper.py
Updated tests for new type modules
6 files changed
test_tftypes_map.pyUpdated map type teststest_tftypes_type_map.pyType map teststest_tftypes_types_object.pyObject type teststest_tftypes_value.pyValue teststest_schema_wrapper.pySchema wrapper testsmock_type.pyMock type for testing