Skip to content

0.5.3

Latest

Choose a tag to compare

@dbluhm dbluhm released this 15 Feb 16:49
· 6 commits to main since this release
fa357d7

What's Changed

  • Add DIDCommV2Service builder methods and update dependencies by @hpretila in #187

New Contributors

Summary of Changes

  • Dependency & Environment Updates:

    • Modified pyproject.toml to raise the minimum Python version from 3.7 to 3.10, as 3.9 is EOL and key testing libraries have dropped support.
    • Updated version constraints for pydantic to >=2.7.0 and adjusted other development dependencies like pytest.
  • Explicit DIDComm V1 and V2 Service Builders:

    • In builder.py, the generic add_didcomm method has been superseded by two new explicit methods: add_didcomm_v1 and add_didcomm_v2. It still does automatic matching, but I have added a deprecation notice and replaced any use of it in the testing with add_didcomm_v1.
    • add_didcomm_v1 creates a DIDCommV1Service, handling recipient_keys, routing_keys, and priority.
    • add_didcomm_v2 creates a DIDCommV2Service with a compliant DIDCommV2ServiceEndpoint.
    • This change provides a clear and unambiguous API for developers to build the exact service type they need.
    • Tests have been updated across the suite to align with the new builder logic.
  • Backwards Compatibility:

    • To avoid immediately breaking existing integrations, ServiceBuilder.add_didcomm is preserved as a compatibility wrapper.
    • It now emits a DeprecationWarning and delegates to either the V1 or V2 builder. Version detection is based on the accept header or an explicit version argument, defaulting to V1 to maintain old behavior.
  • Model Extensions:

    • In service.py, the type attribute for DIDCommV1Service and DIDCommV2Service now supports a List[str], as noted in #83 allowing for service type arrays.
    • init.py has been updated to export the new service symbols (DIDCommV1Service, DIDCommV2Service, DIDCommV2ServiceEndpoint) for direct use.

Breaking Changes

  • Python Version: The minimum required Python version is now 3.10. This is a breaking change for users on Python 3.7, 3.8, or 3.9, and will break the 3.9 test.
  • Deprecation: ServiceBuilder.add_didcomm is now deprecated and will be removed in a future release. Developers should migrate to using add_didcomm_v1 or add_didcomm_v2 explicitly.

Full Changelog: v0.5.2...v0.5.3