see !97 (comment 147283) and https://forge.extranet.logilab.fr/cubicweb/cwclientlib/-/blob/branch/default/cwclientlib/cwproxy.py?ref_type=heads#L402