Page MenuHomeSoftware Heritage

client: Migrate to _post method call to stop deprecation warnings
ClosedPublic

Authored by ardumont on Apr 28 2022, 12:24 PM.

Details

Summary

Without this, this currently logs verbosely about it in worker execution logs for example [1].

Apr 28 09:52:08 worker3 python3[85609]: [2022-04-28 09:52:08,348: INFO/MainProcess] Received task: swh.loader.git.tasks.UpdateGitRepository[112ce5ff-e3d9-42a3-a0f2-a136a0f93c69]
Apr 28 09:52:14 worker3 python3[85616]: [2022-04-28 09:52:14,463: INFO/ForkPoolWorker-1] Load origin 'https://github.com/aquila/openwrt' with type 'git'
Apr 28 09:52:37 worker3 python3[85616]: Enumerating objects: 194170, done.
Apr 28 09:52:37 worker3 python3[85616]: /usr/lib/python3/dist-packages/swh/storage/api/client.py:45: DeprecationWarning: Call to deprecated method post. (Use _post instead) -- Deprecated since version 2.1.0.
Apr 28 09:52:37 worker3 python3[85616]:   return self.post("content/add", {"content": content})
Apr 28 09:52:37 worker3 python3[85616]: Total 194170 (delta 0), reused 0 (delta 0), pack-reused 194170
Apr 28 09:52:37 worker3 python3[85616]: [2022-04-28 09:52:37,152: INFO/ForkPoolWorker-1] Listed 6 refs for repo https://github.com/aquila/openwrt

Diff Detail

Repository
rDSTO Storage manager
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

vlorentz accepted this revision.
This revision is now accepted and ready to land.Apr 28 2022, 12:30 PM

Build is green

Patch application report for D7709 (id=27880)

Rebasing onto a942679a91...

Current branch diff-target is up to date.
Changes applied before test
commit fb5514112d332f9be1b797fac7f77e5c655a1a63
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Thu Apr 28 12:23:22 2022 +0200

    client: Migrate to _post method call to stop deprecation warnings

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