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.py Full 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__.py Error package initialization
  • base.py Base error classes
  • grpc.py gRPC-specific errors
  • provider.py Provider errors
  • resource.py Resource errors
  • schema.py Schema errors
  • __init__.py tftypes error package
  • base.py Base tftypes errors
  • serialization.py Serialization-specific errors
  • validation.py Validation-specific errors
  • Created core/errors/ package with dedicated modules for base, gRPC, provider, resource, and schema errors harden behavioral
    5 files
    • base.py
    • grpc.py
    • provider.py
    • resource.py
    • schema.py
  • Split tftypes errors.py into subpackage with base, serialization, and validation error modules harden internal
    3 files
    • base.py
    • serialization.py
    • validation.py

Added tftypes immutability support and split types into individual modules

4 files changed
  • immutability.py FrozenDict and immutable value support for Terraform state safety (48 lines)
  • bool.py Dedicated Bool type module
  • number.py Dedicated Number type module
  • string.py Dedicated 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.py
    • number.py
    • string.py

Enhanced provider service and schema wrapper with protobuf integration

5 files changed
  • provider_service.py Expanded with proper handler registration and request routing (95+ lines)
  • schema_wrapper.py Improved protobuf serialization round-trips (339 lines changed)
  • wrapper.py Better validation (46+ lines)
  • main.py Rebuilt with improved provider initialization and graceful shutdown (174 lines)
  • terraform_handshake.py Improved 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.py
    • main.py
  • Refactored schema wrapper with improved protobuf serialization round-trips and better validation streamline internal
    2 files
    • schema_wrapper.py
    • wrapper.py

Updated tests for new type modules

6 files changed
  • test_tftypes_map.py Updated map type tests
  • test_tftypes_type_map.py Type map tests
  • test_tftypes_types_object.py Object type tests
  • test_tftypes_value.py Value tests
  • test_schema_wrapper.py Schema wrapper tests
  • mock_type.py Mock type for testing
  • Updated tests for map, object, value, and schema wrapper modules with new mock type qualify internal
    5 files
    • test_tftypes_map.py
    • test_tftypes_types_object.py
    • test_tftypes_value.py
    • test_schema_wrapper.py
    • mock_type.py