Skip to content

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)

Migrated from D7233 (view on Phabricator)

Merge request reports