Skip to content
Snippets Groups Projects
Commit 690b7f82 authored by vlorentz's avatar vlorentz
Browse files

Add new class QualifiedSWHID to replace SWHID, and deprecate the latter.

Following the discussion on T3034, we decided to replace SWHID with
two or three classes:

* QualifiedSWHID to replace the existing SWHID (standard types + qualifiers)
* CoreSWHID, for "core SWHID" only (standard types + no qualifiers)
* ExtendedSWHID for internal use in Software Heritage (extra types + no qualifiers)

Since migrating from SWHID will break existing code, this commit uses
the opportunity to modernize it a little, ie.:

* `keyword`-only constructor, to get rid of the hacky default values for
  `object_type` and `object_id`
* enum instead of strings for the object type
* `bytes` instead of an hex string for the object id
* rename `metadata` to `qualifiers`
parent 758eb885
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment