Victor Stinner [Mon, 14 Jul 2014 20:04:18 +0000 (22:04 +0200)]
Issue #21645: test_asyncio, log debug trace into sys.__stderr__, not in
sys.stderr, to get output even if tests are run with the -j command line
option.
Victor Stinner [Mon, 14 Jul 2014 16:33:40 +0000 (18:33 +0200)]
asyncio: sync with Tulip
* Tulip issue #184: Log subprocess events in debug mode
- Log stdin, stdout and stderr transports and protocols
- Log process identifier (pid)
- Log connection of pipes
- Log process exit
- Log Process.communicate() tasks: feed stdin, read stdout and stderr
- Add __repr__() method to many classes related to subprocesses
* Add BaseSubprocessTransport._pid attribute. Store the pid so it is still
accessible after the process exited. It's more convinient for debug.
* create_connection(): add the socket in the "connected to" debug log
* Clean up some docstrings and comments. Remove unused unimplemented
_read_from_self().
Terry Jan Reedy [Sun, 13 Jul 2014 21:27:26 +0000 (17:27 -0400)]
Issue #18592: Method return signature changes made to SearchDialogBase for
test purposes are now reflected in GrepDialog and ReplaceDialog. Docstrings
are improved. Initial patch by Saimadhav Heblikar
Victor Stinner [Sat, 12 Jul 2014 01:11:53 +0000 (03:11 +0200)]
asyncio: sync with Tulip
* Tulip issue #183: log socket events in debug mode
- Log most important socket events: socket connected, new client, connection
reset or closed by peer (EOF), etc.
- Log time elapsed in DNS resolution (getaddrinfo)
- Log pause/resume reading
- Log time of SSL handshake
- Log SSL handshake errors
- Add a __repr__() method to many classes
* Fix ProactorEventLoop() in debug mode. ProactorEventLoop._make_self_pipe()
doesn't call call_soon() directly because it checks for the current loop
which fails, because the method is called to build the event loop.
* Cleanup _ProactorReadPipeTransport constructor. Not need to set again
_read_fut attribute to None, it is already done in the base class.
Victor Stinner [Fri, 11 Jul 2014 15:35:06 +0000 (17:35 +0200)]
Issue #21932: Ooops, os.read(fd, size) allocates a buffer of size bytes, even
if the file is much smaller. Add @bigmemtest decorator to the new
test_large_read().
Victor Stinner [Fri, 11 Jul 2014 15:04:41 +0000 (17:04 +0200)]
Issue #21932: os.read() now uses a :c:func:`Py_ssize_t` type instead of
:c:type:`int` for the size to support reading more than 2 GB at once. On
Windows, the size is truncted to INT_MAX. As any call to os.read(), the OS
may read less bytes than the number of requested bytes.
Victor Stinner [Thu, 10 Jul 2014 23:24:33 +0000 (01:24 +0200)]
(Merge 3.4) asyncio: sync with Tulip
- CoroWrapper.__del__() now reuses repr(CoroWrapper) to log the "... was never
yielded from" warning
- Improve CoroWrapper: copy also the qualified name on Python 3.4, not only on
Python 3.5+
Victor Stinner [Thu, 10 Jul 2014 23:04:16 +0000 (01:04 +0200)]
asyncio: sync with Tulip
- CoroWrapper.__del__() now reuses repr(CoroWrapper) to log the "... was never
yielded from" warning
- Improve CoroWrapper: copy also the qualified name on Python 3.4, not only on
Python 3.5+
Victor Stinner [Thu, 10 Jul 2014 22:23:17 +0000 (00:23 +0200)]
(Merge 3.4) asyncio: sync with Tulip
- repr(Task) and repr(CoroWrapper) now also includes where these objects were
created. If the coroutine is not a generator (don't use "yield from"), use
the location of the function, not the location of the coro() wrapper.
- Fix create_task(): truncate the traceback to hide the call to create_task().
Victor Stinner [Thu, 10 Jul 2014 22:21:27 +0000 (00:21 +0200)]
asyncio: sync with Tulip
- repr(Task) and repr(CoroWrapper) now also includes where these objects were
created. If the coroutine is not a generator (don't use "yield from"), use
the location of the function, not the location of the coro() wrapper.
- Fix create_task(): truncate the traceback to hide the call to create_task().
Victor Stinner [Thu, 10 Jul 2014 20:34:58 +0000 (22:34 +0200)]
(Merge 3.4) asyncio: sync with Tulip
- Issues #21936, #21163: Fix sporadic failures of
test_future_exception_never_retrieved()
- Handle.cancel() now clears references to callback and args
- In debug mode, repr(Handle) now contains the location where the Handle was
created.
Victor Stinner [Thu, 10 Jul 2014 20:32:58 +0000 (22:32 +0200)]
asyncio: sync with Tulip
- Issues #21936, #21163: Fix sporadic failures of
test_future_exception_never_retrieved()
- Handle.cancel() now clears references to callback and args
- In debug mode, repr(Handle) now contains the location where the Handle was
created.
Victor Stinner [Tue, 8 Jul 2014 21:58:25 +0000 (23:58 +0200)]
(Merge 3.4) asyncion, Tulip issue 181: BaseEventLoop.create_datagram_endpoint()
now waits until protocol.connection_made() has been called. Document also why
transport constructors use a waiter.
Victor Stinner [Tue, 8 Jul 2014 21:57:31 +0000 (23:57 +0200)]
asyncion, Tulip issue 181: BaseEventLoop.create_datagram_endpoint() now waits
until protocol.connection_made() has been called. Document also why transport
constructors use a waiter.
Victor Stinner [Tue, 8 Jul 2014 10:43:24 +0000 (12:43 +0200)]
Merge 3.4
asyncio: sync with Tulip
- Tulip issue 185: Add a create_task() method to event loops. The create_task()
method can be overriden in custom event loop to implement their own task
class. For example, greenio and Pulsar projects use their own task class. The
create_task() method is now preferred over creating directly task using the
Task class.
- tests: fix a warning
- fix typo in the name of a test function
- Update AbstractEventLoop: add new event loop methods; update also the unit test
Update asyncio documentation
- Document the new create_task() method
- "Hide" the Task class: point to the create_task() method for interoperability
- Rewrite the documentation of the Task class
- Document the "Pending task destroyed"
- Update output in debug mode of examples in the dev section
- Replace Task() with create_task() in examples
Victor Stinner [Tue, 8 Jul 2014 10:39:10 +0000 (12:39 +0200)]
Update asyncio documentation
- Document the new create_task() method
- "Hide" the Task class: point to the create_task() method for interoperability
- Rewrite the documentation of the Task class
- Document the "Pending task destroyed"
- Update output in debug mode of examples in the dev section
- Replace Task() with create_task() in examples
Victor Stinner [Tue, 8 Jul 2014 09:29:25 +0000 (11:29 +0200)]
asyncio: sync with Tulip
- Tulip issue 185: Add a create_task() method to event loops. The create_task()
method can be overriden in custom event loop to implement their own task
class. For example, greenio and Pulsar projects use their own task class. The
create_task() method is now preferred over creating directly task using the
Task class.
- tests: fix a warning
- fix typo in the name of a test function
- Update AbstractEventLoop: add new event loop methods; update also the unit test
Victor Stinner [Mon, 7 Jul 2014 19:52:49 +0000 (21:52 +0200)]
(Merge 3.4) Issue #21781, _ssl: Fix asn1obj2py() on Windows 64-bit, "s#" format
requires size to be a Py_ssize_t, not an int. _ssl.c is now "Py_ssize_t clean".
Zachary Ware [Mon, 7 Jul 2014 18:39:59 +0000 (13:39 -0500)]
Issue #21907: Improved the batch scripts provided for building Python.
The user-facing scripts in PCbuild have been updated to be easier to use
and the buildbot scripts in Tools\buildbot have been updated to use the
user-facing scripts in PCbuild wherever possible.
Victor Stinner [Mon, 7 Jul 2014 15:27:27 +0000 (17:27 +0200)]
(Merge 3.4) asyncio: sync with Tulip
- Tulip issue #181: Faster create_connection(). Call directly
waiter.set_result() in the constructor of _ProactorBasePipeTransport and
_SelectorSocketTransport, instead of using of delaying the call with
call_soon().
- Cleanup iscoroutine()
Victor Stinner [Mon, 7 Jul 2014 15:26:54 +0000 (17:26 +0200)]
asyncio: sync with Tulip
- Tulip issue #181: Faster create_connection(). Call directly
waiter.set_result() in the constructor of _ProactorBasePipeTransport and
_SelectorSocketTransport, instead of using of delaying the call with
call_soon().
- Cleanup iscoroutine()