Commit 7a1af770 authored by Georg Brandl's avatar Georg Brandl

Patch #1536071: trace.py should now find the full module name of a

file correctly even on Windows.
parent 85fec591
......@@ -179,9 +179,11 @@ def fullmodname(path):
# 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
......
......@@ -64,6 +64,9 @@ Core and builtins
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.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment