Martin Panter [Thu, 26 Nov 2015 11:01:58 +0000 (11:01 +0000)]
Issues #22989, #21228: Document HTTP response object for urlopen()
Previous documentation was not clear if the geturl(), info() and getcode()
were valid for HTTP responses. The “msg” attribute is different to the usual
HTTPResponse.msg attribute. Based on patch by Evens Fortuné.
Serhiy Storchaka [Wed, 25 Nov 2015 13:47:01 +0000 (15:47 +0200)]
Issue #24731: Fixed crash on converting objects with special methods
__bytes__, __trunc__, and __float__ returning instances of subclasses of
bytes, int, and float to subclasses of bytes, int, and float correspondingly.
Terry Jan Reedy [Sat, 21 Nov 2015 00:36:43 +0000 (19:36 -0500)]
Issue #24455: Prevent IDLE from hanging when a) closing the shell while the
debugger is active (15347); b) closing the debugger with the [X] button
(15348); and c) activating the debugger when already active (24455).
The patch by Mark Roseman does this by making two changes.
1. To suspend and resume the gui.interaction method, use the tcl vwait
mechanism interded for this purpose instead of root.mainloop & .quit.
2. In gui.run, allow any existing interaction to terminate first.
Gregory P. Smith [Mon, 16 Nov 2015 02:19:10 +0000 (18:19 -0800)]
Fix issue #6973: When we know a subprocess.Popen process has died, do
not allow the send_signal(), terminate(), or kill() methods to do
anything as they could potentially signal a different process.
Martin Panter [Fri, 13 Nov 2015 22:47:00 +0000 (22:47 +0000)]
Issue #25590: Make rlcompleter only call getattr() once per attribute
Previously it was called another time via hasattr(), and both calls were
made once for dir(f) and again for dir(f.__class__). This includes a
backport of changing from a list to a set from revision 4dbb315fe667.
Terry Jan Reedy [Thu, 12 Nov 2015 20:02:57 +0000 (15:02 -0500)]
Issue #25313: Change the handling of new built-in text color themes to better
address the compatibility problem introduced by the addition of IDLE Dark.
Consistently use the revised idleConf.CurrentTheme everywhere in idlelib.
Serhiy Storchaka [Thu, 12 Nov 2015 09:23:04 +0000 (11:23 +0200)]
Issue #22995: Default implementation of __reduce__ and __reduce_ex__ now
rejects builtin types with not defined __new__.
Added tests for non-pickleable types.
Martin Panter [Sat, 7 Nov 2015 02:32:21 +0000 (02:32 +0000)]
Issue #24802: Copy bytes-like objects to null-terminated buffers if necessary
This avoids possible buffer overreads when int(), float(), compile(), exec()
and eval() are passed bytes-like objects. Similar code is removed from the
complex() constructor, where it was not reachable.
Patch by John Leitch, Serhiy Storchaka and Martin Panter.
Martin Panter [Mon, 2 Nov 2015 03:37:02 +0000 (03:37 +0000)]
Issue #25523: Correct "a" article to "an" article
This changes the main documentation, doc strings, source code comments, and a
couple error messages in the test suite. In some cases the word was removed
or edited some other way to fix the grammar.
Issue #25510: fileinput.FileInput.readline() now returns b'' instead of ''
at the end if the FileInput was opened with binary mode.
Patch by Ryosuke Ito.
Serhiy Storchaka [Wed, 28 Oct 2015 19:39:36 +0000 (21:39 +0200)]
Issue #21827: Fixed textwrap.dedent() for the case when largest common
whitespace is a substring of smallest leading whitespace.
Based on patch by Robert Li.
Terry Jan Reedy [Tue, 27 Oct 2015 07:38:02 +0000 (03:38 -0400)]
Display IDLE warning as a warning rather than as an error.
Clarify message and expected action for beginners.
Guard against astral chars in path incorporated in message.
This restores details lost in revision 097f4fda61a4 (since Python 3.3,
related to the new OSError subclasses). Further additions:
* Markup for attributes and constructor signature
* Explain "winerror" and "filename2"
* Extend test to check for filename2 defaulting to None
* Clarify that the constructor can return a subclass
I have intentionally left out any details of allowing more than five
arguments, or how the "args" attribute is set for four or more arguments.
These details seem to be dependent on the Python version and platform.