R David Murray [Sat, 18 Jun 2011 02:23:04 +0000 (22:23 -0400)]
#11700: proxy object close methods can now be called multiple times
This makes them work like the close provided by regular file objects. This
patch also backports the close-the-underlying-file code for _ProxyFile objects
that was introduced along with context manager support in the 3.x branch.
Victor Stinner [Fri, 17 Jun 2011 12:06:27 +0000 (14:06 +0200)]
Issue #12133: AbstractHTTPHandler.do_open() of urllib.request closes the HTTP
connection if its getresponse() method fails with a socket error. Patch written
by Ezio Melotti.
Rather than wrapping the C _isdir function in a Python function,
just import the C _isdir function directly. Additionally, add in the
docstring which was left out.
Éric Araujo [Thu, 9 Jun 2011 12:26:10 +0000 (14:26 +0200)]
Fix a few misuses of :option: I missed in r86521.
Extract of the commit message:
Fix usage of :option: in the docs (#9312).
:option: is used to create a link to an option of python, not to mark
up any instance of any arbitrary command-line option. These were
changed to ````.
Victor Stinner [Fri, 3 Jun 2011 21:56:43 +0000 (23:56 +0200)]
Issue #12016: Add test_errorhandle() to TestBase_Mapping of
test_multibytecodec_support. Improve also error message of the
test_errorhandle() of TestBase.
Multiple clean-ups to the docs for builtin functions.
* Use concrete example for dir() and eliminate the distracting doctest directives.
* Add a pure python equivalent for enumerate()
* Modify the enumerate() example to demonstrate the start argument
* Remove incorrect reference the *iterable* in the enumerate() docs.
* Downgrade the comments on input() from a warning to a note.
* Fix the iter() example to use the empty string as the terminating
condition for file.readline(). Also, the old example was broken
because readline() results include a newline, so 'STOP\n' would have
been the correct terminating condition. Even with that fix, the
STOP example was fragile and would have lead to infinite loops with
malformed inputs.
* Do not refer to classmethod as being "more advanced" than staticmethod.
Victor Stinner [Tue, 31 May 2011 23:03:00 +0000 (01:03 +0200)]
Close #12085: Fix an attribute error in subprocess.Popen destructor if the
constructor has failed, e.g. because of an undeclared keyword argument. Patch
written by Oleg Oshmyan.
Victor Stinner [Mon, 30 May 2011 21:44:13 +0000 (23:44 +0200)]
Issue #12016: 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.
Ned Deily [Sat, 28 May 2011 12:56:14 +0000 (05:56 -0700)]
Issue #11217: For 64-bit/32-bit Mac OS X universal framework builds,
ensure "make install" creates symlinks in --prefix bin for the "-32"
files in the framework bin directory like the installer does.
Ned Deily [Sat, 28 May 2011 07:11:54 +0000 (00:11 -0700)]
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)
Victor Stinner [Tue, 24 May 2011 20:29:13 +0000 (22:29 +0200)]
Issue #12100: Don't reset incremental encoders of CJK codecs at each call to
their encode() method anymore, but continue to call the reset() method if the
final argument is True.
Barry Warsaw [Mon, 23 May 2011 19:22:56 +0000 (15:22 -0400)]
Replay changeset 70238:03e488b5c009 from fubar branch. Original commit
message:
Reconcile with the 2.6svn branch. The 2.6.7 release will be made from
Subversion, but there were differences, so this brings them in sync. These
changes should *not* propagate to any newer versions.