Yury Selivanov [Thu, 17 Dec 2015 00:31:17 +0000 (19:31 -0500)]
asyncio: Skip getaddrinfo if host is already resolved.
getaddrinfo takes an exclusive lock on some platforms, causing clients to queue
up waiting for the lock if many names are being resolved concurrently. Users
may want to handle name resolution in their own code, for the sake of caching,
using an alternate resolver, or to measure DNS duration separately from
connection duration. Skip getaddrinfo if the "host" passed into
create_connection is already resolved.
See https://github.com/python/asyncio/pull/302 for details.
Gregory P. Smith [Mon, 14 Dec 2015 04:05:55 +0000 (20:05 -0800)]
Re-fix issue #19284: Don't generate the no-op -R command line
parameter to "enable" the always on sys.flags.hash_randomization
in _args_from_interpreter_flags() used by multiprocessing and
some unittests. This simplifies the code.
Martin Panter [Sat, 5 Dec 2015 09:51:52 +0000 (09:51 +0000)]
Issue #25764: Skip the test on OS X
The OS X buildbots were failing at the second setrlimit() call with EPERM, as
if they were trying to raise the hard limit. The call should be keeping the
hard limit the same and raising the soft limit back to its original value, so
I don't understand the failure.
R David Murray [Sat, 5 Dec 2015 03:54:38 +0000 (22:54 -0500)]
#24903: Remove misleading error message to fix regression.
Before the argparse conversion, compileall would (sometimes) accept multiple
paths when -d was specified. Afterward, it does not. The corresponding check
in the original code claimed to prevent multiple *directories* from being
specified...but it didn't really work even to do that. So this patch fixes
the regression by invoking the consenting adults rule: if you specify a
combination of arguments to compileall that produces files with inconsistent
destdirs (which you could do before), it is on you.
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.