Martin Panter added the comment:

My guess is Michael was doing something like

>>> class Monkey(http.client.HTTPSConnection):
...     pass
... 
>>> http.client.HTTPSConnection = Monkey
>>> http.client.HTTPSConnection("bugs.python.org")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3.5/http/client.py", line 1210, in __init__
    source_address)
  [. . .]
  File "/usr/lib/python3.5/http/client.py", line 1210, in __init__
    source_address)
  File "/usr/lib/python3.5/http/client.py", line 1209, in __init__
    super(HTTPSConnection, self).__init__(host, port, timeout,
RecursionError: maximum recursion depth exceeded while calling a Python object

Looking at <https://github.com/cdent/wsgi-intercept/commit/d70dfa9>, I think 
this problem has been overcome by also overriding __init__(). IMO Python 
shouldn’t go very far out of its way to support monkey patching, and in this 
case the workaround was disliked by Eric. Given these two facts and no apparent 
interest since, I think we should close this.

----------
nosy: +martin.panter

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue13771>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to