file correctly even on Windows.
# 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
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.