Page MenuHomeSoftware Heritage

RPCClient: Make methods {get,post}{,_stream} protected
ClosedPublic

Authored by vlorentz on Mar 1 2022, 3:04 PM.

Details

Reviewers
olasd
Group Reviewers
Reviewers
Maniphest Tasks
Restricted Maniphest Task
Commits
rDCOREa2af8c667e32: RPCClient: Make methods {get,post}{,_stream} protected
Summary

I want to make swh-objstorage inherit from RPCClient, but its get() and get_stream()
methods would class with RPCClient's.

Diff Detail

Repository
rDCORE Foundations and core functionalities
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 D7266 (id=26325)

Rebasing onto 9c9475f769...

Current branch diff-target is up to date.
Changes applied before test
commit a2af8c667e32e0523ae371506abc5aa0d11a85f8
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Tue Mar 1 15:04:44 2022 +0100

    RPCClient: Make methods {get,post}{,_stream} protected
    
    I want to make swh-objstorage inherit from RPCClient, but its get() and get_stream()
    methods would class with RPCClient's.

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

olasd added a subscriber: olasd.

Thanks, that's been an itch previously.

I guess some other modules will need a followup diff, although most users of these methods are probably autogenerated.

swh/core/api/__init__.py
301

Oh, that's never explicitly disposing of the response object, I wonder how/when the connections get properly returned to the pool (I guess the GC does it).

This revision is now accepted and ready to land.Mar 1 2022, 4:47 PM
vlorentz added a task: Restricted Maniphest Task.Mar 1 2022, 5:26 PM