This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author martin.panter
Recipients Quentin.Pradet, brett.cannon, martin.panter, pitrou
Date 2014-10-09.01:53:57
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1412819638.74.0.437990355735.issue21049@psf.upfronthosting.co.za>
In-reply-to
Content
Quentin, do you think this should be reopened?

Brett Cannon, I wonder if the only reason you closed this bug is because you thought the scenario to trigger it is very unlikely. Considering it affected someone else, and that there are other real-world triggers in addition to Py Socks, would it be okay to reopen it? I could try to make a patch or some concrete suggestions when I have a chance, if that helps change your mind :)

Perhaps a regression test could be based on this experiment:

>>> import sys, warnings
>>> sys.meta_path = None
>>> sys.modules.pop("linecache", None)
<module 'linecache' from '/usr/lib/python3.4/linecache.py'>
>>> warnings.warn("boom")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3.4/warnings.py", line 15, in showwarning
    file.write(formatwarning(message, category, filename, lineno, line))
  File "/usr/lib/python3.4/warnings.py", line 21, in formatwarning
    import linecache
  File "/home/proj/python/lib/misc.py", line 41, in __call__
    return self.__wrapped__(name, globals, locals, fromlist, level)
  File "<frozen importlib._bootstrap>", line 2237, in _find_and_load
  File "<frozen importlib._bootstrap>", line 2222, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 2150, in _find_spec
  File "/usr/lib/python3.4/warnings.py", line 15, in showwarning
    file.write(formatwarning(message, category, filename, lineno, line))
. . .
  File "<frozen importlib._bootstrap>", line 2236, in _find_and_load
RuntimeError: maximum recursion depth exceeded while calling a Python object
History
Date User Action Args
2014-10-09 01:53:58martin.pantersetrecipients: + martin.panter, brett.cannon, pitrou, Quentin.Pradet
2014-10-09 01:53:58martin.pantersetmessageid: <1412819638.74.0.437990355735.issue21049@psf.upfronthosting.co.za>
2014-10-09 01:53:58martin.panterlinkissue21049 messages
2014-10-09 01:53:57martin.pantercreate