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
>>> packageurl.PackageURL.from_string("pkg:111_^5/example")
Traceback (most recent call last):
File "<python-input-68>", line 1, in <module>
packageurl.PackageURL.from_string("pkg:111_^5/example")
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^
File "/nix/store/v3mx6lav0f5w28qg1q1qzb52lmva7dbz-python3-3.13.12-env/lib/python3.13/site-packages/packageurl/__init__.py", line 603, in from_string
raise ValueError(
f"purl type must be composed only of ASCII letters and numbers, period, dash and underscore: {type_!r}."
)
ValueError: purl type must be composed only of ASCII letters and numbers, period, dash and underscore: '111_^5'.
Activity
Add PURL_TYPES and enforce validation of PackageURL types
kdeldycke commentedon Apr 23, 2026
This issue is addressed by the #188 PR.
Add PURL_TYPES and enforce validation of PackageURL types
Add PURL_TYPES and enforce validation of PackageURL types
Add PURL_TYPES and enforce validation of PackageURL types
armijnhemel commentedon Apr 29, 2026
related: #229
armijnhemel commentedon Apr 29, 2026
This seems to be a much more structural problem, see #229 and #228 for more examples. Input validation is apparently difficult to do.
pombredanne commentedon Apr 29, 2026
The library has been originally designed to be flexible when parsing. There is a separate set of validation methods (validate and validate_string)
armijnhemel commentedon Apr 29, 2026
This one seems to have been fixed?