summaryrefslogtreecommitdiffstats
path: root/Lib
Commit message (Collapse)AuthorAgeFilesLines
* Fix test_bytes when sys.stdin is None, for example on Windows when usingVictor Stinner2014-07-281-1/+1
| | | | pythonw.exe instead of python.exe
* asyncio, tulip issue 196: ProactorIocp._register() now registers the overlappedVictor Stinner2014-07-271-15/+38
| | | | | | | | | | | | | | | | 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.
* Modernize turtledemo with conditional expressions; remove duplicate line.Terry Jan Reedy2014-07-271-19/+6
|
* Reduce unnecessary 2.7 versus 3.4+ differences in idlelib/configDialog.py.Terry Jan Reedy2014-07-261-10/+8
| | | | | | 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.
* Issue #22074: Fix Lib/test/make_ssl_certs.pyAntoine Pitrou2014-07-261-1/+1
|
* Accept optional lock object in Condition ctor (tulip issue #198)Andrew Svetlov2014-07-262-3/+18
|
* Fix repr(_socket.socket) on Windows 64-bit: don't fail with OverflowErrorVictor Stinner2014-07-261-0/+18
| | | | on closed socket. repr(socket.socket) already works fine.
* Tulip issue 196: _OverlappedFuture.set_result() now clears its reference to theVictor Stinner2014-07-251-5/+11
| | | | | overlapped object. IocpProactor._poll() now also ignores false alarms: GetQueuedCompletionStatus() returns the overlapped but it is still pending.
* Issue #22044: Fixed premature DECREF in call_tzinfo_method.Raymond Hettinger2014-07-251-0/+11
|
* asyncio: sync with TulipVictor Stinner2014-07-252-1/+9
| | | | | | | | * 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.
* Merge.Charles-François Natali2014-07-2538-351/+377
|\
| * asyncio, test_subprocess: relax timings for slow builbotsVictor Stinner2014-07-251-2/+2
| |
| * asyncio: sync with TulipVictor Stinner2014-07-252-27/+52
| | | | | | | | | | | | | | | | | | | | | | | | * 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.
| * Issue #22061: Add deprecation warnings in empty obsolete methods.Serhiy Storchaka2014-07-251-2/+9
| |
| * Issue #22061: remove call of useless function slated for removal.Terry Jan Reedy2014-07-251-1/+0
| |
| * Issue #22053: Make help work, after previous patch for this issue disabled itTerry Jan Reedy2014-07-251-17/+9
| | | | | | | | by removing global 'demo'. Refactor and remove duplicate code.
| * asyncio: sync with TulipVictor Stinner2014-07-242-30/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Improve stability of the proactor event loop, especially operations on overlapped objects: * Tulip issue 195: Don't call UnregisterWait() twice if a _WaitHandleFuture is cancelled twice to fix a crash. * IocpProactor.close(): cancel futures to cancel overlapped operations, instead of cancelling directly overlapped operations. Future objects may not call ov.cancel() if the future was cancelled or if the overlapped was already cancelled. The cancel() method of the future may also catch exceptions. Log also errors on cancellation. * tests: rename "f" to "fut" * Add a __repr__() method to IocpProactor * Add a destructor to IocpProactor which closes it * _OverlappedFuture.cancel() doesn't cancel the overlapped anymore if it is done: if it is already cancelled or completed. Log also an error if the cancellation failed. * Add the address of the overlapped object in repr(_OverlappedFuture) * _OverlappedFuture truncates the source traceback to hide the call to the parent constructor (useless in debug).
| * Issue #16133: The asynchat.async_chat.handle_read() method now ignoresVictor Stinner2014-07-242-0/+19
| | | | | | | | | | | | BlockingIOError exceptions. Initial patch written by Xavier de Gaye. Document also in asyncore documentation that recv() may raise BlockingIOError.
| * Issue #19884: readline: Disable the meta modifier key if stdout is not aVictor Stinner2014-07-241-5/+18
| | | | | | | | | | | | terminal to not write the ANSI sequence "\033[1034h" into stdout. This sequence is used on some terminal (ex: TERM=xterm-256color") to enable support of 8 bit characters.
| * test_gettext: use support.rmtree() instead of shutil.rmtree()Victor Stinner2014-07-241-1/+1
| |
| * asyncio tests: relax timings for slow buildbotsVictor Stinner2014-07-241-4/+4
| |
| * Issue #20055: Fix BaseEventLoop.stop() docstring, incomplete sentence.Victor Stinner2014-07-241-3/+3
| | | | | | | | Patch written by Saimadhav Heblikar.
| * Issue #22053: Cleanup turtledemo start and stop and fix debug shutdown warning.Terry Jan Reedy2014-07-231-21/+5
| |
| * Issue #19493: Fix two uses of ctypes.test.requires (it's not a decorator)Zachary Ware2014-07-232-2/+5
| | | | | | | | | | and skip test_win32.FunctionCallTestCase.test_SEH when Python was compiled in debug configuration or by a non-MSC compiler.
| * Merge headsSerhiy Storchaka2014-07-231-68/+80
| |\
| | * Issue #21597: Turtledemo text pane can now be widened to view or copy completeTerry Jan Reedy2014-07-231-68/+80
| | | | | | | | | | | | | | | | | | lines or narrowed for small screens. Issie #19132: Turtledemo buttons no longer disappear when window is shrun. Patch mostly by Lita Cho (21597) using idea from patch by Jan Kanis (18132).
| * | Issue #6167: Backported tests for Scrollbar.activate() and Scrollbar.set()Serhiy Storchaka2014-07-231-0/+18
| |/ | | | | | | from 6ae34a948cb4.
| * Issue #22002: Make full use of test discovery in test sub-packages.Zachary Ware2014-07-2319-168/+84
| | | | | | | | | | | | Adds `load_package_tests` function to test.support, uses it in test_asyncio, test_email, test_json, test_tools, test_importlib and all test_importlib sub-packages to implement test discovery.
| * asyncio: sync with TulipVictor Stinner2014-07-233-14/+13
| | | | | | | | | | * Tulip issue 194: Don't use sys.getrefcount() in unit tests * signal.set_wakeup_fd() can now raise an OSError on Python 3.5
| * Issue #21888: plistlib's load() and loads() now work if the fmt parameter isSerhiy Storchaka2014-07-232-5/+8
| | | | | | | | specified.
* | Issue #19875: Fix random test_getsockaddrarg() failure.Charles-François Natali2014-07-251-8/+16
|/
* Issue #21901: Cap the maximum number of file descriptors to use for the test.Charles-François Natali2014-07-221-1/+1
|
* asyncio, tulip issue 193: Convert StreamWriter.drain() to a classic coroutineVictor Stinner2014-07-221-19/+18
| | | | | Replace also _make_drain_waiter() function with a classic _drain_helper() coroutine.
* Fixed bugs in reprs of CookieJar and multiprocessing.dummy.Value.Serhiy Storchaka2014-07-222-3/+3
|
* Fix localhost checking in FileHandler. Raised in #21970.Senthil Kumaran2014-07-222-2/+3
|
* Issue #21976: Fix test_ssl to accept LibreSSL version strings.Antoine Pitrou2014-07-211-6/+10
| | | | Thanks to William Orr.
* Issue #19629: Add missing "import stat"Victor Stinner2014-07-211-12/+13
| | | | Sort also imports in support/__init__.py
* Issue #19811, #22022: test_pathlib uses support.rmtree() instead ofVictor Stinner2014-07-211-2/+2
| | | | shutil.rmtree() to remove the temporary directory.
* Issue #19629: Fix support.rmtree(), use os.lstat() to check if the file is aVictor Stinner2014-07-211-1/+7
| | | | directory, not os.path.isdir()
* asyncio: Fix test_stdin_broken_pipe(), drain() is not a coroutineVictor Stinner2014-07-211-2/+7
|
* Issue #21868: Prevent turtle crash due to invalid undo buffer size.Raymond Hettinger2014-07-211-1/+1
|
* Fix asyncio.__all__: export also unix_events and windows_events symbolsVictor Stinner2014-07-181-6/+7
| | | | | For example, on Windows, it was not possible to get ProactorEventLoop or DefaultEventLoopPolicy using "from asyncio import *".
* Issue #21247: Fix a race condition in test_send_signal() of asyncioVictor Stinner2014-07-171-4/+15
| | | | | Add a basic synchronization mechanism to wait until the child process is ready before sending it a signal.
* Python issue #21645, Tulip issue 192: Rewrite signal handlingVictor Stinner2014-07-175-7/+27
| | | | | | | | | | | | | | | | | | | Since Python 3.3, the C signal handler writes the signal number into the wakeup file descriptor and then schedules the Python call using Py_AddPendingCall(). asyncio uses the wakeup file descriptor to wake up the event loop, and relies on Py_AddPendingCall() to schedule the final callback with call_soon(). If the C signal handler is called in a thread different than the thread of the event loop, the loop is awaken but Py_AddPendingCall() was not called yet. In this case, the event loop has nothing to do and go to sleep again. Py_AddPendingCall() is called while the event loop is sleeping again and so the final callback is not scheduled immediatly. This patch changes how asyncio handles signals. Instead of relying on Py_AddPendingCall() and the wakeup file descriptor, asyncio now only relies on the wakeup file descriptor. asyncio reads signal numbers from the wakeup file descriptor to call its signal handler.
* asyncio: Fix test_stdin_broken_pipe(), drain() can also raiseVictor Stinner2014-07-171-2/+2
| | | | ConnectionResetError
* asyncio, tulip issue 190: Process.communicate() now ignoresVictor Stinner2014-07-171-5/+7
| | | | ConnectionResetError too
* asyncio, tulip issue 190: Process.communicate() must ignore BrokenPipeErrorVictor Stinner2014-07-172-8/+25
| | | | | | | | If you want to handle the BrokenPipeError, you can easily reimplement communicate(). Add also a unit test to ensure that stdin.write() + stdin.drain() raises BrokenPipeError.
* Issue 21044: tarfile.open() now handles fileobj with an integer 'name'Serhiy Storchaka2014-07-162-7/+32
| | | | attribute. Based on patch by Martin Panter.
* Issue #21918: Convert test_tools.py to a sub-package of test.Zachary Ware2014-07-169-188/+549
|
* asyncio: test_as_completed(): disable "slow callback" warningVictor Stinner2014-07-161-0/+2
|