packageurl-python
packageurl-python copied to clipboard
Add convenience method to replace a purl component
The current implementation uses a namedtuple for PackageURL but this is an implementation detail that should be relied uppon. We should have a method to create a new purl from an existing purl passing new field values as arguments.
See also https://github.com/package-url/packageurl-python/issues/87#issuecomment-1167518807
@pombredanne what about implementing a new update() method on the PackageURL class re-using the code from your evolve_purl function?