From: Gregory P. Smith Date: Thu, 22 Oct 2015 20:12:20 +0000 (-0700) Subject: Issue21709: Call os.path.normcase when setting _srcfile for compatibility X-Git-Tag: v2.7.11rc1~58 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=64707923bef2f539c12446b880f715a70ed6c21a;p=thirdparty%2FPython%2Fcpython.git Issue21709: Call os.path.normcase when setting _srcfile for compatibility with what findCaller() does when running on non-POSIX platforms. (alternatively: the normcase calls in both places could be eliminated, but that touches more code and that refactoring hasn't even been done in 3 yet...) --- diff --git a/Lib/logging/__init__.py b/Lib/logging/__init__.py index 2c0f14f5b0e9..fa9ebe8bf23a 100644 --- a/Lib/logging/__init__.py +++ b/Lib/logging/__init__.py @@ -74,7 +74,7 @@ if hasattr(sys, '_getframe'): currentframe = lambda: sys._getframe(3) # _srcfile is used when walking the stack to check when we've got the first # caller stack frame. # -_srcfile = currentframe.__code__.co_filename +_srcfile = os.path.normcase(currentframe.__code__.co_filename) # _srcfile is only used in conjunction with sys._getframe(). # To provide compatibility with older versions of Python, set _srcfile