Skip to content

Use CoreSWHID instead of the deprecated SWHID class

Test Plan

Tests won't pass on Jenkins until swh-model > 1.0.0 is released.

Locally, tests pass only if swh-web-client is patched line this:

@@ -558,7 +566,7 @@ def content_raw(self, swhid: SWHIDish, **req_args) -> Iterator[bytes]:
         )
         r.raise_for_status()

-        yield from r.iter_content(chunk_size=None, decode_unicode=False)
+        yield r.content

     def origin_search(
         self,

Otherwise, r.iter_content blocks on the second iteration. I don't understand why.

EDIT: updating requests and requests-mock fixes the issue, somehow...


Migrated from D5195 (view on Phabricator)

Merge request reports