[Python-checkins] r51289 - in python/trunk: Lib/trace.py Misc/NEWS

georg.brandl python-checkins at python.org
Mon Aug 14 23:55:30 CEST 2006


Author: georg.brandl
Date: Mon Aug 14 23:55:28 2006
New Revision: 51289

Modified:
   python/trunk/Lib/trace.py
   python/trunk/Misc/NEWS
Log:
Patch #1536071: trace.py should now find the full module name of a
file correctly even on Windows.


Modified: python/trunk/Lib/trace.py
==============================================================================
--- python/trunk/Lib/trace.py	(original)
+++ python/trunk/Lib/trace.py	Mon Aug 14 23:55:28 2006
@@ -179,9 +179,11 @@
     # looking in sys.path for the longest matching prefix.  We'll
     # assume that the rest is the package name.
 
+    comparepath = os.path.normcase(path)
     longest = ""
     for dir in sys.path:
-        if path.startswith(dir) and path[len(dir)] == os.path.sep:
+        dir = os.path.normcase(dir)
+        if comparepath.startswith(dir) and comparepath[len(dir)] == os.sep:
             if len(dir) > len(longest):
                 longest = dir
 

Modified: python/trunk/Misc/NEWS
==============================================================================
--- python/trunk/Misc/NEWS	(original)
+++ python/trunk/Misc/NEWS	Mon Aug 14 23:55:28 2006
@@ -64,6 +64,9 @@
 Library
 -------
 
+- Patch #1536071: trace.py should now find the full module name of a
+  file correctly even on Windows.
+
 - logging's atexit hook now runs even if the rest of the module has
   already been cleaned up.
 


More information about the Python-checkins mailing list