Message126101
This is code from recent trace.py (http://svn.python.org/view/python/branches/release27-maint/Lib/trace.py?view=markup):
trace.py:169:
# Ignore a file when it contains one of the ignorable paths
for d in self._dirs:
# The '+ os.sep' is to ensure that d is a parent directory,
# as compared to cases like:
# d = "/usr/local"
# filename = "/usr/local.py"
# or
# d = "/usr/local.py"
# filename = "/usr/local.py"
if filename.startswith(d + os.sep):
self._ignore[modulename] = 1
return 1
Directories comparison like "filename.startswith(d + os.sep)" works incorrect on case-insensitive filesystems (such as NTFS on Windows).
This leads to confusing results on Windows:
python trace.py --ignore-dir='$prefix' -t test.py
or
python trace.py --ignore-dir C:\Python26\Lib -t test.py
shows all calls from standard library, but this one doesn't:
python trace.py --ignore-dir=c:\python26\lib -t test.py
See attached test files and log for details. |
|
Date |
User |
Action |
Args |
2011-01-12 14:44:49 | vrutsky | set | recipients:
+ vrutsky |
2011-01-12 14:44:49 | vrutsky | set | messageid: <1294843489.43.0.983792093108.issue10896@psf.upfronthosting.co.za> |
2011-01-12 14:44:16 | vrutsky | link | issue10896 messages |
2011-01-12 14:44:16 | vrutsky | create | |
|