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 kaizhu
Recipients kaizhu
Date 2009-07-17.15:36:07
SpamBayes Score 1.2448711e-06
Marked as misclassified No
Message-id <1247844969.58.0.287534577391.issue6504@psf.upfronthosting.co.za>
In-reply-to
Content
# copy this to test.py
# > touch foo.txt
# > python3.1 -c "import test; import collections"
# > ...
# >   File "test.py", line 5, in find_module
# >     def find_module(self, mname, path = None): open("foo.txt")
# >   File "test.py", line 5, in find_module
# >     def find_module(self, mname, path = None): open("foo.txt")
# >   File "test.py", line 5, in find_module
# >     def find_module(self, mname, path = None): open("foo.txt")
# >   File "test.py", line 5, in find_module
# >     def find_module(self, mname, path = None): open("foo.txt")
# > RuntimeError: maximum recursion depth exceeded while calling a
# > Python object
class importer(object):
  def find_module(self, mname, path = None): open("foo.txt")
import sys; sys.meta_path.append(importer)

***

# note recursion behavior stops if we don't call open()
class importer(object):
  def find_module(self, mname, path = None): pass
import sys; sys.meta_path.append(importer)
History
Date User Action Args
2009-07-17 15:36:09kaizhusetrecipients: + kaizhu
2009-07-17 15:36:09kaizhusetmessageid: <1247844969.58.0.287534577391.issue6504@psf.upfronthosting.co.za>
2009-07-17 15:36:08kaizhulinkissue6504 messages
2009-07-17 15:36:07kaizhucreate