PEP on path module for standard library
cam.ac.uk at mh391.invalid
Thu Jul 21 23:24:20 CEST 2005
mkent at webmd.net wrote:
> I really love Jason's 'path' module. Sadly, I've encountered a serious
> problem with using it. When you try to 'freeze' an application module,
> and Jason's 'path' module is present in any of the directories that are
> looked at by freeze's module finder (your app doesn't have to import
> it), freeze goes into an infinite loop of imports, eventually getting a
> 'maximum recursion depth' exception. This seems to be related to
> freeze getting confused between 'os.path' and Jason's 'path'.
> I encountered this using Jason's latest 'path' module and Python 2.3.2.
> I was able to solve it for my use by renaming path.py to newpath.py
> and using 'from newpath import path' in my modules.
> I've just notified Jason about this. I presume a solution like mine
> will be used, and look forward to seeing Jason's module in stdlib.
This sounds like a bug in "freeze" rather than something that should be
worked around in the standard library. Although there have already been
people opposed to naming it path because the duplication with os.path
might confuse humans.
More information about the Python-list