Skip to content
Snippets Groups Projects
Forked from Platform / Development / swh-model
38 commits behind the upstream repository.
Valentin Lorentz's avatar
vlorentz authored
Having the escaped URL in `swhid.origin` is inconsistent with self.path
(which is always escaped) and never what we want, because it is only
useful while serializing, which is already handled by `__str__`.

This led to swh/devel/swh-indexer#4738
where swh-deposit parsed a qualified SWHID, then used `.origin` to get
an origin URL.

Additionally, as serialization always escapes the `origin` qualifier,
this means that deserializing then re-serializing a qualified SWHID
would double-escape it.

Finally, fixing this made the test uncover that `%` was not escaped
while serializing, while `;` was, leading to incorrect (and ambiguous)
escaped URLs.
9cf7ad9d
History
Name Last commit Last update
..
model