# HG changeset patch # User Gregory Szorc # Date 2016-11-22 04:12:51 # Node ID d1b97fc87f551ac0b4359015bf57f9cfabca5c35 # Parent 8491845a75b250347f796f3dd966a8707c8d72b2 httppeer: document why super() isn't used Adding a follow-up to document lack of super() per Augie's request. diff --git a/mercurial/httppeer.py b/mercurial/httppeer.py --- a/mercurial/httppeer.py +++ b/mercurial/httppeer.py @@ -39,6 +39,9 @@ def decompressresponse(response, engine) # We need to wrap reader.read() so HTTPException on subsequent # reads is also converted. + # Ideally we'd use super() here. However, if ``reader`` isn't a new-style + # class, this can raise: + # TypeError: super() argument 1 must be type, not classobj origread = reader.read class readerproxy(reader.__class__): def read(self, *args, **kwargs):