Staging instance, all changes can be removed at any time

Skip to content

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

Following the discussion on #3034, 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

Migrated from D5081 (view on Phabricator)

Merge request reports

Loading