New submission from Antoine Pitrou <pit...@free.fr>: An empty sys.path string means the current directory in relative terms:
$ touch foo.py $ python3 -c "import foo; print(foo.__file__)" foo.py But importlib uses os.getcwd() instead in PathFinder._path_importer_cache(). This impacts semantics of path searching, as well as the values of __file__ and __cached__ attributes. ---------- assignee: brett.cannon components: Library (Lib) messages: 153656 nosy: brett.cannon, pitrou priority: normal severity: normal status: open title: importlib mixes up '.' and os.getcwd() versions: Python 3.2, Python 3.3 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue14052> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com