cpython/Lib
Éric Araujo a7e33a10ae Clean up test_shutil, to facilitate upcoming improvements (#12721).
The tests now have two convenience functions to wrap os.path.join, open
and read or write instead of four or six slightly different functions.
The new functions accept a tuple of path segments but not a list
anymore, as it makes no sense to use a list here; I have also removed
the default value for the contents in write_file, as I find it better to
have the contents at the call site.

For simple open then read/write calls, I have left the usual idiom (with
open + read/write), as it is short and readable enough.

I’ve also changed some convoluted cleanup code to just use rmtree, and
removed dubious LBYL os.path.exists checks.  The tests still pass on my
machine, and leave no file in $TMP.  test_shutil is not as clean as it
could be, but I’ll stop here.

Initial patch provided by Hynek Schlawack, in preparation for a new
feature with new tests in #12715.
2011-08-12 19:51:35 +02:00
..
collections Add support for unary plus and unary minus to collections.Counter() 2011-08-09 13:00:40 -07:00
concurrent Close the call queue in concurrent.futures.ProcessPoolExecutor when 2011-07-16 23:52:02 +02:00
ctypes merge 3.2 2011-07-13 23:11:14 -05:00
curses merge from 3.2 - Fix closes Issue11439 Remove the SVN keywords from the code as it is no longer applicable in hg. Patch Contributed by Neil Muller. 2011-07-28 23:39:08 +08:00
dbm Merge 3.1 2011-04-20 19:24:09 +02:00
distutils Revert cosmetic change. 2011-08-10 02:46:33 +02:00
email #665194: support roundtripping RFC2822 date stamps in the email.utils module 2011-07-20 11:41:21 -04:00
encodings
html Merge 3.1 2011-05-25 18:13:49 +02:00
http Merge with 3.2. 2011-08-03 08:29:12 +02:00
idlelib Issue #12540: Prevent zombie IDLE processes on Windows due to changes 2011-08-04 23:38:19 -07:00
importlib Closes #12291 for 3.3 - merged fix from 3.2. 2011-07-02 17:16:02 +01:00
json #5723: merge with 3.1. 2011-05-14 06:47:51 +03:00
lib2to3 Merge fixes for #9860, #11104/#8688 and #12331 from 3.2 2011-07-31 18:33:00 +02:00
logging Fixes #12637: Merged fix from 3.2 and added test. 2011-07-25 19:58:13 +01:00
msilib merge #11696 2011-03-27 21:07:13 +02:00
multiprocessing Remove indirection in threading (issue #10968). 2011-07-28 00:28:28 +02:00
packaging Use our existing drop-in, no-op decorator instead of redefining it. 2011-08-12 00:15:41 +02:00
plat-aix4
plat-darwin
plat-freebsd4
plat-freebsd5
plat-freebsd6
plat-freebsd7
plat-freebsd8
plat-generic
plat-linux2
plat-linux3 Issue #12571: Add a plat-linux3 directory mirroring the plat-linux2 directory, 2011-07-20 00:26:23 +02:00
plat-netbsd1
plat-next3
plat-os2emx
plat-sunos5
plat-unixware7
pydoc_data Update pydoc topics. 2011-07-03 09:31:04 +02:00
site-packages
sqlite3 Issue #10811: Use TestCase.assertRaises() in the new test 2011-05-09 12:50:41 +02:00
test Clean up test_shutil, to facilitate upcoming improvements (#12721). 2011-08-12 19:51:35 +02:00
tkinter Issue #8716: Instead of relying on Aqua Tk exceptions to detect lack of 2011-07-05 19:11:15 -07:00
turtledemo #12677: correct turtle orientation in doc 2011-08-07 17:12:19 +02:00
unittest test that TestCase doesn't get cycles 2011-07-14 12:48:25 -05:00
urllib merge from 3.2 - Fix closes issue12698 - make the no_proxy environment variable handling a bit lenient (accomodate spaces in between the items) 2011-08-06 12:28:16 +08:00
wsgiref
xml (merge 3.2) Issue #12451: xml.dom.pulldom: parse() now opens files in binary 2011-07-04 01:27:37 +02:00
xmlrpc
__future__.py
__phello__.foo.py
_compat_pickle.py
_dummy_thread.py Issue #11223: Replace threading._info() by sys.thread_info 2011-04-30 14:53:09 +02:00
_markupbase.py
_pyio.py Issue #12591: Allow io.TextIOWrapper to work with raw IO objects (without 2011-07-23 21:50:21 +02:00
_strptime.py
_threading_local.py
_weakrefset.py
abc.py
aifc.py
antigravity.py
argparse.py #10424: argument names are now included in the missing argument message 2011-06-09 12:34:07 -04:00
ast.py remove ast.__version__ (closes #12273) 2011-07-15 21:10:13 -05:00
asynchat.py
asyncore.py Merge - Issue #12502: asyncore: fix polling loop with AF_UNIX sockets. 2011-07-14 20:00:49 +02:00
base64.py
bdb.py
binhex.py remove unused imports (closes #12432) 2011-06-28 10:25:04 -05:00
bisect.py
bz2.py Miscellaneous cleanups to bz2 and test_bz2 following issue #1625. 2011-05-30 01:12:24 +02:00
calendar.py Fix closes Issue10087 - fixing the output of calendar display in the html format. Patch by Chris Lambacher. Test Contributed by catherine. 2011-08-11 09:22:52 +08:00
cgi.py Add cgi.closelog() function to close the log file 2011-07-14 22:28:36 +02:00
cgitb.py remove unused imports (closes #12432) 2011-06-28 10:25:04 -05:00
chunk.py
cmd.py
code.py
codecs.py Revert my commit 3555cf6f9c98: "Issue #8796: codecs.open() calls the builtin 2011-05-27 16:50:40 +02:00
codeop.py
colorsys.py
compileall.py Issue #11169: compileall module uses repr() to format filenames and paths to 2011-05-11 00:36:28 +02:00
configparser.py Merged minor cleanups from 3.2. 2011-04-29 16:17:51 +02:00
contextlib.py remove unused imports (closes #12432) 2011-06-28 10:25:04 -05:00
copy.py #11572: improvements to copy module tests along with removal of old test suite 2011-08-05 23:05:35 +02:00
copyreg.py
cProfile.py
crypt.py
csv.py
datetime.py Issue #11930: Remove year >= 1000 limitation from datetime.strftime. 2011-05-02 13:14:24 -04:00
decimal.py Issue #12080: Fix a performance issue in Decimal._power_exact that causes some corner-case Decimal.__pow__ calls to take an unreasonably long time. 2011-06-04 18:14:23 +01:00
difflib.py Issue 11747: Fix output format for context diffs. 2011-04-12 15:25:30 -07:00
dis.py
doctest.py (merge 3.2) Issue #12451: doctest.debug_script() doesn't create a temporary 2011-06-30 17:39:17 +02:00
dummy_threading.py
filecmp.py Issue 11802: filecmp cache was growing without bound. 2011-06-25 17:20:21 +02:00
fileinput.py
fnmatch.py
formatter.py
fractions.py
ftplib.py Merge: #10883: Fix socket leaks in urllib.request. 2011-07-23 14:25:45 +02:00
functools.py Sync-up minor code edits with the default branch. 2011-05-05 14:15:12 -07:00
genericpath.py
getopt.py Issue #11621: fix bootstrap issue with getopt/gettext (following d3e46930ffe9) 2011-03-21 16:04:06 +01:00
getpass.py Fix for issue11236 getpass.getpass to respond ctrl-c or ctrl-z 2011-04-26 20:59:46 +08:00
gettext.py
glob.py Fix closes issue12432 - remove the unused sys from glob.py 2011-07-03 17:21:05 -07:00
gzip.py Remove dead code in gzip. 2011-04-13 18:57:40 +02:00
hashlib.py fix whitespace 2011-05-14 15:35:56 -07:00
heapq.py Merge 3.1 2011-04-20 19:24:09 +02:00
hmac.py
imaplib.py Issue #1441530: In imaplib, read the data in one chunk to speed up large 2011-05-24 23:47:49 +02:00
imghdr.py
inspect.py remove unused imports (closes #12432) 2011-06-28 10:25:04 -05:00
io.py
keyword.py
linecache.py
locale.py (merge) Fix #10154 and #10090: locale normalizes the UTF-8 encoding to "UTF-8" instead of "UTF8" 2011-05-17 13:03:54 +02:00
macpath.py
macurl2path.py
mailbox.py #11700: proxy object close methods can now be called multiple times 2011-06-17 22:24:05 -04:00
mailcap.py
mimetypes.py
modulefinder.py Fix bug I unwittingly added in 1521d9837d16 (found by Ezio Melotti) 2011-08-01 15:29:07 +02:00
netrc.py fix regression in netrc comment handling (closes #12009) 2011-06-10 11:32:52 -05:00
nntplib.py
ntpath.py Correction to 88e318166eaf - Issue #11583 2011-06-09 09:10:38 -05:00
nturl2path.py Fix Issue11474 - fix url2pathname() handling of '/C|/' on Windows 2011-04-14 13:16:30 +08:00
numbers.py
opcode.py excise the remains of STOP_CODE, which hasn't done anything useful for years 2011-07-17 22:49:50 -05:00
optparse.py Merge #8158: add missing 'description' description to optparse docstring. 2011-05-04 21:08:07 -04:00
os.py Issue #11459: A bufsize value of 0 in subprocess.Popen() really creates 2011-03-19 17:04:13 +01:00
os2emxpath.py
pdb.py
pickle.py remove __version__s dependent on subversion keyword expansion (closes #12221) 2011-05-31 20:52:17 -05:00
pickletools.py
pipes.py Add shlex.quote function, to escape filenames and command lines (#9723). 2011-07-27 18:29:31 +02:00
pkgutil.py Merge 3.2 2011-05-25 18:22:26 +02:00
platform.py Issue #12549: Correct test_platform to not fail when OS X returns 'x86_64' 2011-07-13 15:09:49 -07:00
plistlib.py Issue #12452: Plist and Dict are now deprecated 2011-07-04 14:28:45 +02:00
poplib.py
posixpath.py
pprint.py
profile.py strip trailing ws 2011-06-27 09:18:46 -05:00
pstats.py Merge profile docs followup (#12417) from 3.1 2011-07-28 23:00:14 +02:00
pty.py
py_compile.py
pyclbr.py
pydoc.py Merge fix for #8887 from 3.2 2011-07-29 17:38:23 +02:00
queue.py
quopri.py
random.py Code simplification suggested by Sven Marnach. 2011-06-25 11:31:46 +02:00
re.py #2650: re.escape() no longer escapes the "_". 2011-04-10 12:59:16 +03:00
reprlib.py Close #12028: Make threading._get_ident() public, rename it to 2011-05-30 23:02:52 +02:00
rlcompleter.py
runpy.py Issue #12451: runpy: run_path() now opens the Python script in binary mode, 2011-07-04 01:45:39 +02:00
sched.py
shelve.py
shlex.py Avoid unwanted behavior change in shlex.quote (see #9723). 2011-08-09 23:18:06 +02:00
shutil.py Remove unused names in except clauses 2011-08-10 20:54:33 +02:00
site.py Replace open(filename, 'rU') by open(filename, 'r') 2011-05-04 13:55:36 +02:00
smtpd.py
smtplib.py Addressing the review comments by Antoine Pitrou for smtplib.py and test_smtplib.py. Review comments by Ezio Melotti for smtplib.rst 2011-07-31 09:14:17 +08:00
sndhdr.py
socket.py Issue #11127: Raise a TypeError when trying to pickle a socket object. 2011-03-20 23:56:36 +01:00
socketserver.py Fix closes issue #11109 - socketserver.ForkingMixIn leaves zombies, also fails to reap all zombies in one pass. 2011-05-26 00:22:59 +08:00
sre_compile.py
sre_constants.py
sre_parse.py
ssl.py Issue #12551: Provide a get_channel_binding() method on SSL sockets so as 2011-07-21 01:11:30 +02:00
stat.py Issue #8746: Correct faulty configure checks so that os.chflags() and 2011-06-28 00:00:28 -07:00
string.py
stringprep.py
struct.py
subprocess.py Issue #12607: In subprocess, fix issue where if stdin, stdout or stderr is 2011-07-27 07:16:31 +02:00
sunau.py
symbol.py
symtable.py
sysconfig.cfg Update comments in sysconfig.cfg 2011-06-06 20:07:04 +02:00
sysconfig.py Branch merge 2011-05-26 16:35:14 +02:00
tabnanny.py
tarfile.py merge from 3.2 - Fix closes Issue11439 Remove the SVN keywords from the code as it is no longer applicable in hg. Patch Contributed by Neil Muller. 2011-07-28 23:39:08 +08:00
telnetlib.py
tempfile.py Issue #12464: tempfile.TemporaryDirectory.cleanup() should not follow symlinks: 2011-07-29 19:00:38 +02:00
textwrap.py merge from 3.2 - Fix closes Issue11439 Remove the SVN keywords from the code as it is no longer applicable in hg. Patch Contributed by Neil Muller. 2011-07-28 23:39:08 +08:00
this.py
threading.py add ThreadError to threading.__all__ (closes #12679) 2011-08-02 13:05:47 -05:00
timeit.py Issue 12514: Use try/finally to assure that timeit restores GC when done. 2011-07-29 00:08:19 -07:00
token.py
tokenize.py
trace.py Prevent deprecation warning 2011-04-17 16:48:52 +02:00
traceback.py
tty.py
turtle.py #12677: merge with 3.2 2011-08-07 17:13:13 +02:00
types.py
uu.py
uuid.py
warnings.py
wave.py
weakref.py
webbrowser.py #12601: fix typo. 2011-07-21 11:16:32 +03:00
xdrlib.py Issue #9696: Fix exception incorrectly raised by xdrlib.Packer.pack_int when trying to pack a negative (in-range) integer. 2011-03-27 16:25:40 +01:00
zipfile.py #10694: zipfile now ignores garbage at the end of a zipfile. 2011-06-09 15:50:51 -04:00