Use the cwd when the empty string is found in sys.path. This leads to
__file__ being an absolute path when the module is found in the
current directory.
diff --git a/Misc/NEWS b/Misc/NEWS
index 55940e5..6ec3df8 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -466,6 +466,9 @@
Library
-------
+- When '' is a path (e.g. in sys.path), make sure __file__ uses the current
+ working directory instead of ''.
+
- Issue #13609: Add two functions to query the terminal size:
os.get_terminal_size (low level) and shutil.get_terminal_size (high level).
Patch by Zbigniew Jędrzejewski-Szmek.