Commit Graph

35451 Commits

Author SHA1 Message Date
Victor Stinner 47bbea7124 asyncio: sync with Tulip
* _SelectorTransport constructor: extra parameter is now optional
* Fix _SelectorDatagramTransport constructor. Only start reading after
  connection_made() has been called.
* Fix _SelectorSslTransport.close(). Don't call protocol.connection_lost() if
  protocol.connection_made() was not called yet: if the SSL handshake failed or
  is still in progress. The close() method can be called if the creation of the
  connection is cancelled, by a timeout for example.
2015-01-29 02:56:05 +01:00
Victor Stinner 7b5a900e88 asyncio: BaseSubprocessTransport._kill_wait() now also call close()
close() closes pipes, which is not None yet by _kill_wait().
2015-01-29 02:14:30 +01:00
Victor Stinner fa73779b0a asyncio: Fix _SelectorSocketTransport constructor
Only start reading when connection_made() has been called:
protocol.data_received() must not be called before protocol.connection_made().
2015-01-29 00:36:51 +01:00
Victor Stinner f07801bb17 asyncio: SSL transports now clear their reference to the waiter
* Rephrase also the comment explaining why the waiter is not awaken immediatly.
* SSLProtocol.eof_received() doesn't instanciate ConnectionResetError exception
  directly, it will be done by Future.set_exception(). The exception is not
  used if the waiter was cancelled or if there is no waiter.
2015-01-29 00:36:35 +01:00
Victor Stinner b507cbaac5 asyncio: Fix SSLProtocol.eof_received()
Wake-up the waiter if it is not done yet.
2015-01-29 00:35:56 +01:00
Donald Stufft a89f5f0492 Update setuptools to 12.0.5 and pip to 6.0.7 2015-01-28 17:56:15 -05:00
Victor Stinner ff018e406c asyncio: sync with Tulip
* Remove unused SSLProtocol._closing attribute
* test_sslproto: skip test if ssl module is missing
* Python issue #23208: Don't use the traceback of the current handle if we
  already know the traceback of the source. The handle may be more revelant,
  but having 3 tracebacks (handle, source, exception) becomes more difficult to
  read. The handle may be preferred later but it requires more work to make
  this choice.
2015-01-28 00:30:40 +01:00
Serhiy Storchaka 4dbc305002 Issue #23055: Fixed a buffer overflow in PyUnicode_FromFormatV. Analysis
and fix by Guido Vranken.
2015-01-27 22:18:46 +02:00
Victor Stinner 41063d2a59 asyncio, Tulip issue 204: Fix IocpProactor.recv()
If ReadFile() fails with ERROR_BROKEN_PIPE, the operation is not pending: don't
register the overlapped.

I don't know if WSARecv() can fail with ERROR_BROKEN_PIPE. Since
Overlapped.WSARecv() already handled ERROR_BROKEN_PIPE, let me guess that it
has the same behaviour than ReadFile().
2015-01-26 22:30:49 +01:00
Victor Stinner 24dfa3c1d6 Issue #23095, asyncio: Fix _WaitHandleFuture.cancel()
If UnregisterWaitEx() fais with ERROR_IO_PENDING, it doesn't mean that the wait
is unregistered yet. We still have to wait until the wait is cancelled.
2015-01-26 22:30:28 +01:00
Victor Stinner e0fd157ba0 Issue #23293, asyncio: Rewrite IocpProactor.connect_pipe() as a coroutine
Use a coroutine with asyncio.sleep() instead of call_later() to ensure that the
schedule call is cancelled.

Add also a unit test cancelling connect_pipe().
2015-01-26 15:04:03 +01:00
Victor Stinner 2a3f38fd29 asyncio: PipeHandle.fileno() now raises an exception if the pipe is closed 2015-01-26 15:03:44 +01:00
Victor Stinner a19b7b3fca asyncio: Fix ProactorEventLoop.start_serving_pipe()
If a client connected before the server was closed: drop the client (close the
pipe) and exit.
2015-01-26 15:03:20 +01:00
Serhiy Storchaka b76bcc4ffc Issue #14099: Backout changeset e5bb3044402b (except adapted tests). 2015-01-26 13:45:39 +02:00
Serhiy Storchaka b6c0c5ba5f Merge heads 2015-01-26 12:12:31 +02:00
Serhiy Storchaka 2bef58577f Issue #18518: timeit now rejects statements which can't be compiled outside
a function or a loop (e.g. "return" or "break").
2015-01-26 12:09:17 +02:00
Victor Stinner 9b524d59b0 Issue #23208, asyncio: Add BaseEventLoop._current_handle
In debug mode, BaseEventLoop._run_once() now sets the
BaseEventLoop._current_handle attribute to the handle currently executed.
In release mode or when no handle is executed, the attribute is None.

BaseEventLoop.default_exception_handler() displays the traceback of the current
handle if available.
2015-01-26 11:05:12 +01:00
Victor Stinner 3d2256f671 Issue #23293, asyncio: Cleanup IocpProactor.close()
The special case for connect_pipe() is not more needed. connect_pipe() doesn't
use overlapped operations anymore.
2015-01-26 11:02:59 +01:00
Victor Stinner 2596dd0894 asyncio: Close transports on error
Fix create_datagram_endpoint(), connect_read_pipe() and connect_write_pipe():
close the transport if the task is cancelled or on error.
2015-01-26 11:02:18 +01:00
Serhiy Storchaka 21d7533c4c Issue #23094: Fixed readline with frames in Python implementation of pickle. 2015-01-26 10:37:01 +02:00
Serhiy Storchaka 5106d044ec Issue #7665: Fixed tests test_ntpath and test_urllib2 when ran in the
directory containing a backslash.
2015-01-26 10:26:14 +02:00
Serhiy Storchaka f186e128b6 Issue #23268: Fixed bugs in the comparison of ipaddress classes. 2015-01-26 10:11:16 +02:00
Serhiy Storchaka f4b7a02e93 Issue #21408: The default __ne__() now returns NotImplemented if __eq__()
returned NotImplemented.  Removed incorrect implementations of __ne__().
2015-01-26 09:57:07 +02:00
Benjamin Peterson 155ceaa454 handle headers with no key (closes #19996)
Patch by Cory Benfield.
2015-01-25 23:30:30 -05:00
Senthil Kumaran e6cc70123e Increase http.client.HTTPConnection test coverage.
Added a new tunnel test to verify setting of _tunnel_host, _tunnel_port,
_tunnel_headers attributes on HTTPConnection object.
2015-01-24 19:24:59 -08:00
Vinay Sajip 5abca7023c Issue #23207: logging.basicConfig() now does additional validation of its arguments. 2015-01-23 19:52:21 +00:00
Gregory P. Smith 48e810069d revert 7b833bd1f509. I misread the side effect that the code was triggering.
*any* kwarg supplied to _assert_python causes it to not append -E to the
command line flags so without='-E' does effectively work.
2015-01-22 22:55:00 -08:00
Gregory P. Smith 566646133e Remove the unimplemented but ignored without='-E' parameters being passed to
script_helper.assert_python_failure().  No such feature has ever existed,
thus it doesn't do what the comment claims.  (It does add a 'without'
variable to the environment of the child process but that was not intended)
2015-01-22 22:04:16 -08:00
Gregory P. Smith fe7c5d6e4e Only pass -E to the child interpreter if our interpreter was running in that
mode.  Explicitly remove the PYTHONFAULTHANDLER environment variable before
launching a child interpreter when its presence would impact the test (the
reason -E was being used in the first place).

This enables running the test in an environment where other Python environment
variables must be set in order for things to run (such as using PYTHONHOME to
tell an embedded interpreter where it should think it lives).
2015-01-22 17:33:28 -08:00
Victor Stinner 2b77c5467f asyncio, Tulip issue 204: Fix IocpProactor.accept_pipe()
Overlapped.ConnectNamedPipe() now returns a boolean: True if the pipe is
connected (if ConnectNamedPipe() failed with ERROR_PIPE_CONNECTED), False if
the connection is in progress.

This change removes multiple hacks in IocpProactor.
2015-01-22 23:50:03 +01:00
Gregory P. Smith 34cd2ae69f Break up TestCommandLine.test_env_var into four distinct tests. 2015-01-22 14:38:00 -08:00
Victor Stinner 7ffa2c5fdd Issue #23293, asyncio: Rewrite IocpProactor.connect_pipe()
Add _overlapped.ConnectPipe() which tries to connect to the pipe for
asynchronous I/O (overlapped): call CreateFile() in a loop until it doesn't
fail with ERROR_PIPE_BUSY. Use an increasing delay between 1 ms and 100 ms.

Remove Overlapped.WaitNamedPipeAndConnect() which is no more used.
2015-01-22 22:55:08 +01:00
Victor Stinner 752aba7f99 asyncio: IocpProactor.close() doesn't cancel anymore futures which are already
cancelled
2015-01-22 22:47:13 +01:00
Victor Stinner f6228f02d7 Issue #23009: Add missing "import sys" in test_selectors 2015-01-22 09:35:23 +01:00
Victor Stinner 14d45c06eb Issue #23009: Skip test_selectors.test_empty_select() on Windows 2015-01-22 09:07:36 +01:00
Victor Stinner 1ca9392c70 Issue #23095, asyncio: IocpProactor.close() must not cancel pending
_WaitCancelFuture futures
2015-01-22 00:17:54 +01:00
Victor Stinner 0c2e408833 asyncio: BaseEventLoop._create_connection_transport() catchs any exception, not
only Exception
2015-01-22 00:17:41 +01:00
Victor Stinner d0a28dee78 Issue #23095, asyncio: Rewrite _WaitHandleFuture.cancel()
This change fixes a race conditon related to _WaitHandleFuture.cancel() leading
to Python crash or "GetQueuedCompletionStatus() returned an unexpected event"
logs. Before, the overlapped object was destroyed too early, it was possible
that the wait completed whereas the overlapped object was already destroyed.
Sometimes, a different overlapped was allocated at the same address, leading to
unexpected completition.

_WaitHandleFuture.cancel() now waits until the wait is cancelled to clear its
reference to the overlapped object. To wait until the cancellation is done,
UnregisterWaitEx() is used with an event instead of UnregisterWait().

To wait for this event, a new _WaitCancelFuture class was added. It's a
simplified version of _WaitCancelFuture. For example, its cancel() method calls
UnregisterWait(), not UnregisterWaitEx(). _WaitCancelFuture should not be
cancelled.

The overlapped object is kept alive in _WaitHandleFuture until the wait is
unregistered.

Other changes:

* Add _overlapped.UnregisterWaitEx()
* Remove fast-path in IocpProactor.wait_for_handle() to immediatly set the
  result if the wait already completed. I'm not sure that it's safe to
  call immediatly UnregisterWaitEx() before the completion was signaled.
* Add IocpProactor._unregistered() to forget an overlapped which may never be
  signaled, but may be signaled for the next loop iteration. It avoids to
  block forever IocpProactor.close() if a wait was cancelled, and it may also
  avoid some "... unexpected event ..." warnings.
2015-01-21 23:39:51 +01:00
Victor Stinner 442b0adccd asyncio: pyflakes, remove unused import
tests: Remove unused function; inline another function
2015-01-21 23:39:16 +01:00
Victor Stinner cd0f7f9832 asyncio: Enhance BaseProactorEventLoop._loop_self_reading()
* Handle correctly CancelledError: just exit
* On error, log the exception and exit

Don't try to close the event loop, it is probably running and so it cannot be
closed.
2015-01-21 23:38:37 +01:00
Gregory P. Smith b5684c48e1 Add the command line to the AssertionError raised by test.script_helper's
Python subprocess failure assertion error messages for easier debugging.

Adds a unittest for test.script_helper to confirm that this code works as
it is otherwise uncovered by an already passing test suite that uses it. :)
2015-01-20 17:19:47 -08:00
Zachary Ware b176d40398 Issue #23280: Fix docstrings for binascii.(un)hexlify 2015-01-20 13:59:46 -06:00
Serhiy Storchaka d3faf43f9b Issue #23181: More "codepoint" -> "code point". 2015-01-18 11:28:37 +02:00
Ned Deily ccb416fee2 Issue #23180: Rename IDLE "Windows" menu item to "Window".
Patch by Al Sweigart.
2015-01-17 21:06:27 -08:00
Ned Deily 3bbb37e09b Issue #23211: Fix patch for 3.4 differences. 2015-01-17 17:31:13 -08:00
Ned Deily 1e012e6c7f Issue #23211: Workaround test_logging failure on some OS X 10.6 systems:
getaddrinfo("localhost") can fail depending on the name server configuration,
use "127.0.0.0" instead.
2015-01-17 16:57:19 -08:00
Zachary Ware 465b057f91 Closes #23256: Avoid a crash in test_ctypes
Only happened with oddly capitalized debug executables on Windows.
Patch by Claudiu Popa.
2015-01-17 08:50:42 -06:00
Benjamin Peterson bd341629b0 capitialize "HttpOnly" and "Secure" as they appear in the standard and other impls (closes #23250)
Patch by Jon Dufresne.
2015-01-16 20:43:55 -05:00
Victor Stinner f716d8b7a5 Issue #22685: Fix test_pause_reading() of asyncio/test_subprocess
Override the connect_read_pipe() method of the loop to mock immediatly
pause_reading() and resume_reading() methods.

The test failed randomly on FreeBSD 9 buildbot and on Windows using trollius.
2015-01-15 22:52:59 +01:00
Victor Stinner 406204c8c2 Backout changeset 6ab2575bc12b
StreamWriter: close() now clears the reference to the transport

StreamWriter now raises an exception if it is closed: write(), writelines(),
write_eof(), can_write_eof(), get_extra_info(), drain().
2015-01-15 21:50:19 +01:00
Victor Stinner 922bc2ca12 Closes #23219: cancelling asyncio.wait_for() now cancels the task 2015-01-15 16:29:10 +01:00
Victor Stinner ab8848bc2a asyncio: Close transports in tests
* Use test_utils.run_briefly() to execute pending calls to really close
  transports
* sslproto: mock also _SSLPipe.shutdown(), it's need to close the transport
* pipe test: the test doesn't close explicitly the PipeHandle, so ignore
  the warning instead
* test_popen: use the context manager ("with p:") to explicitly close pipes
2015-01-15 14:24:55 +01:00
Victor Stinner 4bf22e033e asyncio: Close the transport on subprocess creation failure 2015-01-15 14:24:22 +01:00
Victor Stinner fcd58de78f asyncio: Fix _ProactorBasePipeTransport.close()
Set the _read_fut attribute to None after cancelling it.

This change should fix a race condition with
_ProactorWritePipeTransport._pipe_closed().
2015-01-15 13:40:27 +01:00
Victor Stinner 79c93ba47b asyncio: Fix _ProactorBasePipeTransport.__repr__()
Check if the _sock attribute is None to check if the transport is closed.
2015-01-15 13:32:28 +01:00
Victor Stinner 02392c9282 Issue #23243: Close explicitly transports in asyncio tests 2015-01-15 13:18:32 +01:00
Victor Stinner 33cb0396e8 Issue #23243: Close explicitly event loops in asyncio tests 2015-01-15 13:17:34 +01:00
Victor Stinner 41ed958ee6 Issue #23243: Fix asyncio._UnixWritePipeTransport.close()
Do nothing if the transport is already closed. Before it was not possible to
close the transport twice.
2015-01-15 13:16:50 +01:00
Victor Stinner 7e222f411c SSLProtocol: set the _transport attribute in the constructor 2015-01-15 13:16:27 +01:00
Victor Stinner 791009bb89 Issue #23242: asyncio.SubprocessStreamProtocol now closes the subprocess
transport at subprocess exit.

Clear also its reference to the transport.
2015-01-15 13:16:02 +01:00
Victor Stinner 72bdefb086 Issue #22560: Fix typo: call -> call_soon 2015-01-15 09:44:13 +01:00
Victor Stinner 042dad7232 Issue #22560: Fix SSLProtocol._on_handshake_complete()
Don't call immediatly self._process_write_backlog() but schedule the call using
call_soon(). _on_handshake_complete() can be called indirectly from
_process_write_backlog(), and _process_write_backlog() is not reentrant.
2015-01-15 09:41:48 +01:00
Victor Stinner e7a35717d2 StreamWriter: close() now clears the reference to the transport
StreamWriter now raises an exception if it is closed: write(), writelines(),
write_eof(), can_write_eof(), get_extra_info(), drain().
2015-01-15 09:33:50 +01:00
Benjamin Peterson 562b7cbff9 fix parsing reST with code or code-block directives (closes #23063)
Patch by Marc Abramowitz.
2015-01-14 23:56:35 -05:00
Victor Stinner 29ad0111bd asyncio: sync with Tulip
* PipeHandle now uses None instead of -1 for a closed handle
* Sort imports in windows_utils.
* Fix test_events on Python older than 3.5. Skip SSL tests on the
  ProactorEventLoop if ssl.MemoryIO is missing
* Fix BaseEventLoop._create_connection_transport(). Close the transport if the
  creation of the transport (if the waiter) gets an exception.
* _ProactorBasePipeTransport now sets _sock to None when the transport is
  closed.
* Fix BaseSubprocessTransport.close(). Ignore pipes for which the protocol is
  not set yet (still equal to None).
* TestLoop.close() now calls the close() method of the parent class
  (BaseEventLoop).
* Cleanup BaseSelectorEventLoop: create the protocol on a separated line for
  readability and ease debugging.
* Fix BaseSubprocessTransport._kill_wait(). Set the _returncode attribute, so
  close() doesn't try to terminate the process.
* Tests: explicitly close event loops and transports
* UNIX pipe transports: add closed/closing in repr(). Add "closed" or "closing"
  state in the __repr__() method of _UnixReadPipeTransport and
  _UnixWritePipeTransport classes.
2015-01-15 00:04:21 +01:00
Victor Stinner b92626df5c Issue #23197: On SSL handshake failure on matching hostname, check if the
waiter is cancelled before setting its exception.
2015-01-14 17:13:28 +01:00
Victor Stinner 177e9f0855 Issue #23197, asyncio: On SSL handshake failure, check if the waiter is
cancelled before setting its exception.

* Add unit tests for this case.
* Cleanup also sslproto.py
2015-01-14 16:56:20 +01:00
Victor Stinner f651a60407 Python issue #23173: sync with Tulip
* If an exception is raised during the creation of a subprocess, kill the
  subprocess (close pipes, kill and read the return status). Log an error in
  such case.
* Fix SubprocessStreamProtocol.connection_made() to handle cancelled waiter.
  Add unit test cancelling subprocess methods.
2015-01-14 02:10:33 +01:00
Victor Stinner c2c12e433a Issue #23198: Reactor asyncio.StreamReader
- Add a new _wakeup_waiter() method
- Replace _create_waiter() method with a _wait_for_data() coroutine function
- Use the value None instead of True or False to wake up the waiter
2015-01-14 00:53:37 +01:00
Victor Stinner 231b404cb0 Issue #22560: New SSL implementation based on ssl.MemoryBIO
The new SSL implementation is based on the new ssl.MemoryBIO which is only
available on Python 3.5. On Python 3.4 and older, the legacy SSL implementation
(using SSL_write, SSL_read, etc.) is used. The proactor event loop only
supports the new implementation.

The new asyncio.sslproto module adds _SSLPipe, SSLProtocol and
_SSLProtocolTransport classes. _SSLPipe allows to "wrap" or "unwrap" a socket
(switch between cleartext and SSL/TLS).

Patch written by Antoine Pitrou. sslproto.py is based on gruvi/ssl.py of the
gruvi project written by Geert Jansen.

This change adds SSL support to ProactorEventLoop on Python 3.5 and newer!

It becomes also possible to implement STARTTTLS: switch a cleartext socket to
SSL.
2015-01-14 00:19:09 +01:00
Victor Stinner 9036e49ba1 Tulip issue 184: Fix test_pipe() on Windows
Pass explicitly the event loop to StreamReaderProtocol.
2015-01-13 16:13:06 +01:00
Victor Stinner b86a96802b Issue #22922: Fix ProactorEventLoop.close()
Close the IocpProactor before closing the event loop. IocpProactor.close() can
call loop.call_soon(), which is forbidden when the event loop is closed.
2015-01-13 16:11:19 +01:00
Benjamin Peterson 82f34ada45 fix instances of consecutive articles (closes #23221)
Patch by Karan Goel.
2015-01-13 09:17:24 -05:00
Victor Stinner 38dc250521 Issue #23209, #23225: selectors.BaseSelector.close() now clears its internal
reference to the selector mapping to break a reference cycle. Initial patch
written by Martin Richard.
2015-01-13 09:58:33 +01:00
Donald Stufft d9fe22ce9b Update setuptools to 11.3.1 2015-01-11 15:51:11 -05:00
Victor Stinner 686fe6e156 Issue #23209: Revert change on selectors, test_selectors failed. 2015-01-09 21:56:28 +01:00
Victor Stinner 587feb19e8 Issue #23209: Break some reference cycles in asyncio. Patch written by Martin
Richard.
2015-01-09 21:34:27 +01:00
Victor Stinner 70db9e428a asyncio: sync with Tulip
* Tulip issue 184: FlowControlMixin constructor now get the event loop if the
  loop parameter is not set. Add unit tests to ensure that constructor of
  StreamReader and StreamReaderProtocol classes get the event loop.
* Remove outdated TODO/XXX
2015-01-09 21:32:05 +01:00
Victor Stinner 3531d9044d asyncio: sync with Tulip
* Document why set_result() calls are safe
* Cleanup gather(). Use public methods instead of hacks to consume the
  exception of a future.
* sock_connect(): pass directly the fd to _sock_connect_done instead of the
  socket.
2015-01-09 01:42:52 +01:00
Victor Stinner 15cc678d89 asyncio: Truncate to 80 columns 2015-01-09 00:09:10 +01:00
Victor Stinner 8d9c145f61 asyncio: _make_ssl_transport: make the waiter parameter optional 2015-01-08 12:06:36 +01:00
Terry Jan Reedy 84d64a9c02 Issue #23184: delete unused idlelib file. 2015-01-07 23:48:46 -05:00
Nick Coghlan b9fdb7a452 Issue 19548: update codecs module documentation
- clarified the distinction between text encodings and other codecs
- clarified relationship with builtin open and the io module
- consolidated documentation of error handlers into one section
- clarified type constraints of some behaviours
- added tests for some of the new statements in the docs
2015-01-07 00:22:00 +10:00
Victor Stinner fcfed19913 Issue #21356: Make ssl.RAND_egd() optional to support LibreSSL. The
availability of the function is checked during the compilation. Patch written
by Bernard Spil.
2015-01-06 13:54:58 +01:00
Victor Stinner 9d01717f37 Issue #20896, #22935: The ssl.get_server_certificate() function now uses the
ssl.PROTOCOL_SSLv23 protocol by default, not ssl.PROTOCOL_SSLv3, for maximum
compatibility and support platforms where ssl.PROTOCOL_SSLv3 support is
disabled.
2015-01-06 12:21:26 +01:00
Raymond Hettinger 0603d3049e Issue #23132: Mitigate regression in speed and clarity in functools.total_ordering. 2015-01-05 21:52:10 -08:00
Victor Stinner 212994e4e2 Issue #23140, asyncio: Simplify the unit test 2015-01-06 01:22:45 +01:00
Victor Stinner c447ba04e7 Issue #23140, asyncio: Fix cancellation of Process.wait(). Check the state of
the waiter future before setting its result.
2015-01-06 01:13:49 +01:00
Victor Stinner 8c1a4a2326 Issue #23046: Expose the BaseEventLoop class in the asyncio namespace 2015-01-06 01:03:58 +01:00
Ned Deily 1418320850 Issue #22165: Skip test_undecodable_filename on OS X prior to 10.5.
10.4 systems do not allow creation of files with such filenames.
2015-01-05 01:02:30 -08:00
Berker Peksag d91082c777 Issue #18644: Fix a ResourceWarning in formatter.test().
Patch by Vajrasky Kok.
2015-01-05 09:19:40 +02:00
Gregory P. Smith 5719ef17ba fix issue23157 - time_hashlib hadn't been ported to Python 3. 2015-01-04 00:36:04 -08:00
Donald Stufft b8f35ff57b Upgrade the bundled pip to 6.0.6 and the bundled setuptools to 11.0 2015-01-03 05:20:23 -05:00
Benjamin Peterson 36fe7926f8 make PROTOCOL_SSLv23 the default protocol version for ftplib (closes #23111) 2014-12-30 15:15:43 -06:00
Victor Stinner 956de691f8 Issue #22926: In debug mode, call_soon(), call_at() and call_later() methods of
asyncio.BaseEventLoop now use the identifier of the current thread to ensure
that they are called from the thread running the event loop.

Before, the get_event_loop() method was used to check the thread, and no
exception was raised when the thread had no event loop. Now the methods always
raise an exception in debug mode when called from the wrong thread. It should
help to notice misusage of the API.
2014-12-26 21:07:52 +01:00
Victor Stinner d7ff5a5375 asyncio: sync with Tulip
* Fix pyflakes warnings: remove unused imports and variables
* asyncio.test_support now uses test.support and test.script_helper if available
2014-12-26 21:16:42 +01:00
Victor Stinner fe02e39029 Issue #22585: On OpenBSD 5.6 and newer, os.urandom() now calls getentropy(),
instead of reading /dev/urandom, to get pseudo-random bytes.
2014-12-21 01:16:38 +01:00
Benjamin Peterson 94cb7a2429 fix behavior of trailing slash redirection when a query string is involved (closes #23112) 2014-12-26 10:53:43 -06:00
R David Murray 8c4e112afc #23040: Clarify treatment of encoding and errors when component is bytes.
Patch by Wojtek Ruszczewski.
2014-12-24 21:23:18 -05:00
Donald Stufft c8d94ba8f4 Upgrade pip to 6.0.2 and setuptools to 8.2.1 2014-12-23 09:18:38 -05:00
Victor Stinner 952ec98abb asyncio doc: update also Queue docstrings 2014-12-22 22:09:50 +01:00
Benjamin Peterson 10e76b67c9 allow more operations to work on detached streams (closes #23093)
Patch by Martin Panter.
2014-12-21 20:51:50 -06:00
Serhiy Storchaka fe3dc376fa Issue #19104: pprint now produces evaluable output for wrapped strings. 2014-12-20 20:57:15 +02:00
Serhiy Storchaka f65d1d3b02 Issue #23071: "namereplace_errors" was added only in 3.5. 2014-12-20 18:53:01 +02:00
Serhiy Storchaka de3ee5b94f Issue #23071: Added missing names to codecs.__all__. Patch by Martin Panter. 2014-12-20 17:42:38 +02:00
Victor Stinner 4d825b45a0 asyncio: IocpProactor.wait_for_handle() test now also checks the result of the
future
2014-12-19 17:10:44 +01:00
Victor Stinner 1b9763d0a9 asyncio: sync with Tulip
* Fix a race condition in BaseSubprocessTransport._try_finish().

  If the process exited before the _post_init() method was called, scheduling
  the call to _call_connection_lost() with call_soon() is wrong:
  connection_made() must be called before connection_lost().

  Reuse the BaseSubprocessTransport._call() method to schedule the call to
  _call_connection_lost() to ensure that connection_made() and
  connection_lost() are called in the correct order.

* Add repr(PipeHandle)

* Fix typo
2014-12-18 23:47:27 +01:00
Victor Stinner dc7765d12c asyncio: sync with Tulip 2014-12-18 12:29:53 +01:00
Victor Stinner 3a1c738e6c Issue #23074: asyncio.get_event_loop() now raises an exception if the thread
has no event loop even if assertions are disabled.
2014-12-18 01:20:10 +01:00
Serhiy Storchaka 5bbd231f27 Issue #15513: Added a __sizeof__ implementation for pickle classes. 2014-12-16 19:39:08 +02:00
Serhiy Storchaka 05dadcfb28 Issue #19858: pickletools.optimize() now aware of the MEMOIZE opcode, can
produce more compact result and no longer produces invalid output if input
data contains MEMOIZE opcodes together with PUT or BINPUT opcodes.
2014-12-16 18:00:56 +02:00
Terry Jan Reedy df9386940a Issue #20577: move configuration of FormatParagraph extension to new extension
configuration dialog.  Patch by Tal Einat.
2014-12-16 03:21:26 -05:00
Benjamin Peterson 4c11c92578 remove extra ssl imports (closes #23053)
Patch from Jan Matejek.
2014-12-15 10:04:13 -05:00
Serhiy Storchaka bad1257c96 Issue #22777: Test pickling with all protocols. 2014-12-15 14:03:42 +02:00
Serhiy Storchaka 79b81738ef Issue #23015: Improved testing of the uuid module. 2014-12-15 12:03:44 +02:00
Serhiy Storchaka eb9a9b6ffa Fixed a typo in a comment (issue #23016). 2014-12-14 10:53:00 +02:00
Benjamin Peterson 9566de18e6 make sure server threads get cleaned up 2014-12-13 16:13:24 -05:00
Benjamin Peterson 3cda0ed062 pop the loop block even for infinite while loops (closes #23048) 2014-12-13 16:06:19 -05:00
Serhiy Storchaka db9b65d9e5 Issue #22823: Use set literals in lib2to3. 2014-12-13 21:50:49 +02:00
Victor Stinner 437ffbdcd8 test_selectors: Tolerate 2.0 seconds instead of 1.6 sec for very slow buildbots 2014-12-12 12:57:35 +01:00
Victor Stinner 3f7e064b2b Issue #22935: Fix test_ssl when the SSLv3 protocol is not supported 2014-12-12 12:27:08 +01:00
Victor Stinner 0041142785 Issue #22935: Fix ssl module when SSLv3 protocol is not supported 2014-12-12 12:23:09 +01:00
Serhiy Storchaka 4ac7ed97a8 Issue #22095: Fixed HTTPConnection.set_tunnel with default port. The port
value in the host header was set to "None".  Patch by Demian Brecht.
2014-12-12 09:29:15 +02:00
Victor Stinner 1e40f10886 asyncio, tulip issue 209: Fix subprocess for close_fds=False on Python 3.3
Mark the write end of the stdin pipe as non-inheritable.
2014-12-11 23:30:17 +01:00
Victor Stinner df75d5b402 asyncio, tulip issue 202: Add unit test of pause/resume writing for proactor
socket transport
2014-12-11 22:23:19 +01:00
Terry Jan Reedy 049882e561 Issue 22823: Use set literal in idlelib. 2014-12-11 05:33:36 -05:00
Serhiy Storchaka 60599525c5 Issue #23016: A warning no longer produces AttributeError when the program
is run with pythonw.exe.
2014-12-10 22:59:55 +02:00
Berker Peksag 884afd92f5 Issue #21775: shutil.copytree(): fix crash when copying to VFAT
An exception handler assumed that that OSError objects always have a
'winerror' attribute. That is not the case, so the exception handler
itself raised AttributeError when run on Linux (and, presumably, any
other non-Windows OS).

Patch by Greg Ward.
2014-12-10 02:50:32 +02:00
Yury Selivanov 7de29687f2 inspect: Fix getsource() to load updated source of reloaded module
Issue #1218234. Initial patch by Berker Peksag.
2014-12-08 18:00:25 -05:00
Yury Selivanov dfc44e0525 selectors: Fix typo in comment. 2014-12-08 12:30:10 -05:00
Yury Selivanov d60ef4aa9d selectors: Make sure EpollSelecrtor.select() works when no FD is registered.
Closes issue #23009.
2014-12-08 12:21:58 -05:00
Benjamin Peterson b666697fa8 use context's check_hostname attribute rather than the HTTPSHandler check_hostname parameter 2014-12-07 13:46:02 -05:00
Benjamin Peterson a090f01bb6 HTTPSConnection: prefer the context's check_hostname attribute over the constructor parameter (#22959) 2014-12-07 13:18:25 -05:00
Benjamin Peterson e32467cf6a allow ssl module to compile if openssl doesn't support SSL 3 (closes #22935)
Patch by Kurt Roeckx.
2014-12-05 21:59:35 -05:00
Terry Jan Reedy 81f01fb104 Update idlelib/NEWS.txt. 2014-12-05 20:49:32 -05:00
Benjamin Peterson eca72d47f5 merge 3.3 (#16043) 2014-12-05 20:34:56 -05:00
Benjamin Peterson 81b7374fbe merge 3.2 (#16043) 2014-12-05 20:30:54 -05:00
Benjamin Peterson 4e9cefaf86 add a default limit for the amount of data xmlrpclib.gzip_decode will return (closes #16043) 2014-12-05 20:15:15 -05:00
Serhiy Storchaka b757c83ec6 Issue #22581: Use more "bytes-like object" throughout the docs and comments. 2014-12-05 22:25:22 +02:00
Victor Stinner 969175091c Issue #22599: Enhance tokenize.open() to be able to call it during Python
finalization.

Before the module kept a reference to the builtins module, but the module
attributes are cleared during Python finalization. Instead, keep directly a
reference to the open() function.

This enhancement is not perfect, calling tokenize.open() can still fail if
called very late during Python finalization.  Usually, the function is called
by the linecache module which is called to display a traceback or emit a
warning.
2014-12-05 10:17:10 +01:00
Victor Stinner f3e2e09213 Closes #22429, asyncio: Fix EventLoop.run_until_complete(), don't stop the
event loop if a BaseException is raised, because the event loop is already
stopped.
2014-12-05 01:44:10 +01:00
Victor Stinner 4c85ec99f3 Issue #22922: Fix ProactorEventLoop.close()
Call _stop_accept_futures() before sestting the _closed attribute, otherwise
call_soon() raises an error.
2014-12-05 01:43:42 +01:00
Victor Stinner e80bf0d4a9 Closes #22922: More EventLoop methods fail if the loop is closed. Initial patch
written by Torsten Landschoff.

create_task(), call_at(), call_soon(), call_soon_threadsafe() and
run_in_executor() now raise an error if the event loop is closed.
2014-12-04 23:07:47 +01:00
Victor Stinner dd8224e6a4 Issue #22685: Fix test_pause_reading() of asyncio test_subprocess
* mock also resume_reading()
* ensure that resume_reading() is called
2014-12-04 23:06:13 +01:00
Victor Stinner fe22e0985a asyncio: Initialize more Future and Task attributes in the class definition to
avoid attribute errors in destructors.
2014-12-04 23:00:13 +01:00
Serhiy Storchaka 1ad088f3ea Issue #14099: ZipFile.open() no longer reopen the underlying file. Objects
returned by ZipFile.open() can now operate independently of the ZipFile even
if the ZipFile was created by passing in a file-like object as the first
argument to the constructor.
2014-12-03 09:11:57 +02:00
Victor Stinner d87de83582 Closes #22475: asyncio doc, fix Task.get_stack() doc 2014-12-02 17:57:04 +01:00
Barry Warsaw eb2763dd43 Fix the test to use an os.sep agnostic test. Hopefully this will fix the
Windows buildbots.  Found by Jeremy Kloth.
2014-12-02 11:30:43 -05:00
Serhiy Storchaka 83cf99d733 Issue #20335: bytes constructor now raises TypeError when encoding or errors
is specified with non-string argument.  Based on patch by Renaud Blanch.
2014-12-02 09:24:06 +02:00
Barry Warsaw 9d98c9bf42 Make this change a little more robust for up-merging. 2014-12-01 18:15:26 -05:00
Barry Warsaw 9e4db75426 - Issue #22966: Fix __pycache__ pyc file name clobber when pyc_compile is
asked to compile a source file containing multiple dots in the source file
  name.
2014-12-01 17:23:55 -05:00
Barry Warsaw 2a413853f1 - Issue #22966: Fix __pycache__ pyc file name clobber when pyc_compile is
asked to compile a source file containing multiple dots in the source file
  name.
2014-12-01 17:10:10 -05:00
Serhiy Storchaka 56a6d855e2 Removed duplicated words in in comments and docs. 2014-12-01 18:28:43 +02:00
Serhiy Storchaka b491e0521f Issue #21032. Fixed socket leak if HTTPConnection.getresponse() fails.
Original patch by Martin Panter.
2014-12-01 13:07:45 +02:00
Serhiy Storchaka 9cba989502 Issue #22838: All test_re tests now work with unittest test discovery. 2014-12-01 11:06:45 +02:00
Benjamin Peterson 66323415c7 backout 9fcf4008b626 (#9179) for further consideration 2014-11-30 11:49:00 -05:00
Benjamin Peterson c1da3d1ed8 add context parameter to xmlrpclib.ServerProxy (#22960)
Patch by Alex Gaynor.
2014-11-29 23:32:57 -05:00
Antoine Pitrou 2b3b95be62 Close issue #22895: fix test failure introduced by the fix for issue #22462. 2014-11-29 15:56:07 +01:00
Ned Deily 153879075f Issue #16113: Also remove test_case_sha3_224_huge 2014-11-28 15:21:12 -08:00
Victor Stinner cbbd04d176 Issue #22685: Debug test_pause_reading() on FreeBSD 2014-11-28 18:02:03 +01:00
Serhiy Storchaka 9a4fc19589 Issue #21280: Fixed a bug in shutil.make_archive() when create an archive of
current directory in current directory.
2014-11-28 00:48:46 +02:00
Serhiy Storchaka ab5e9b9213 Issue #22314: pydoc now works when the LINES environment variable is set. 2014-11-28 00:09:29 +02:00
Serhiy Storchaka fc8e9b0e72 Issue #22915: SAX parser now supports files opened with file descriptor or
bytes path.
2014-11-27 22:13:16 +02:00
Serhiy Storchaka a86700ae87 Issue #22609: Revert changes in UserDict. They conflicted with existing tests. 2014-11-27 17:45:44 +02:00
Serhiy Storchaka ae5cb214d2 Issue #22609: Constructors and update methods of mapping classes in the
collections module now accept the self keyword argument.
2014-11-27 16:25:51 +02:00
Benjamin Peterson 5b5350787f use skipUnless 2014-11-26 14:35:56 -06:00
Benjamin Peterson 6150804397 handle errors without a reason attribute 2014-11-25 15:43:58 -06:00
Benjamin Peterson 2615e9e293 don't fail tests when www.python.org can't be validated by the system 2014-11-25 15:16:55 -06:00
Victor Stinner 5ef586f25a Closes #22685, asyncio: Set the transport of stdout and stderr StreamReader
objects in the SubprocessStreamProtocol. It allows to pause the transport to
not buffer too much stdout or stderr data.
2014-11-25 17:20:33 +01:00
Benjamin Peterson 43052a14c1 add context parameter to HTTPHandler (closes #22788) 2014-11-23 20:36:44 -06:00
Benjamin Peterson 7243b574e5 don't require OpenSSL SNI to pass hostname to ssl functions (#22921)
Patch by Donald Stufft.
2014-11-23 17:04:34 -06:00
Antoine Pitrou 18f22989dd Issue #22894: TestCase.subTest() would cause the test suite to be stopped when in failfast mode, even in the absence of failures. 2014-11-23 15:55:11 +01:00
Benjamin Peterson e71abcc7bb merge 3.2 2014-11-05 11:29:39 -05:00
Benjamin Peterson 258f3f0dc2 use pythontest.net for url fragment test 2014-11-05 11:27:14 -05:00
Benjamin Peterson 97751fa5c9 merge 3.2 2014-11-03 15:11:53 -05:00
Benjamin Peterson 863c962e68 move idna test domain to pythontest.net 2014-11-03 15:10:47 -05:00
Antoine Pitrou a21de3d45e Issue #22638: SSLv3 is now disabled throughout the standard library.
It can still be enabled by instantiating a SSLContext manually.
2014-10-17 19:28:30 +02:00
Serhiy Storchaka 525d5aeaae Issue #17293: socket.gethostbyname() can raise an exception of FreeBSD. 2014-11-21 21:55:39 +02:00
Victor Stinner 5e63120f8d asyncio: BaseSelectorEventLoop.close() now closes the self-pipe before calling
the parent close() method. If the event loop is already closed, the self-pipe
is not unregistered from the selector.
2014-11-21 00:23:27 +01:00
Victor Stinner 2d99d93d11 asyncio: Coroutine objects are now rejected with a TypeError by the following
functions:

* add_signal_handler()
* call_at()
* call_later()
* call_soon()
* call_soon_threadsafe()
* run_in_executor()

Fix also the error message of add_signal_handler() (fix the name of the
function).
2014-11-20 15:03:52 +01:00
Victor Stinner c1ad35aae8 asyncio, test_events: Ignore the "SSL handshake failed" log in debug mode 2014-11-20 14:19:23 +01:00
Victor Stinner 662fd5f68e asyncio: Fix formatting of the "Future exception was never retrieved" in
release mode
2014-11-20 14:16:31 +01:00
Serhiy Storchaka abde2c1d25 Issue #20736: testSendmsgDontWait in test_socket no longer skipped on Linux.
Patch by David Watson.
2014-11-19 13:21:13 +02:00
Serhiy Storchaka fca2fc090c Issue #20604: Added missed invalid mode in error message of socket.makefile().
Based on patch by Franck Michea.
2014-11-19 12:33:40 +02:00
Antoine Pitrou db118f5db7 Close #22370: Windows detection in pathlib is now more robust. 2014-11-19 00:32:08 +01:00
Serhiy Storchaka 66dd4aaa96 Issue #20662: Argspec now is escaped in html output of pydoc. 2014-11-17 23:48:02 +02:00
Serhiy Storchaka 030e92d1a5 Issue #22193: Fixed integer overflow error in sys.getsizeof().
Fixed an error in _PySys_GetSizeOf declaration.
2014-11-15 13:21:37 +02:00
Guido van Rossum e36fcde383 - Issue #22841: Reject coroutines in asyncio add_signal_handler().
Patch by Ludovic.Gasc.
2014-11-14 11:45:47 -08:00
Benjamin Peterson 6c14f23100 fix possible double free in TextIOWrapper.__init__ (closes #22849) 2014-11-12 10:19:46 -05:00
Donald Stufft dfede95a06 Upgrade setuptools to 7.0 2014-11-11 11:01:09 -05:00
Serhiy Storchaka 19e9158497 Got rid of the array module dependency in the re module.
The re module could be used during building before array is built.
2014-11-10 13:24:47 +02:00
Serhiy Storchaka 0c938f6d24 Issue #12728: Different Unicode characters having the same uppercase but
different lowercase are now matched in case-insensitive regular expressions.
2014-11-10 12:37:16 +02:00
Serhiy Storchaka 3402ef6c8d Silence the failure of test_pyclbr after adding a property in sre_parse
(issue #814253).
2014-11-07 22:32:37 +02:00
Serhiy Storchaka 84df7fe6a2 Issues #814253, #9179: Group references and conditional group references now
work in lookbehind assertions in regular expressions.
2014-11-07 21:43:57 +02:00
Serhiy Storchaka 519114df42 Issue #22406: Fixed the uu_codec codec incorrectly ported to 3.x.
Based on patch by Martin Panter.
2014-11-07 14:04:37 +02:00
Serhiy Storchaka e66bb96929 Issue #17293: uuid.getnode() now determines MAC address on AIX using netstat.
Based on patch by Aivars Kalvāns.
2014-11-07 12:19:40 +02:00
Serhiy Storchaka 8e92f57274 Issue #22769: Fixed ttk.Treeview.tag_has() when called without arguments. 2014-11-07 12:02:31 +02:00
Georg Brandl 72a7f7c476 Try to transfer the Unicode test data files gzipped. 2014-11-06 15:33:30 +01:00
Georg Brandl 5a15508f97 #22650: test suite: load Unicode test data files from www.pythontest.net 2014-11-06 14:37:49 +01:00
Steve Dower b7fa201113 Issue #20160: broken ctypes calling convention on MSVC / 64-bit Windows (large structs) Patch by mattip 2014-11-04 21:21:22 -08:00
Georg Brandl fbaf931096 test_httplib: use self-signed.pythontest.net for verification test with non-root-CA cert 2014-11-05 20:37:40 +01:00
Antoine Pitrou 50219fcd23 Closes #22784: fix test_asyncio when the ssl module isn't available 2014-11-05 20:48:16 +01:00
Benjamin Peterson b811a97859 use pythontest.net for fragment redirection test 2014-11-05 13:10:08 -05:00
Benjamin Peterson 1d83002748 remove requires_ssl decorator 2014-11-05 11:30:21 -05:00
Benjamin Peterson 67a9877866 merge 3.3 2014-11-05 11:30:00 -05:00
Victor Stinner 004adb91f6 asyncio: Move loop attribute to _FlowControlMixin
Move the _loop attribute from the constructor of _SelectorTransport,
_ProactorBasePipeTransport and _UnixWritePipeTransport classes to the
constructor of the _FlowControlMixin class.

Add also an assertion to explicit that the parent class must ensure that the
loop is defined (not None)
2014-11-05 15:27:41 +01:00
Antoine Pitrou 7e8b8678f1 Issue #22773: fix failing test with old readline versions due to issue #19884. 2014-11-04 14:52:10 +01:00
Benjamin Peterson 1ea070e561 test that keyfile can be None 2014-11-03 21:05:01 -05:00
Benjamin Peterson 8d2d5b9c59 merge 3.3 2014-11-03 15:12:06 -05:00
Benjamin Peterson 4ffb075271 PEP 476: enable HTTPS certificate verification by default (#22417)
Patch by Alex Gaynor with some modifications by me.
2014-11-03 14:29:33 -05:00
Serhiy Storchaka 8cf7c1cff0 Issue #22775: Fixed unpickling of http.cookies.SimpleCookie with protocol 2
and above.  Patch by Tim Graham.
2014-11-02 22:18:25 +02:00
Benjamin Peterson 4d856895bd test is cpython only 2014-10-15 13:39:46 -04:00
Benjamin Peterson e1bd38c03c fix integer overflow in unicode case operations (closes #22643) 2014-10-15 11:47:36 -04:00
Georg Brandl 18e897250a Bump to 3.3.6 2014-10-12 09:03:40 +02:00
Georg Brandl 439d88542e Bump to 3.2.6 2014-10-12 08:50:38 +02:00
Georg Brandl b3ac84322f #16040: fix unlimited read from connection in nntplib. 2014-10-12 08:50:11 +02:00
Georg Brandl e800a0e1c2 Bump to 3.2.6rc1 2014-10-04 14:15:42 +02:00
Georg Brandl 76e73f85a3 Bump to 3.3.6rc1 2014-10-04 14:22:11 +02:00
Georg Brandl 4480d30b8b ref #19855: skip uuid test_find_mac on non-Posix as in later branches 2014-10-01 22:31:04 +02:00
Georg Brandl 51c116223e Issue #19855: uuid.getnode() on Unix now looks on the PATH for the
executables used to find the mac address, with /sbin and /usr/sbin as
fallbacks.

Issue #11508: Fixed uuid.getnode() and uuid.uuid1() on environment with
virtual interface.  Original patch by Kent Frazier.

Issue #18784: The uuid module no more attempts to load libc via ctypes.CDLL,
if all necessary functions are already found in libuuid.
Patch by Evgeny Sologubov.

Issue #16102: Make uuid._netbios_getnode() work again on Python 3.
2014-09-30 19:34:19 +02:00
Georg Brandl 3bc35672a2 Backport b533cc11d114 to fix intermittent test_urllibnet failures. 2014-09-30 17:30:18 +02:00
Georg Brandl 786c8e7dd5 Fix-up for 0f362676460d: add missing size argument to SSLFakeFile.readline(), as in 2.6 backport 8a6def3add5b 2014-09-30 16:31:21 +02:00
Benjamin Peterson bbd0a323ae clear BufferedRWPair weakrefs on deallocation (closes #22517) 2014-09-29 22:46:57 -04:00
Senthil Kumaran 8b7e161ac3 backport context argument of urlopen (#22366) for pep 476 2014-09-19 15:23:30 +08:00
Antoine Pitrou cc23154d02 Issue #22335: Fix crash when trying to enlarge a bytearray to 0x7fffffff bytes on a 32-bit platform. 2014-11-02 18:40:09 +01:00
Ezio Melotti 8b23f5cc7a #22751: fix test___all__ warning about modified environment in the tests. Patch by Michael Cetrulo. 2014-11-02 19:08:35 +02:00
Zachary Ware 4b2b1de0bd Issue #17896: Move Windows external lib sources from .. to externals. 2014-11-01 22:39:21 -05:00
Ned Deily 91f01e175a Issue #22770: Prevent some Tk segfaults on OS X when running gui tests.
When running tests in subprocesses with the regrtest -j option, a bug
in Cocoa Tk can result in a Tcl segfault.  Avoid the problem by forcing
Tk to fully initialize as an OS X gui process before destroying the
Tcl instance and creating another. (Original patch by Serhiy Storchaka)
2014-11-01 19:29:22 -07:00
Vinay Sajip c33a0cc61e Brought excluded code into the scope of a try block in SysLogHandler.emit(). 2014-11-01 19:58:47 +00:00
Berker Peksag 8083cd6c3b Issue #22665: Add missing get_terminal_size and SameFileError to shutil.__all__. 2014-11-01 11:04:06 +02:00
Serhiy Storchaka b1847e7541 Issue #17381: Fixed handling of case-insensitive ranges in regular expressions. 2014-10-31 12:37:50 +02:00
Serhiy Storchaka cf7b1cadd1 Fixed compile error in issue #22410. The _locale module is optional. 2014-10-31 01:34:45 +02:00
Serhiy Storchaka d9b8dc272a Merge heads 2014-10-31 00:57:57 +02:00
Serhiy Storchaka 4659cc0756 Issue #22410: Module level functions in the re module now cache compiled
locale-dependent regular expressions taking into account the locale.
2014-10-31 00:53:49 +02:00
Antoine Pitrou 2b2852b1b4 Issue #22759: Query methods on pathlib.Path() (exists(), is_dir(), etc.) now return False when the underlying stat call raises NotADirectoryError. 2014-10-30 23:14:03 +01:00
Antoine Pitrou ed14c86fac Issue #8876: distutils now falls back to copying files when hard linking doesn't work.
This allows use with special filesystems such as VirtualBox shared folders.
2014-10-30 19:37:07 +01:00
Zachary Ware 2acbae8016 Issue #22173: Update lib2to3 tests to use unittest test discovery. 2014-10-29 12:24:59 -05:00
Berker Peksag 8b63d3af9f Issue #22596: support.transient_internet() now also catches
ConnectionRefusedError exceptions wrapped by urllib.error.URLError.

This change should fix sporadic failures in test_urllib2net.
2014-10-25 05:42:30 +03:00
Terry Jan Reedy a9421fb3a3 Issue #3068: Add Idle extension configuration dialog to Options menu.
Original patch by Tal Einat.
2014-10-22 20:15:18 -04:00
Georg Brandl 2514f52f4f Closes #22675: fix typo. 2014-10-20 08:36:02 +02:00
Berker Peksag f23530f569 Issue #22186: Fix typos in Lib/.
Patch by Févry Thibault.
2014-10-19 18:04:38 +03:00
Ethan Furman 8e120ac05c Issue20689: add missing API pieces to __all__ 2014-10-18 15:10:49 -07:00
Terry Jan Reedy dd09efdd53 Issue #20155: Fix non-buildbot test failure on Windows. Patch by Claudiu Popa,
revised by R. David Murray.
2014-10-18 17:10:09 -04:00
R David Murray 838f2c437d #18853: Fix resource warning in shlex's __main__ section.
Report and original fix by Vajrasky Kok.
2014-10-17 20:28:47 -04:00
R David Murray 7570cbdc6b #9351: set_defaults on subparser is no longer ignored if set on parent.
Before, if a default was set on the parent parser, any default for that
variable set via set_defaults on a subparser would be ignored.  Now
the subparser set_defaults is honored.

Patch by Jyrki Pullianinen.
2014-10-17 19:55:11 -04:00
R David Murray 685b3495e1 #21991: make headerregistry params property MappingProxyType.
It is unlikely anyone is using the fact that the dictionary returned
by the 'params' attribute was previously writable, but even if someone
is the API is provisional so this kind of change is acceptable (and
needed, to get the API "right" before it becomes official).

Patch by Stéphane Wirtel.
2014-10-17 19:30:13 -04:00
Antoine Pitrou d696732025 Issue #22653: Fix an assertion failure in debug mode when doing a reentrant dict insertion in debug mode. 2014-10-18 00:35:00 +02:00
Zachary Ware be16d68071 Fix test_ctypes failure on OpenIndiana buildbot where _ctypes is not built 2014-10-17 14:24:14 -05:00
Zachary Ware baf45c590c Issue #16000: Convert test_curses to use unittest 2014-10-17 13:59:18 -05:00
Vinay Sajip 16c41ab460 Issue #22646: Accept list as well as tuple to support initialisation via dictConfig(). 2014-10-17 08:49:38 +01:00