Staging
v0.8.1
v0.8.1
https://github.com/python/cpython
Revision 27e27f7ee1f366e52cfd576b427e923190b6202e authored by Brett Cannon on 18 October 2013, 15:39:04 UTC, committed by Brett Cannon on 18 October 2013, 15:39:04 UTC
and stop importlib.machinery.FileFinder treating '' as '.'. Previous PathFinder transformed '' into '.' which led to __file__ for modules imported from the cwd to always be relative paths. This meant the values of the attribute were wrong as soon as the cwd changed. This change now means that as long as the site module is run (which makes all entries in sys.path absolute) then all values for __file__ will also be absolute unless it's for __main__ when specified by file path in a relative way (modules imported by runpy will have an absolute path). Now that PathFinder is no longer treating '' as '.' it only makes sense for FileFinder to stop doing so as well. Now no transformation is performed for the directory given to the __init__ method. Thanks to Madison May for the initial patch.
1 parent 40b22d0
Tip revision: 27e27f7ee1f366e52cfd576b427e923190b6202e authored by Brett Cannon on 18 October 2013, 15:39:04 UTC
Issue #18416: Have importlib.machinery.PathFinder treat '' as the cwd
Issue #18416: Have importlib.machinery.PathFinder treat '' as the cwd
Tip revision: 27e27f7
File | Mode | Size |
---|---|---|
c-api | ||
data | ||
distutils | ||
extending | ||
faq | ||
howto | ||
includes | ||
install | ||
library | ||
reference | ||
tools | ||
tutorial | ||
using | ||
whatsnew | ||
Makefile | -rw-r--r-- | 6.9 KB |
README.txt | -rw-r--r-- | 5.1 KB |
about.rst | -rw-r--r-- | 1.5 KB |
bugs.rst | -rw-r--r-- | 3.3 KB |
conf.py | -rw-r--r-- | 5.9 KB |
contents.rst | -rw-r--r-- | 415 bytes |
copyright.rst | -rw-r--r-- | 451 bytes |
glossary.rst | -rw-r--r-- | 39.0 KB |
license.rst | -rw-r--r-- | 42.0 KB |
make.bat | -rw-r--r-- | 1.5 KB |
Computing file changes ...