httppeer: document why super() isn't used
authorGregory Szorc <gregory.szorc@gmail.com>
Mon, 21 Nov 2016 20:12:51 -0800
changeset 30484 d1b97fc87f55
parent 30483 8491845a75b2
child 30485 acd30a959980
httppeer: document why super() isn't used Adding a follow-up to document lack of super() per Augie's request.
mercurial/httppeer.py
--- a/mercurial/httppeer.py	Thu Nov 17 00:59:41 2016 -0800
+++ b/mercurial/httppeer.py	Mon Nov 21 20:12:51 2016 -0800
@@ -39,6 +39,9 @@
 
     # 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):