cpython/Lib
Brett Cannon 27e27f7ee1 Issue #18416: Have importlib.machinery.PathFinder treat '' as the cwd
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.
2013-10-18 11:39:04 -04:00
..
asyncio Rename the logger to plain "logger". 2013-10-17 15:39:45 -07:00
collections whitespace cleanup 2013-10-13 02:27:22 +02:00
concurrent Fix import of SimpleQueue. 2013-10-16 17:06:22 +01:00
ctypes #18981: merge with 3.3. 2013-09-13 23:54:41 +03:00
curses Fix docstring in curses (#16782) 2012-12-29 23:09:32 +02:00
dbm #17198: merge with 3.3. 2013-07-07 13:16:05 +02:00
distutils Issue #12641: Avoid passing "-mno-cygwin" to the mingw32 compiler, except when necessary. 2013-09-30 22:29:48 +02:00
email #18891: Complete new provisional email API. 2013-10-16 22:48:40 -04:00
encodings Issue #18200: Back out usage of ModuleNotFoundError (8d28d44f3a9a) 2013-07-04 17:43:24 -04:00
html #18020: improve html.escape speed by an order of magnitude. Patch by Matt Bryant. 2013-07-07 11:11:24 +02:00
http merge from 3.3 2013-09-29 18:59:27 -07:00
idlelib Version bump to 3.4.0a3. 2013-09-28 23:51:00 +01:00
importlib Issue #18416: Have importlib.machinery.PathFinder treat '' as the cwd 2013-10-18 11:39:04 -04:00
json Close #18264: int- and float-derived enums now converted to int or float. 2013-08-10 13:01:45 -07:00
lib2to3 Issue #18037: Do not escape '\u' and '\U' in raw strings. 2013-10-08 21:08:48 +03:00
logging Issue #19182: Fixed socket leak on exception when connecting. 2013-10-06 18:36:00 +01:00
msilib Issue #17047: remove doubled words found in 2.7 to 3.4 Lib/*, 2013-03-11 17:57:08 -04:00
multiprocessing Issue #18999: Make multiprocessing use context objects. 2013-10-16 16:41:56 +01:00
plat-aix4
plat-darwin
plat-freebsd4
plat-freebsd5
plat-freebsd6
plat-freebsd7
plat-freebsd8
plat-generic - Issue #17086: Backport the patches from the 3.3 branch to cross-build 2013-01-31 23:52:03 +01:00
plat-linux
plat-netbsd1
plat-next3
plat-sunos5
plat-unixware7
pydoc_data Updated pydoc topics.py for 3.4a3 release. 2013-09-28 23:43:34 +01:00
site-packages
sqlite3 #18741: merge with 3.3. 2013-08-17 16:13:22 +03:00
test Issue #18416: Have importlib.machinery.PathFinder treat '' as the cwd 2013-10-18 11:39:04 -04:00
tkinter Issue #19029: Change non-existing since 3.0 StringType to str. 2013-09-16 11:03:59 +03:00
turtledemo Issue # 17177: Stop using imp in turtledemo 2013-06-15 17:33:27 -04:00
unittest Issue #18996: TestCase.assertEqual() now more cleverly shorten differing 2013-09-23 23:07:00 +03:00
urllib Issue #18978: A more elegant technique for resolving the method 2013-09-08 12:54:33 -04:00
venv Closes #19139: Changed usage of __VENV_NAME__ and added __VENV_PROMPT__. 2013-10-02 11:36:16 +01:00
wsgiref Closes #19258: close WSGI server after handling request in demo code. 2013-10-14 16:52:13 +02:00
xml merge 3.3 (#19127) 2013-09-29 11:15:49 -04:00
xmlrpc Issue #18571: Implementation of the PEP 446: file descriptors and file handles 2013-08-28 00:53:59 +02:00
__future__.py
__phello__.foo.py
_bootlocale.py Fix wrong exception in _bootlocale (apparently this error condition is never triggered) 2013-10-12 15:00:44 +02:00
_collections_abc.py Issue #19218: set __name__ of _collections_abc to collections.abc in order to fix tests and keep beautiful qualified names. 2013-10-13 02:21:33 +02:00
_compat_pickle.py
_dummy_thread.py Issue #18808: Thread.join() now waits for the underlying thread state to be destroyed before returning. 2013-09-07 23:38:37 +02:00
_markupbase.py
_osx_support.py #18705: merge with 3.3. 2013-08-17 15:53:55 +03:00
_pyio.py Issue #17003: Unified the size argument names in the io module with common 2013-09-16 23:18:10 +03:00
_sitebuiltins.py Normalize whitespace 2013-08-06 22:57:31 +02:00
_strptime.py #18705: merge with 3.3. 2013-08-17 15:53:55 +03:00
_threading_local.py
_weakrefset.py
abc.py Fix #16832 - expose cache validity checking support in ABCMeta 2013-05-25 18:41:50 +02:00
aifc.py Issue #19131: The aifc module now correctly reads and writes sampwidth of 2013-10-12 18:23:21 +03:00
antigravity.py
argparse.py Issue #18920: argparse's default version action (for -v, --version) should 2013-09-06 06:49:15 -07:00
ast.py create NameConstant AST class for None, True, and False literals (closes #16619) 2012-12-06 17:41:04 -05:00
asynchat.py Issue #18743: Fix references to non-existant "StringIO" module 2013-08-29 11:39:48 +03:00
asyncore.py Do not raise exception on close() on account of socket attribute still being None: 2013-04-09 17:21:25 +02:00
base64.py Close #17839: support bytes-like objects in base64 module 2013-10-03 00:43:22 +10:00
bdb.py
binhex.py
bisect.py Issue #18200: Back out usage of ModuleNotFoundError (8d28d44f3a9a) 2013-07-04 17:43:24 -04:00
bz2.py Issue #18200: Back out usage of ModuleNotFoundError (8d28d44f3a9a) 2013-07-04 17:43:24 -04:00
calendar.py #18705: fix a number of typos. Patch by Févry Thibault. 2013-08-17 15:50:46 +03:00
cgi.py Closes #17335: remove no-op assignment. 2013-10-13 22:16:48 +02:00
cgitb.py merge #12890: don't emit <p> tags in text mode when logdir specified. 2012-10-27 14:55:25 -04:00
chunk.py Replace IOError with OSError (#16715) 2012-12-25 16:47:37 +02:00
cmd.py Issue #18200: Back out usage of ModuleNotFoundError (8d28d44f3a9a) 2013-07-04 17:43:24 -04:00
code.py Closes #17730: in code.interact(), when banner="", do not print anything. 2013-10-13 21:49:06 +02:00
codecs.py Describe 'surrogateescape' in the documentation. 2013-06-16 12:58:48 -04:00
codeop.py
colorsys.py Issue #14323: Expanded the number of digits in the coefficients for the 2013-08-06 11:51:23 +03:00
compileall.py Issue #17177: stop using imp for compileall. 2013-06-14 23:04:02 -04:00
configparser.py Merged fix for issue #18260 from 3.3 2013-06-23 19:12:12 +02:00
contextlib.py Close #19266: contextlib.ignore -> contextlib.suppress 2013-10-17 23:40:57 +10:00
copy.py Issue #18200: Back out usage of ModuleNotFoundError (8d28d44f3a9a) 2013-07-04 17:43:24 -04:00
copyreg.py
cProfile.py Fix #17197: profile/cProfile modules refactored so that code of run() and runctx() utility functions is not duplicated in both modules. 2013-02-25 11:36:40 +01:00
crypt.py Issue #18405: Improve the entropy of crypt.mksalt(). 2013-08-14 01:39:14 +02:00
csv.py #18155: Regex-escape delimiter, in case it is a regex special char. 2013-06-29 18:40:53 -04:00
datetime.py improve comment 2013-08-29 17:29:30 -04:00
decimal.py merge from 3.3 2013-09-07 23:20:06 -07:00
difflib.py #18705: merge with 3.3. 2013-08-17 15:53:55 +03:00
dis.py Close #18538: `python -m dis` now uses argparse. 2013-08-25 00:48:17 +10:00
doctest.py Fix tests for #11798 2013-08-29 01:24:39 +03:00
dummy_threading.py
enum.py Close #19156: add tests and fix for Enum helper edge cases. Patch from CliffM. 2013-10-06 17:19:54 -07:00
filecmp.py Issue #18149: Add filecmp.clear_cache() to manually clear the filecmp cache. 2013-06-14 15:19:11 -07:00
fileinput.py Merge with 3.3 2013-06-28 18:59:52 -04:00
fnmatch.py Set cache sizes to a power-of-two 2013-02-17 01:33:37 -08:00
formatter.py Issue #18716: Deprecate the formatter module 2013-10-04 11:38:59 -04:00
fractions.py Issue #16469: Fraction(float('nan')) and Fraction(float('inf')) now raise ValueError and OverflowError (resp.), not TypeError. 2012-11-15 20:58:40 +00:00
ftplib.py Issue #18200: Back out usage of ModuleNotFoundError (8d28d44f3a9a) 2013-07-04 17:43:24 -04:00
functools.py Close #10042: functools.total_ordering now handles NotImplemented 2013-10-02 00:02:03 +10:00
genericpath.py #18705: merge with 3.3. 2013-08-17 15:53:55 +03:00
getopt.py Issue #18200: Back out usage of ModuleNotFoundError (8d28d44f3a9a) 2013-07-04 17:43:24 -04:00
getpass.py #18116: getpass no longer always falls back to stdin. 2013-07-10 17:02:24 -04:00
gettext.py Replace IOError with OSError (#16715) 2012-12-25 16:47:37 +02:00
glob.py Issue #16695: Document how glob handles filenames starting with a dot 2013-02-23 19:56:15 +01:00
gzip.py Issue #18743: Fix references to non-existant "StringIO" module 2013-08-29 11:39:48 +03:00
hashlib.py Issue #18582: Add 'pbkdf2_hmac' to the hashlib module. 2013-10-13 00:52:43 +02:00
heapq.py Issue #19018: The heapq.merge() function no longer suppresses IndexError 2013-09-14 20:51:57 -07:00
hmac.py Issue 18240: The HMAC module is no longer restricted to bytes and accepts 2013-07-01 13:08:42 +02:00
imaplib.py Issue #18200: Back out usage of ModuleNotFoundError (8d28d44f3a9a) 2013-07-04 17:43:24 -04:00
imghdr.py Replace IOError with OSError (#16715) 2012-12-25 16:47:37 +02:00
imp.py merge for issue #18755 2013-08-23 11:52:19 -04:00
inspect.py Issue #19030: special-cased __dict__ as the actual dict is not returned, a proxy is. 2013-10-18 01:22:08 -07:00
io.py Replace IOError with OSError (#16715) 2012-12-25 16:47:37 +02:00
ipaddress.py #18705: fix a number of typos. Patch by Févry Thibault. 2013-08-17 15:50:46 +03:00
keyword.py 17830: preserve line endings of original file when updating keywords. 2013-04-25 12:01:36 -04:00
linecache.py Replace IOError with OSError (#16715) 2012-12-25 16:47:37 +02:00
locale.py Issue #9548: Add a minimal "_bootlocale" module that is imported by the _io module instead of the full locale module. 2013-10-12 00:13:50 +02:00
lzma.py Issue #16034 follow-up: Apply optimizations to the lzma module. 2012-10-21 16:57:32 +02:00
macpath.py Issue #18200: Back out usage of ModuleNotFoundError (8d28d44f3a9a) 2013-07-04 17:43:24 -04:00
macurl2path.py
mailbox.py Merge #19037: adjust file times *before* moving maildir files into place. 2013-09-18 08:36:36 -04:00
mailcap.py Replace IOError with OSError (#16715) 2012-12-25 16:47:37 +02:00
mimetypes.py Issue #18200: Back out usage of ModuleNotFoundError (8d28d44f3a9a) 2013-07-04 17:43:24 -04:00
modulefinder.py #18705: merge with 3.3. 2013-08-17 15:53:55 +03:00
netrc.py Merge #14984: only import pwd on POSIX. 2013-09-18 08:59:47 -04:00
nntplib.py Issue #18200: Back out usage of ModuleNotFoundError (8d28d44f3a9a) 2013-07-04 17:43:24 -04:00
ntpath.py Issue #9035: os.path.ismount now recognises volumes mounted below 2013-08-01 12:44:00 +01:00
nturl2path.py Replace IOError with OSError (#16715) 2012-12-25 16:47:37 +02:00
numbers.py
opcode.py rather than passing locals to the class body, just execute the class body in the proper environment 2013-05-16 14:37:25 -05:00
operator.py Issue #18200: Back out usage of ModuleNotFoundError (8d28d44f3a9a) 2013-07-04 17:43:24 -04:00
optparse.py #18705: fix a number of typos. Patch by Févry Thibault. 2013-08-17 15:50:46 +03:00
os.py Issue #19218: Rename collections.abc to _collections_abc in order to speed up interpreter start 2013-10-13 02:04:20 +02:00
pdb.py merge with 3.3 2013-10-14 16:08:25 +02:00
pickle.py Issue #18783: Removed existing mentions of Python long type in docstrings, 2013-08-27 20:17:03 +03:00
pickletools.py Issue #18783: Removed existing mentions of Python long type in docstrings, 2013-08-27 20:17:03 +03:00
pipes.py
pkgutil.py Issue #17177: The imp module is pending deprecation. 2013-06-16 13:13:40 -04:00
platform.py #18705: merge with 3.3. 2013-08-17 15:53:55 +03:00
plistlib.py Ensure that plistlib doesn't corrupt deeply nested datastructures 2013-04-23 13:47:22 +02:00
poplib.py #18705: merge with 3.3. 2013-08-17 15:53:55 +03:00
posixpath.py Add in a comment that was removed in 240adc564539 (requested by Victor Stinner) 2013-07-22 19:05:48 -05:00
pprint.py Remove builtin "caching" in pprint 2013-10-03 21:29:36 +02:00
profile.py Fix #17197: profile/cProfile modules refactored so that code of run() and runctx() utility functions is not duplicated in both modules. 2013-02-25 11:36:40 +01:00
pstats.py Issue #18200: Back out usage of ModuleNotFoundError (8d28d44f3a9a) 2013-07-04 17:43:24 -04:00
pty.py Issue #18200: Back out usage of ModuleNotFoundError (8d28d44f3a9a) 2013-07-04 17:43:24 -04:00
py_compile.py Issue #17222: fix a mix-up in some exception messages. 2013-06-17 17:48:30 -04:00
pyclbr.py
pydoc.py Issue #18716: Deprecate the formatter module 2013-10-04 11:38:59 -04:00
queue.py Issue #18676: Change 'positive' to 'non-negative' in queue.py put and get 2013-08-10 18:17:13 -04:00
quopri.py Issue #18200: Back out usage of ModuleNotFoundError (8d28d44f3a9a) 2013-07-04 17:43:24 -04:00
random.py Issue #19218: Rename collections.abc to _collections_abc in order to speed up interpreter start 2013-10-13 02:04:20 +02:00
re.py Back out accidentally pushed changeset b51218966201. 2013-10-13 09:32:59 +02:00
reprlib.py Issue #18200: Back out usage of ModuleNotFoundError (8d28d44f3a9a) 2013-07-04 17:43:24 -04:00
rlcompleter.py #18705: merge with 3.3. 2013-08-17 15:53:55 +03:00
runpy.py Issue #17177: The imp module is pending deprecation. 2013-06-16 13:13:40 -04:00
sched.py merge 2013-07-13 22:48:49 -07:00
selectors.py Issue #16853: Add new selectors module. 2013-09-04 19:02:49 +02:00
shelve.py Add spaces to follow PEP8. 2012-10-06 18:38:30 +03:00
shlex.py Revert "Issue #16121: Fix line number accounting in shlex" 2013-02-23 23:12:35 +01:00
shutil.py #18705: merge with 3.3. 2013-08-17 15:53:55 +03:00
site.py Issue #19205 fix 406529adf156 2013-10-12 00:28:17 +02:00
smtpd.py Issue #18922: Now The Lib/smtpd.py and Tools/i18n/msgfmt.py scripts write 2013-09-05 17:44:53 +03:00
smtplib.py Issue #18200: Back out usage of ModuleNotFoundError (8d28d44f3a9a) 2013-07-04 17:43:24 -04:00
sndhdr.py #5024: whichhdr now returns the frame count for WAV files. 2013-03-18 17:42:42 -04:00
socket.py Switch the AF_* and SOCK_* constants in the socket module to IntEnum. 2013-08-31 15:13:30 -07:00
socketserver.py Issue #18200: Back out usage of ModuleNotFoundError (8d28d44f3a9a) 2013-07-04 17:43:24 -04:00
sre_compile.py Issue #18050: Fixed an incompatibility of the re module with Python 3.3.0 2013-09-20 21:24:39 +03:00
sre_constants.py Issue #18050: Fixed an incompatibility of the re module with Python 3.3.0 2013-09-20 21:24:39 +03:00
sre_parse.py Issue #18050: Fixed an incompatibility of the re module with Python 3.3.0 2013-09-20 21:24:39 +03:00
ssl.py #18705: merge with 3.3. 2013-08-17 15:53:55 +03:00
stat.py Issue #15767: Excise the remaining instances of ModuleNotFoundError 2013-07-04 18:16:15 -04:00
string.py
stringprep.py
struct.py Issue #17804: New function `struct.iter_unpack` allows for streaming struct unpacking. 2013-04-27 00:20:04 +02:00
subprocess.py Close #19284: Handle -R properly in flag helper 2013-10-18 22:39:50 +10:00
sunau.py Issue #18919: If the close() method of a writer in the sunau or wave module 2013-10-12 21:36:10 +03:00
symbol.py remain symbol.main to symbol._main mirroring token.py 2013-02-05 10:13:22 -05:00
symtable.py modernize some modules' code by using with statement around open() 2013-02-12 02:04:27 +01:00
sysconfig.py Issue #19205: Don't import the 're' module in site and sysconfig module to 2013-10-12 00:24:55 +02:00
tabnanny.py Replace IOError with OSError (#16715) 2012-12-25 16:47:37 +02:00
tarfile.py Close #18281: superfluous stat constants removed from tarfile 2013-10-12 18:13:02 -07:00
telnetlib.py Issue #16717: get rid of socket.error, replace with OSError 2012-12-18 23:10:48 +02:00
tempfile.py Issue #18849: Fixed a Windows-specific tempfile bug where collision with an 2013-09-06 06:14:16 -07:00
textwrap.py Add shorten to __all_ (issues #18585 and #18725). 2013-10-16 13:07:53 +03:00
this.py
threading.py merge with 3.3 2013-10-13 10:44:04 +02:00
timeit.py Issue #17414: Add timeit, repeat, and default_timer to timeit.__all__. 2013-03-15 03:04:25 -04:00
token.py Replace IOError with OSError (#16715) 2012-12-25 16:47:37 +02:00
tokenize.py Issue #18873: The tokenize module, IDLE, 2to3, and the findnocoding.py script 2013-09-16 23:57:00 +03:00
trace.py Issue #18200: Back out usage of ModuleNotFoundError (8d28d44f3a9a) 2013-07-04 17:43:24 -04:00
traceback.py merge with 3.3 2013-10-13 23:34:06 +02:00
tty.py
turtle.py #18705: merge with 3.3. 2013-08-17 15:53:55 +03:00
types.py Close #19030: inspect.getmembers and inspect.classify_class_attrs 2013-10-18 00:27:39 -07:00
uu.py
uuid.py Issue #18784: The uuid module no more attempts to load libc via ctypes.CDLL, 2013-09-13 07:49:36 +03:00
warnings.py Issue #18200: Back out usage of ModuleNotFoundError (8d28d44f3a9a) 2013-07-04 17:43:24 -04:00
wave.py Issue #19276: Fixed the wave module on 64-bit big-endian platforms. 2013-10-17 23:05:19 +03:00
weakref.py Issue #15528: Delay importing atexit until weakref.finalize() used. 2013-06-08 16:52:29 +01:00
webbrowser.py - Issue #17536: Add to webbrowser's browser list: www-browser, x-www-browser, 2013-03-24 18:50:23 +01:00
xdrlib.py Merge: change docstring for xdrlib.Error to use new style exceptions. 2012-11-01 13:43:31 +02:00
zipfile.py Issue #19053: ZipExtFile.read1() with non-zero argument no more returns empty 2013-09-27 22:14:31 +03:00