Page MenuHomeSoftware Heritage

swh-web-client: Use CoreSWHID instead of the deprecated SWHID class.
ClosedPublic

Authored by vlorentz on Mar 1 2021, 4:39 PM.

Diff Detail

Repository
rDWCLI Web client
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Build is green

Patch application report for D5173 (id=18498)

Rebasing onto 2477fd09c0...

Current branch diff-target is up to date.
Changes applied before test
commit b061917c702168975a5c273845f5ade5ae03fce6
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Mon Mar 1 16:39:22 2021 +0100

    Use CoreSWHID instead of the deprecated SWHID class.

See https://jenkins.softwareheritage.org/job/DWCLI/job/tests-on-diff/38/ for more details.

anlambert added a subscriber: anlambert.
anlambert added inline comments.
swh/web/client/client.py
53–61

_get_swhid seems to be only used to extract the object_id field when generating Web API URLs.

Turning that function into _get_object_hex_id wrapping the call to hash_to_hex will
simplify the content of the f-strings used to generate URLs.

This revision is now accepted and ready to land.Mar 1 2021, 5:13 PM
swh/web/client/client.py
53–61

good call

Build is green

Patch application report for D5173 (id=18508)

Rebasing onto 2477fd09c0...

Current branch diff-target is up to date.
Changes applied before test
commit de2c707eb8082b9a3d5c8f842cd3b42be72a349a
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Mon Mar 1 16:39:22 2021 +0100

    Use CoreSWHID instead of the deprecated SWHID class.

See https://jenkins.softwareheritage.org/job/DWCLI/job/tests-on-diff/39/ for more details.