You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor: remove packageurl-python from runtime dependencies
Remove the packageurl-python external dependency from runtime while maintaining backward compatibility in tests. The library now stores and returns PURL as strings instead of PackageURL objects, aligning with the CycloneDX specification which treats PURL as an opaque string.
Changes:
- Component.purl now stores and returns Optional[str] instead of Optional[PackageURL]
- Purl setter converts any __str__-castable input (including PackageURL objects) to string for backward compatibility
- Removed PackageUrl serialization helper class
- Removed ComparablePackageURL internal utility class
- Updated Bom.get_component_by_purl() signature to accept Optional[str]
- Removed packageurl-python from runtime dependencies in pyproject.toml
- Added packageurl-python as dev dependency for backward compatibility testing
- Updated examples to use string PURL format
All 6531 tests pass; tox validation successful across Python 3.9, 3.12, and 3.13.
BREAKING CHANGE: Component.purl type changed from Optional[PackageURL] to Optional[str]
- Code accessing .type, .namespace, .version, .qualifiers, .subpath will break with AttributeError
- Bom.get_component_by_purl() now requires string argument instead of PackageURL object
- Code must update to work with PURL as string, e.g., parse using purl-spec compliant parsing
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
0 commit comments