Serhiy Storchaka [Wed, 23 Jul 2014 19:08:45 +0000 (22:08 +0300)]
Issue #6167: Backported tests for Scrollbar.activate() and Scrollbar.set()
from
6ae34a948cb4.
Zachary Ware [Wed, 23 Jul 2014 17:00:29 +0000 (12:00 -0500)]
Issue #22002: Make full use of test discovery in test sub-packages.
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.
Victor Stinner [Wed, 23 Jul 2014 16:21:45 +0000 (18:21 +0200)]
asyncio: sync with Tulip
* Tulip issue 194: Don't use sys.getrefcount() in unit tests
* signal.set_wakeup_fd() can now raise an OSError on Python 3.5
Serhiy Storchaka [Wed, 23 Jul 2014 15:49:31 +0000 (18:49 +0300)]
Issue #21888: plistlib's load() and loads() now work if the fmt parameter is
specified.
Serhiy Storchaka [Wed, 23 Jul 2014 15:41:21 +0000 (18:41 +0300)]
Correct issue #21044 patch author.
Andrew Svetlov [Wed, 23 Jul 2014 08:27:17 +0000 (11:27 +0300)]
Fix grammar
Charles-François Natali [Tue, 22 Jul 2014 20:25:03 +0000 (21:25 +0100)]
Issue #21901: Cap the maximum number of file descriptors to use for the test.
Victor Stinner [Tue, 22 Jul 2014 10:03:40 +0000 (12:03 +0200)]
asyncio, tulip issue 193: Convert StreamWriter.drain() to a classic coroutine
Replace also _make_drain_waiter() function with a classic _drain_helper()
coroutine.
Serhiy Storchaka [Tue, 22 Jul 2014 08:09:36 +0000 (11:09 +0300)]
Fixed bugs in reprs of CookieJar and multiprocessing.dummy.Value.
Serhiy Storchaka [Tue, 22 Jul 2014 08:02:56 +0000 (11:02 +0300)]
Merge heads
Serhiy Storchaka [Tue, 22 Jul 2014 07:24:25 +0000 (10:24 +0300)]
Issue #15759: "make suspicious", "make linkcheck" and "make doctest" in Doc/
now display special message when and only when there are failures.
Senthil Kumaran [Tue, 22 Jul 2014 07:15:20 +0000 (00:15 -0700)]
Fix localhost checking in FileHandler. Raised in #21970.
Antoine Pitrou [Mon, 21 Jul 2014 22:35:01 +0000 (18:35 -0400)]
Issue #21976: Fix test_ssl to accept LibreSSL version strings.
Thanks to William Orr.
Victor Stinner [Mon, 21 Jul 2014 19:40:19 +0000 (21:40 +0200)]
Issue #19629: Add missing "import stat"
Sort also imports in support/__init__.py
Victor Stinner [Mon, 21 Jul 2014 17:19:05 +0000 (19:19 +0200)]
Issue #19811, #22022: test_pathlib uses support.rmtree() instead of
shutil.rmtree() to remove the temporary directory.
Victor Stinner [Mon, 21 Jul 2014 17:18:12 +0000 (19:18 +0200)]
Issue #19629: Fix support.rmtree(), use os.lstat() to check if the file is a
directory, not os.path.isdir()
Victor Stinner [Mon, 21 Jul 2014 14:23:33 +0000 (16:23 +0200)]
asyncio: Fix test_stdin_broken_pipe(), drain() is not a coroutine
Raymond Hettinger [Mon, 21 Jul 2014 04:30:32 +0000 (21:30 -0700)]
Issue #21868: Prevent turtle crash due to invalid undo buffer size.
Benjamin Peterson [Sun, 20 Jul 2014 20:05:01 +0000 (13:05 -0700)]
add #
Benjamin Peterson [Sat, 19 Jul 2014 23:34:33 +0000 (16:34 -0700)]
args doesn't need to be a tuple (closes #17210)
Mark Dickinson [Sat, 19 Jul 2014 20:45:06 +0000 (21:45 +0100)]
Issue #22006: Remove outdated _thread caveat. Thanks Dan O'Reilly for the report.
Zachary Ware [Fri, 18 Jul 2014 14:11:48 +0000 (09:11 -0500)]
Issue #22004: Correct an argument name.
Victor Stinner [Fri, 18 Jul 2014 10:44:25 +0000 (12:44 +0200)]
Fix asyncio.__all__: export also unix_events and windows_events symbols
For example, on Windows, it was not possible to get ProactorEventLoop or
DefaultEventLoopPolicy using "from asyncio import *".
Victor Stinner [Thu, 17 Jul 2014 21:49:11 +0000 (23:49 +0200)]
Issue #21247: Fix a race condition in test_send_signal() of asyncio
Add a basic synchronization mechanism to wait until the child process is ready
before sending it a signal.
Victor Stinner [Thu, 17 Jul 2014 20:43:40 +0000 (22:43 +0200)]
Python issue #21645, Tulip issue 192: Rewrite signal handling
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.
Victor Stinner [Thu, 17 Jul 2014 12:01:14 +0000 (14:01 +0200)]
asyncio: Fix test_stdin_broken_pipe(), drain() can also raise
ConnectionResetError
Victor Stinner [Thu, 17 Jul 2014 11:12:03 +0000 (13:12 +0200)]
asyncio, tulip issue 190: Process.communicate() now ignores
ConnectionResetError too
Victor Stinner [Thu, 17 Jul 2014 10:25:27 +0000 (12:25 +0200)]
asyncio, tulip issue 190: Process.communicate() must ignore BrokenPipeError
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.
Berker Peksag [Thu, 17 Jul 2014 02:00:36 +0000 (05:00 +0300)]
Issue #21994: Fix SyntaxError in the SSLContext.check_hostname documentation.
Serhiy Storchaka [Wed, 16 Jul 2014 20:58:58 +0000 (23:58 +0300)]
Issue 21044: tarfile.open() now handles fileobj with an integer 'name'
attribute. Based on patch by Martin Panter.
Zachary Ware [Wed, 16 Jul 2014 19:48:48 +0000 (14:48 -0500)]
Fix a minor typo in the turtle docs. Found by Brandon Passmore on docs@.
Zachary Ware [Wed, 16 Jul 2014 19:26:09 +0000 (14:26 -0500)]
Issue #21918: Convert test_tools.py to a sub-package of test.
Zachary Ware [Wed, 16 Jul 2014 18:24:55 +0000 (13:24 -0500)]
Remove Tools/scripts/pydocgui.pyw.
pydoc.gui was removed over 3 years ago (#10818), this script has been
utterly bereft of worth since then.
Victor Stinner [Wed, 16 Jul 2014 16:54:13 +0000 (18:54 +0200)]
asyncio: test_as_completed(): disable "slow callback" warning
Victor Stinner [Wed, 16 Jul 2014 16:50:39 +0000 (18:50 +0200)]
Issue #21163: Fix "destroy pending task" warning in test_wait_errors()
Victor Stinner [Wed, 16 Jul 2014 16:36:24 +0000 (18:36 +0200)]
Issue #21163, asyncio: Ignore "destroy pending task" warnings for private tasks
in gather().
Victor Stinner [Wed, 16 Jul 2014 16:02:10 +0000 (18:02 +0200)]
asyncio: test_selector_events: remove duplicate call to _on_handshake() method
The _SelectorSslTransport constructor already calls it.
Tal Einat [Wed, 16 Jul 2014 13:33:36 +0000 (16:33 +0300)]
Issue #21765: Add support for non-ascii identifiers to HyperParser
Terry Jan Reedy [Tue, 15 Jul 2014 03:07:32 +0000 (23:07 -0400)]
Issue #21982: Add minimal unittest for configDialog with 46% coverage.
Fix regression that this test would have caught.
Victor Stinner [Mon, 14 Jul 2014 20:26:34 +0000 (22:26 +0200)]
asyncio tests: make quiet the logs of SSL handshake failures when running tests
in debug mode
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().
Serhiy Storchaka [Mon, 14 Jul 2014 09:20:15 +0000 (12:20 +0300)]
Call PyErr_NoMemory() when PyMem_Malloc() fails.
Raymond Hettinger [Mon, 14 Jul 2014 08:52:00 +0000 (01:52 -0700)]
Issue 21977: Minor improvements to the regexes in the tokenizer example.
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
Ned Deily [Sun, 13 Jul 2014 05:16:56 +0000 (22:16 -0700)]
Issue #21323: Fix http.server to again handle scripts in CGI subdirectories,
broken by the fix for security issue #19435. Patch by Zach Byrne.
Ned Deily [Sun, 13 Jul 2014 05:12:39 +0000 (22:12 -0700)]
Issue #21323: Fix http.server to again handle scripts in CGI subdirectories,
broken by the fix for security issue #19435. Patch by Zach Byrne.
Ned Deily [Sun, 13 Jul 2014 05:06:26 +0000 (22:06 -0700)]
Issue #21323: Fix http.server to again handle scripts in CGI subdirectories,
broken by the fix for security issue #19435. Patch by Zach Byrne.
Berker Peksag [Sat, 12 Jul 2014 15:24:32 +0000 (18:24 +0300)]
Issue #19076: Don't pass the redundant 'file' argument to self.error().
Victor Stinner [Sat, 12 Jul 2014 01:20:24 +0000 (03:20 +0200)]
asyncio: Server.close() leaves client sockets open
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 21:47:40 +0000 (23:47 +0200)]
asyncio: improve the documentation of servers
- Fix the documentation of Server.close(): it closes sockets
- Replace AbstractServer with Server
- Document Server.sockets attribute
Victor Stinner [Fri, 11 Jul 2014 20:52:21 +0000 (22:52 +0200)]
asyncio, Tulip issue 180: Make Server attributes and methods private
- loop, waiters and active_count attributes are now private
- attach(), detach() and wakeup() methods are now private
The sockets attribute remains public.
Berker Peksag [Fri, 11 Jul 2014 17:42:18 +0000 (20:42 +0300)]
Issue #21906: Make Tools/scripts/md5sum.py work in Python 3.
Patch by Zachary Ware.
Victor Stinner [Fri, 11 Jul 2014 10:13:39 +0000 (12:13 +0200)]
asyncio: enhance documentation of platform support
Victor Stinner [Fri, 11 Jul 2014 09:58:33 +0000 (11:58 +0200)]
asyncio: sync with Tulip
* Tulip issue #182: Improve logs of BaseEventLoop._run_once()
- Don't log non-blocking poll
- Only log polling with a timeout if it gets events or if it timed out after
more than 1 second.
* Fix some pyflakes warnings: remove unused imports
Terry Jan Reedy [Fri, 11 Jul 2014 04:37:14 +0000 (00:37 -0400)]
Issue #18592: Make unittest for SearchDialogBase work on all tk versions.
Terry Jan Reedy [Fri, 11 Jul 2014 04:24:27 +0000 (00:24 -0400)]
Idle News entries.
Terry Jan Reedy [Fri, 11 Jul 2014 04:16:00 +0000 (00:16 -0400)]
#21940: Add unittest for WidgetRedirector. Initial patch by Saimadhav Heblikar.
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: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: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.
Zachary Ware [Thu, 10 Jul 2014 16:18:00 +0000 (11:18 -0500)]
Issue #21942: Fixed source file viewing in pydoc's server mode on Windows.
Terry Jan Reedy [Thu, 10 Jul 2014 05:16:49 +0000 (01:16 -0400)]
Issue #21940: add docstrings to idlelib.WidgetRedirector.
Berker Peksag [Wed, 9 Jul 2014 17:15:28 +0000 (20:15 +0300)]
Issues #21948 and #16040: Fix typos.
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 21:42:38 +0000 (23:42 +0200)]
Issue #21680: Document asyncio event loops
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 22:26:36 +0000 (00:26 +0200)]
Issue #11259: asynchat.async_chat().set_terminator() now raises a ValueError if
the number of received bytes is negative.
Victor Stinner [Mon, 7 Jul 2014 22:16:54 +0000 (00:16 +0200)]
asynchat: PEP8-ify the code
Victor Stinner [Mon, 7 Jul 2014 22:00:30 +0000 (00:00 +0200)]
Issue #12523: asynchat.async_chat.push() now raises a TypeError if it doesn't
get a bytes string
Victor Stinner [Mon, 7 Jul 2014 21:06:15 +0000 (23:06 +0200)]
Issue #21925: PyImport_Cleanup(): Remove unused parameter in
PySys_FormatStderr() call
Victor Stinner [Mon, 7 Jul 2014 19:52:29 +0000 (21:52 +0200)]
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 19:33:24 +0000 (14:33 -0500)]
Issue #17846: Clarify note about Solution Folders.
Initial patch by Kathleen Weaver.
Zachary Ware [Mon, 7 Jul 2014 19:31:34 +0000 (14:31 -0500)]
Fix MSVC edition mismatch.
Berker Peksag [Mon, 7 Jul 2014 18:29:50 +0000 (21:29 +0300)]
Issue #21707: Fix tests on Windows.
Victor Stinner [Mon, 7 Jul 2014 16:08:22 +0000 (18:08 +0200)]
asyncio: sync with Tulip
Backout the "Tulip issue 181: Faster create_connection()" changeset, it was a
mistake.
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()
Serhiy Storchaka [Mon, 7 Jul 2014 12:18:22 +0000 (15:18 +0300)]
Merge heads
Berker Peksag [Mon, 7 Jul 2014 11:58:12 +0000 (14:58 +0300)]
Issue #21707: Add missing kwonlyargcount argument to ModuleFinder.replace_paths_in_code().
Serhiy Storchaka [Mon, 7 Jul 2014 11:57:08 +0000 (14:57 +0300)]
Issue #21881: Just omit tests for platform-specific NaN representation in test_tcl.
Serhiy Storchaka [Mon, 7 Jul 2014 11:08:19 +0000 (14:08 +0300)]
Issue #19593: Use specific asserts in importlib tests.
Serhiy Storchaka [Mon, 7 Jul 2014 10:46:09 +0000 (13:46 +0300)]
Merge heads
Serhiy Storchaka [Mon, 7 Jul 2014 10:44:33 +0000 (13:44 +0300)]
Issue #21881: Be more tolerant in test_tcl to not parsable by float() NaN
representations (on mips and m68k platforms).
Antoine Pitrou [Mon, 7 Jul 2014 01:37:15 +0000 (21:37 -0400)]
Issue #20639: calling Path.with_suffix('') allows removing the suffix again.
Patch by July Tikhonov.
Antoine Pitrou [Mon, 7 Jul 2014 01:31:12 +0000 (21:31 -0400)]
Issue #21714: Disallow the construction of invalid paths using Path.with_name(). Original patch by Antony Lee.
Ned Deily [Sun, 6 Jul 2014 23:14:33 +0000 (16:14 -0700)]
Issue #21923: Prevent AttributeError in distutils.sysconfig.customize_compiler
due to possible uninitialized _config_vars. Original patch by Alex Gaynor.
Ezio Melotti [Sun, 6 Jul 2014 17:53:27 +0000 (20:53 +0300)]
#20135: move FAQ about mutable default arguments to the programming FAQs page.
Victor Stinner [Sat, 5 Jul 2014 13:38:59 +0000 (15:38 +0200)]
Closes #21921: Fix ResourceWarning in the asyncio examples: close the event
loop at exit. Patch written by Vajrasky Kok (I modified also the "hello world"
example using a coroutine).
Victor Stinner [Sat, 5 Jul 2014 13:29:41 +0000 (15:29 +0200)]
Closes #21886, #21447: Fix a race condition in asyncio when setting the result
of a Future with call_soon(). Add an helper, a private method, to set the
result only if the future was not cancelled.
Berker Peksag [Sat, 5 Jul 2014 08:10:16 +0000 (11:10 +0300)]
Issue #21920: Add a missing colon to the __main__ doc.
Patch by Stefan Tatschner.
Antoine Pitrou [Sat, 5 Jul 2014 00:24:13 +0000 (20:24 -0400)]
Issue #21897: Fix a crash with the f_locals attribute with closure variables when frame.clear() has been called.
Benjamin Peterson [Sat, 5 Jul 2014 00:00:25 +0000 (17:00 -0700)]
properly decref the return value of close()
Victor Stinner [Fri, 4 Jul 2014 20:47:46 +0000 (22:47 +0200)]
Issue #21892, #21893: Partial revert of changeset
4f55e802baf0, PyErr_Format()
uses "%zd" for Py_ssize_t, not PY_FORMAT_SIZE_T
Berker Peksag [Fri, 4 Jul 2014 12:06:45 +0000 (15:06 +0300)]
Add an index entry for exec() builtin.
Reported by Draic Kin on docs@.
Zachary Ware [Thu, 3 Jul 2014 15:58:06 +0000 (10:58 -0500)]
Issue #21151: Fixed a segfault in the winreg module.
When ``None`` was passed as a ``REG_BINARY`` value to SetValueEx,
PyMem_DEL was called on an uninitialized buffer. Patch by John Ehresman.
(Also an incidental typo fix in a comment in test_winreg)
Andrew Svetlov [Thu, 3 Jul 2014 13:07:17 +0000 (16:07 +0300)]
Update docs about tp_richcompare
Raymond Hettinger [Wed, 2 Jul 2014 23:31:30 +0000 (00:31 +0100)]
Fix guidance for subclassing collections.Set()
Victor Stinner [Wed, 2 Jul 2014 22:59:00 +0000 (00:59 +0200)]
asyncio: sync with Tulip
* _UnixSubprocessTransport: fix file mode of stdin. Open stdin in write mode,
not in read mode
* Examples: close the event loop at exit
* More reliable CoroWrapper.__del__. If the constructor is interrupted by
KeyboardInterrupt or the coroutine objet is destroyed lately, some the
_source_traceback attribute doesn't exist anymore.
* repr(Task): include also the future the task is waiting for
Victor Stinner [Wed, 2 Jul 2014 20:59:31 +0000 (22:59 +0200)]
Issue #21090: io.FileIO.readall() does not ignore I/O errors anymore. Before,
it ignored I/O errors if at least the first C call read() succeed.