Victor Stinner [Sat, 16 Aug 2014 12:11:01 +0000 (14:11 +0200)]
Closes #22205: sys._debugmallocstats is a cpython specific feature, so
test_debugmallocstats should be marked as such. Patch written by Martin
Matusiak.
Victor Stinner [Sun, 10 Aug 2014 23:11:13 +0000 (01:11 +0200)]
Issue #22112, asyncio doc: replace loop.create_task(coro) with
asyncio.async(coro), mention that asyncio.async() can be used to scheduler a
coroutine, and make it clear that create_task() is only available in Python
3.4.2 and later.
doko@ubuntu.com [Sat, 9 Aug 2014 20:36:35 +0000 (22:36 +0200)]
- Issue #22176: Update the ctypes module's libffi to v3.1. This release
adds support for the Linux AArch64 and POWERPC ELF ABIv2 little endian
architectures.
Issue #21975: Fixed crash when using uninitialized sqlite3.Row (in particular
when unpickling pickled sqlite3.Row). sqlite3.Row is now initialized in the
__new__() method.
Victor Stinner [Tue, 29 Jul 2014 21:08:17 +0000 (23:08 +0200)]
Close #22063: socket operations (socket,recv, sock_sendall, sock_connect,
sock_accept) now raise an exception in debug mode if sockets are in blocking
mode.
Victor Stinner [Tue, 29 Jul 2014 10:58:23 +0000 (12:58 +0200)]
asyncio: sync with Tulip
* _WaitHandleFuture.cancel() now notify IocpProactor through the overlapped
object that the wait was cancelled.
* Optimize IocpProactor.wait_for_handle() gets the result if the wait is
signaled immediatly.
* Enhance representation of Future and Future subclasses
- Add "created at filename:lineno" in the representation
- Add Future._repr_info() method which can be more easily overriden than
Future.__repr__(). It should now be more easy to enhance Future
representation without having to modify each subclass. For example,
_OverlappedFuture and _WaitHandleFuture get the new "created at" information.
- Use reprlib to format Future result, and function arguments when formatting a
callback, to limit the length of the representation.
* Fix repr(_WaitHandleFuture)
* _WaitHandleFuture and _OverlappedFuture: hide frames of internal calls in the
source traceback.
* Cleanup ProactorIocp._poll(): set the timeout to 0 after the first call to
GetQueuedCompletionStatus()
* test_locks: close the temporary event loop and check the condition lock
* Remove workaround in test_futures, no more needed
Terry Jan Reedy [Tue, 29 Jul 2014 02:23:59 +0000 (22:23 -0400)]
Issue #17172: Add the ability to run turtledemo from Idle.
Make turtledemo start as active on Mac even when run with subprocess.
Patch by Ramchandra Apt, Lita Cho, and Ned Daily.
Victor Stinner [Sun, 27 Jul 2014 22:18:43 +0000 (00:18 +0200)]
asyncio, tulip issue 196: ProactorIocp._register() now registers the overlapped
in the _cache dictionary, even if we already got the result. We need to keep a
reference to the overlapped object, otherwise the memory may be reused and
GetQueuedCompletionStatus() may use random bytes and behaves badly.
There is still a hack for ConnectNamedPipe(): the overlapped object is not
register into _cache if the overlapped object completed directly.
Log also an error in debug mode in ProactorIocp._loop() if we get an unexpected
event.
Add a protection in ProactorIocp.close() to avoid blocking, even if it should
not happen. I still don't understand exactly why some the completion of some
overlapped objects are not notified.
Terry Jan Reedy [Sat, 26 Jul 2014 23:40:16 +0000 (19:40 -0400)]
Reduce unnecessary 2.7 versus 3.4+ differences in idlelib/configDialog.py.
2009-02-02 51562 (27c589f09a21) merged Mac support revisions into 3.0.
2009-03-04 52014 (dc3d24824b60) merged slightly improved version into 2.7.
Change 3.4+ to match the later 2.7 patch. Buttons tested manually.
Victor Stinner [Fri, 25 Jul 2014 22:58:34 +0000 (00:58 +0200)]
Tulip issue 196: _OverlappedFuture.set_result() now clears its reference to the
overlapped object. IocpProactor._poll() now also ignores false alarms:
GetQueuedCompletionStatus() returns the overlapped but it is still pending.
Victor Stinner [Fri, 25 Jul 2014 20:36:05 +0000 (22:36 +0200)]
asyncio: sync with Tulip
* Tulip issue #196: IocpProactor._poll() clears the reference to the
overlapped operation when the operation is done. It would be better to clear
the reference in a new _OverlappedFuture.set_result() method, but it cannot
be done yet because of a weird bug.
* BaseSelectorEventLoop._write_to_self() now logs errors in debug mode.
Victor Stinner [Fri, 25 Jul 2014 11:05:20 +0000 (13:05 +0200)]
asyncio: sync with Tulip
* Fix _WaitHandleFuture.cancel(): return the result of the parent cancel()
method.
* _OverlappedFuture.cancel() now clears its reference to the overlapped object.
Make also the _OverlappedFuture.ov attribute private.
* Check if _WaitHandleFuture completed before unregistering it in the callback.
Add also _WaitHandleFuture._poll() and repr(_WaitHandleFuture).
* _WaitHandleFuture now unregisters its wait handler if WaitForSingleObject()
raises an exception.
* _OverlappedFuture.set_exception() now cancels the overlapped operation.