HomeSoftware Heritage

Replace xmltodict with ElementTree to handle SWORD documents

Description

Replace xmltodict with ElementTree to handle SWORD documents

xmltodict was already on the way out for the deposit, and the latest
libexpat security update broke it entirely when dealing with namespaces,
which means we cannot use it until this is addressed.

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1006317

Functional changes of this commit:

  1. No more writes to the 'metadata' jsonb column in the DB (as it strongly depends on xmltodict)
  2. ServiceDocumentDepositClient always outputs a list of collections, instead of None/dict/List[dict] depending on the number of collections (artefact of using xmltodict, which is replaced by proper parsing)

Details

Provenance
vlorentzAuthored on Feb 23 2022, 7:00 PM
vlorentzPushed on Feb 24 2022, 10:02 AM
Differential Revision
D7233: Replace xmltodict with ElementTree to handle SWORD documents
Parents
rDDEP5998e19648f4: Remove metadata_dict from the API
Branches
Loading...
Tags
Loading...
Build Status
Buildable 27099
Build 42381: test-and-buildJenkins console · Jenkins