[issue18810] Stop doing stat calls in importlib.machinery.FileFinder to see if something is a file or folder

2013-11-01 Thread Brett Cannon
Changes by Brett Cannon br...@python.org: -- dependencies: +Restore empty string special casing in importlib.machinery.FileFinder ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18810 ___

[issue18810] Stop doing stat calls in importlib.machinery.FileFinder to see if something is a file or folder

2013-11-01 Thread Brett Cannon
Changes by Brett Cannon br...@python.org: -- resolution: - fixed stage: test needed - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18810 ___

[issue18810] Stop doing stat calls in importlib.machinery.FileFinder to see if something is a file or folder

2013-11-01 Thread Brett Cannon
Brett Cannon added the comment: Wrong issue -- dependencies: -Restore empty string special casing in importlib.machinery.FileFinder ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18810 ___

[issue18810] Stop doing stat calls in importlib.machinery.FileFinder to see if something is a file or folder

2013-11-01 Thread Brett Cannon
Brett Cannon added the comment: I'm going to go ahead and close this. I think the optimistic change is the only one worth making since it's backwards-compatible. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18810

[issue18810] Stop doing stat calls in importlib.machinery.FileFinder to see if something is a file or folder

2013-10-19 Thread Brett Cannon
Brett Cannon added the comment: Nick pointed out that the change to FileFinder is possibly going to break subclasses since the os module code doesn't treat '' as the cwd (which is unfortunate) and so people may have been relying on that never being the case. Really shouldn't matter all that

[issue18810] Stop doing stat calls in importlib.machinery.FileFinder to see if something is a file or folder

2013-10-19 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18810 ___

[issue18810] Stop doing stat calls in importlib.machinery.FileFinder to see if something is a file or folder

2013-10-18 Thread Brett Cannon
Changes by Brett Cannon br...@python.org: -- assignee: - brett.cannon ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18810 ___ ___

[issue18810] Stop doing stat calls in importlib.machinery.FileFinder to see if something is a file or folder

2013-10-18 Thread Roundup Robot
Roundup Robot added the comment: New changeset 11f2f4af1979 by Brett Cannon in branch 'default': Issue #18810: Be optimistic with stat calls when seeing if a directory http://hg.python.org/cpython/rev/11f2f4af1979 -- nosy: +python-dev ___ Python

[issue18810] Stop doing stat calls in importlib.machinery.FileFinder to see if something is a file or folder

2013-10-18 Thread Brett Cannon
Brett Cannon added the comment: The directory savings has actually been handled w/o semantics changes; in the last commit for this issue. The possibility of leaning on file extensions has been asked on python-dev. Once that is resolved then this issue will either get another commit or simply

[issue18810] Stop doing stat calls in importlib.machinery.FileFinder to see if something is a file or folder

2013-10-18 Thread Roundup Robot
Roundup Robot added the comment: New changeset 9895a9c20e8a by Brett Cannon in branch 'default': Add NEWS entry for issue #18810 http://hg.python.org/cpython/rev/9895a9c20e8a -- ___ Python tracker rep...@bugs.python.org

[issue18810] Stop doing stat calls in importlib.machinery.FileFinder to see if something is a file or folder

2013-08-29 Thread Brett Cannon
Brett Cannon added the comment: I also just tried using os.listdir() for a package before searching for __init__ and it didn't speed anything up either (actually timeit suggests that os.listdir() is worse than an isdir + 3 * isfile checks). Nor did caching directory stuff at the class level

[issue18810] Stop doing stat calls in importlib.machinery.FileFinder to see if something is a file or folder

2013-08-23 Thread Eric Snow
Eric Snow added the comment: Isn't this related somewhat to #7732? -- nosy: +eric.snow ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18810 ___ ___

[issue18810] Stop doing stat calls in importlib.machinery.FileFinder to see if something is a file or folder

2013-08-23 Thread Brett Cannon
Brett Cannon added the comment: I don't think it's related to the test_imp bug, but since it was never fully diagnosed I couldn't tell you. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18810

[issue18810] Stop doing stat calls in importlib.machinery.FileFinder to see if something is a file or folder

2013-08-23 Thread Brett Cannon
Brett Cannon added the comment: I did a quick check and at least stripping out the two stat calls for a directory or module file (left in package __init__.py) didn't make a significant difference. -- ___ Python tracker rep...@bugs.python.org

[issue18810] Stop doing stat calls in importlib.machinery.FileFinder to see if something is a file or folder

2013-08-22 Thread Brett Cannon
New submission from Brett Cannon: If the check was done based on simply the format what was being searched for (e.g. just assume it's a file if module.py exists in the directory) then a couple of stat calls per search could be saved. If that is deemed to dangerous due to