Ned Deily [Mon, 15 Sep 2014 02:19:49 +0000 (19:19 -0700)]
Issue #17095: Temporarily revert getpath.c change that added the Modules
directory to sys.path when running from a build directory. That has
proven to be problematic for several standard library modules with
C extension modules whose builds can fail on some platforms.
Victor Stinner [Wed, 3 Sep 2014 22:35:43 +0000 (00:35 +0200)]
Issue #20957: test_smtpnet now uses support.transient_internet() to call
check_ssl_verifiy(), so only test_connect_using_sslcontext_verified() is
skipped if smtp.gmail.com cannot be joined, not the whole file.
Victor Stinner [Tue, 2 Sep 2014 09:41:04 +0000 (11:41 +0200)]
Closes #22258: Fix the the internal function set_inheritable() on Illumos.
This platform exposes the function ioctl(FIOCLEX), but calling it fails with
errno is ENOTTY: "Inappropriate ioctl for device". set_inheritable() now falls
back to the slower fcntl() (F_GETFD and then F_SETFD).
Victor Stinner [Sun, 31 Aug 2014 13:07:57 +0000 (15:07 +0200)]
asyncio, Tulip issue 205: Fix a race condition in BaseSelectorEventLoop.sock_connect()
There is a race condition in create_connection() used with wait_for() to have a
timeout. sock_connect() registers the file descriptor of the socket to be
notified of write event (if connect() raises BlockingIOError). When
create_connection() is cancelled with a TimeoutError, sock_connect() coroutine
gets the exception, but it doesn't unregister the file descriptor for write
event. create_connection() gets the TimeoutError and closes the socket.
If you call again create_connection(), the new socket will likely gets the same
file descriptor, which is still registered in the selector. When sock_connect()
calls add_writer(), it tries to modify the entry instead of creating a new one.
This issue was originally reported in the Trollius project, but the bug comes
from Tulip in fact (Trollius is based on Tulip):
https://bitbucket.org/enovance/trollius/issue/15/after-timeouterror-on-wait_for
This change fixes the race condition. It also makes sock_connect() more
reliable (and portable) is sock.connect() raises an InterruptedError.
R David Murray [Sat, 30 Aug 2014 20:51:59 +0000 (16:51 -0400)]
#22215: have the smtplib 'quit' command reset the state.
Without this reset, starttls would fail if a connect/starttls was done after a
quit, because smtplib assumed the existing value of emspt_features was
accurate, but it gets reset when starttls completes (and the new value does
not contain the starttls capability, since tls is already started at that
point). (There may be additional places where this lack of reset was an
issue as well.)
Victor Stinner [Thu, 28 Aug 2014 09:19:25 +0000 (11:19 +0200)]
asyncio, Tulip issue 201: Fix a race condition in wait_for()
Don't raise a TimeoutError if we reached the timeout and the future completed
in the same iteration of the event loop. A side effect of the bug is that
Queue.get() looses items.
Terry Jan Reedy [Wed, 27 Aug 2014 05:43:50 +0000 (01:43 -0400)]
Issue #22065: Menus, unlike Menubottons, do not have a state option.
Since a new demo can now be loaded while one is running,
adjust loadfile to do the same cleanup as stopIt.
Victor Stinner [Mon, 25 Aug 2014 23:01:59 +0000 (01:01 +0200)]
Issue #22063: Fix asyncio documentation of socket and pipe operations regarding
to non-blocking mode. The non-blocking mode does not matter when using a
ProactorEventLoop, only for SelectorEventLoop.
Victor Stinner [Mon, 25 Aug 2014 21:20:52 +0000 (23:20 +0200)]
asyncio: sync with Tulip
* PipeServer.close() now cancels the "accept pipe" future which cancels the
overlapped operation.
* Fix _SelectorTransport.__repr__() if the transport was closed
* Fix debug log in BaseEventLoop.create_connection(): get the socket object
from the transport because SSL transport closes the old socket and creates a
new SSL socket object. Remove also the _SelectorSslTransport._rawsock
attribute: it contained the closed socket (not very useful) and it was not
used.
* Issue #22063: socket operations (sock_recv, sock_sendall, sock_connect,
sock_accept) of the proactor event loop don't raise an exception in debug
mode if the socket are in blocking mode. Overlapped operations also work on
blocking sockets.
* Fix unit tests in debug mode: mock a non-blocking socket for socket
operations which now raise an exception if the socket is blocking.
* _fatal_error() method of _UnixReadPipeTransport and _UnixWritePipeTransport
now log all exceptions in debug mode
* Don't log expected errors in unit tests
* Tulip issue 200: _WaitHandleFuture._unregister_wait() now catchs and logs
exceptions.
* Tulip issue 200: Log errors in debug mode instead of simply ignoring them.
Victor Stinner [Mon, 25 Aug 2014 15:04:12 +0000 (17:04 +0200)]
asyncio: update the doc
* dev: mention that the logging must be configured at DEBUG level
* streams: drain() has no more a strange return value, it's just
a standard coroutine
Ned Deily [Fri, 22 Aug 2014 20:32:49 +0000 (13:32 -0700)]
Issue #21166: Prevent possible segfaults and other random failures of
python --generate-posix-vars in pybuilddir.txt build target by ensuring
that pybuilddir.txt is always regenerated when configure is run and
that the newly built skeleton python does not inadvertently import
modules from previously installed instances.