]> granicus.if.org Git - python/commitdiff
Issue #12464: tempfile.TemporaryDirectory.cleanup() should not follow symlinks:
authorCharles-François Natali <neologix@free.fr>
Fri, 29 Jul 2011 17:00:38 +0000 (19:00 +0200)
committerCharles-François Natali <neologix@free.fr>
Fri, 29 Jul 2011 17:00:38 +0000 (19:00 +0200)
fix it. Patch by Petri Lehtinen.

1  2 
Lib/tempfile.py
Misc/NEWS

diff --cc Lib/tempfile.py
Simple merge
diff --cc Misc/NEWS
index 34ceb2afcc61dd05daaab27ec88a284b5d0afe94,b080316f20ba1456a633f1f9b02da41dbed987cd..5cdcb79cba0d0537be05467f17616104380811e2
+++ b/Misc/NEWS
@@@ -244,133 -183,47 +244,136 @@@ Core and Builtin
  Library
  -------
  
 -- Issue #12467: warnings: fix a race condition if a warning is emitted at
 -  shutdown, if globals()['__file__'] is None.
++- Issue #12464: tempfile.TemporaryDirectory.cleanup() should not follow
++  symlinks: fix it. Patch by Petri Lehtinen.
 -Tests
 ------
 +- Issue #8887: "pydoc somebuiltin.somemethod" (or help('somebuiltin.somemethod')
 +  in Python code) now finds the doc of the method.
  
 -- Skip network tests when getaddrinfo() returns EAI_AGAIN, meaning a temporary
 -  failure in name resolution.
 +- Issue #10968: Remove indirection in threading.  The public names (Thread,
 +  Condition, etc.) used to be factory functions returning instances of hidden
 +  classes (_Thread, _Condition, etc.), because (if Guido recalls correctly) this
 +  code pre-dates the ability to subclass extension types.  It is now possible to
 +  inherit from Thread and other classes, without having to import the private
 +  underscored names like multiprocessing did.
  
 -- Avoid failing in test_urllibnet.test_bad_address when some overzealous
 -  DNS service (e.g. OpenDNS) resolves a non-existent domain name.  The test
 -  is now skipped instead.
 +- Issue #9723: Add shlex.quote functions, to escape filenames and command
 +  lines.
 +
 +- Issue #12603: Fix pydoc.synopsis() on files with non-negative st_mtime.
 +
 +- Issue #12514: Use try/finally to assure the timeit module restores garbage
 +  collections when it is done.
  
 +- Issue #12607: In subprocess, fix issue where if stdin, stdout or stderr is
 +  given as a low fd, it gets overwritten.
  
 -What's New in Python 3.2.1 release candidate 2?
 -===============================================
 +- Issue #12590: IDLE editor window now always displays the first line
 +  when opening a long file.  With Tk 8.5, the first line was hidden.
  
 -*Release date: 03-Jul-2011*
 +- Issue #12576: Fix urlopen behavior on sites which do not send (or obfuscates)
 +  Connection:close header.
  
 -Core and Builtins
 ------------------
 +- Issue #12102: Document that buffered files must be flushed before being used
 +  with mmap. Patch by Steffen Daode Nurpmeso.
  
 -- Issue #12291: You can now load multiple marshalled objects from a stream, with
 -  other data interleaved between marshalled objects.
 +- Issue #12560: Build libpython.so on OpenBSD. Patch by Stefan Sperling.
  
 -- Issue #12084: os.stat on Windows now works properly with relative symbolic
 -  links when called from any directory.
 +- Issue #1813: Fix codec lookup under Turkish locales.
  
 -- Issue #1195: my_fgets() now always clears errors before calling fgets(). Fix
 -  the following case: sys.stdin.read() stopped with CTRL+d (end of file),
 -  raw_input() interrupted by CTRL+c.
 +- Issue #12591: Improve support of "universal newlines" in the subprocess
 +  module: the piped streams can now be properly read from or written to.
  
 -- Issue #9670: Increase the default stack size for secondary threads on Mac OS X
 -  and FreeBSD to reduce the chances of a crash instead of a "maximum recursion
 -  depth" RuntimeError exception (patch by Ronald Oussoren).
 +- Issue #12591: Allow io.TextIOWrapper to work with raw IO objects (without
 +  a read1() method), and add a *write_through* parameter to mandate
 +  unbuffered writes.
  
 -Library
 --------
 +- Issue #10883: Fix socket leaks in urllib.request when using FTP.
 +
 +- Issue #12592: Make Python build on OpenBSD 5 (and future major releases).
 +
 +- Issue #12372: POSIX semaphores are broken on AIX: don't use them.
 +
 +- Issue #12551: Provide a get_channel_binding() method on SSL sockets so as
 +  to get channel binding data for the current SSL session (only the
 +  "tls-unique" channel binding is implemented).  This allows the implementation
 +  of certain authentication mechanisms such as SCRAM-SHA-1-PLUS.  Patch by
 +  Jacek Konieczny.
 +
 +- Issue #665194: email.utils now has format_datetime and parsedate_to_datetime
 +  functions, allowing for round tripping of RFC2822 format dates.
 +
 +- Issue #12571: Add a plat-linux3 directory mirroring the plat-linux2
 +  directory, so that "import DLFCN" and other similar imports work on
 +  Linux 3.0.
 +
 +- Issue #7484: smtplib no longer puts <> around addresses in VRFY and EXPN
 +  commands; they aren't required and in fact postfix doesn't support that form.
 +
 +- Issue #12273: Remove ast.__version__. AST changes can be accounted for by
 +  checking sys.version_info or sys._mercurial.
 +
 +- Silence spurious "broken pipe" tracebacks when shutting down a
 +  ProcessPoolExecutor.
 +
 +- Fix potential resource leaks in concurrent.futures.ProcessPoolExecutor
 +  by joining all queues and processes when shutdown() is called.
 +
 +- Issue #11603: Fix a crash when __str__ is rebound as __repr__.  Patch by
 +  Andreas Stührk.
 +
 +- Issue #11321: Fix a crash with multiple imports of the _pickle module when
 +  embedding Python.  Patch by Andreas Stührk.
 +
 +- Issue #6755: Add get_wch() method to curses.window class. Patch by Iñigo
 +  Serna.
 +
 +- Add cgi.closelog() function to close the log file.
 +
 +- Issue #12502: asyncore: fix polling loop with AF_UNIX sockets.
 +
 +- Issue #4376: ctypes now supports nested structures in a endian different than
 +  the parent structure. Patch by Vlad Riscutia.
 +
 +- Raise ValueError when attempting to set the _CHUNK_SIZE attribute of a
 +  TextIOWrapper to a huge value, not TypeError.
 +
 +- Issue #12504: Close file handles in a timely manner in packaging.database.
 +  This fixes a bug with the remove (uninstall) feature on Windows.
 +
 +- Issues #12169 and #10510: Factor out code used by various packaging commands
 +  to make HTTP POST requests, and make sure it uses CRLF.
 +
 +- Issue #12016: Multibyte CJK decoders now resynchronize faster. They only
 +  ignore the first byte of an invalid byte sequence. For example,
 +  b'\xff\n'.decode('gb2312', 'replace') gives '\ufffd\n' instead of '\ufffd'.
 +
 +- Issue #12459: time.sleep() now raises a ValueError if the sleep length is
 +  negative, instead of an infinite sleep on Windows or raising an IOError on
 +  Linux for example, to have the same behaviour on all platforms.
 +
 +- Issue #12451: pydoc: html_getfile() now uses tokenize.open() to support
 +  Python scripts using a encoding different than UTF-8 (read the coding cookie
 +  of the script).
 +
 +- Issue #12493: subprocess: Popen.communicate() now also handles EINTR errors
 +  if the process has only one pipe.
 +
 +- Issue #12467: warnings: fix a race condition if a warning is emitted at
 +  shutdown, if globals()['__file__'] is None.
 +
 +- Issue #12451: pydoc: importfile() now opens the Python script in binary mode,
 +  instead of text mode using the locale encoding, to avoid encoding issues.
 +
 +- Issue #12451: runpy: run_path() now opens the Python script in binary mode,
 +  instead of text mode using the locale encoding, to support other encodings
 +  than UTF-8 (scripts using the coding cookie).
 +
 +- Issue #12451: xml.dom.pulldom: parse() now opens files in binary mode instead
 +  of the text mode (using the locale encoding) to avoid encoding issues.
  
  - Issue #12147: Adjust the new-in-3.2 smtplib.send_message method for better
 -  conformance to the RFCs: correctly handle Sender and Resent headers.
 +  conformance to the RFCs:  correctly handle Sender and Resent- headers.
  
  - Issue #12352: Fix a deadlock in multiprocessing.Heap when a block is freed by
    the garbage collector while the Heap lock is held.