Commit graph

36285 commits

Author SHA1 Message Date
Victor Stinner
e54dd0b92b Merge 3.4 (asyncio) 2015-01-14 02:13:51 +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
9f5b6907ab Merge 3.4 (asyncio) 2015-01-14 00:54:00 +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
81a04f7ad4 Merge 3.4 (asyncio: new SSL implementation) 2015-01-14 00:19:55 +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
7d5a95627b Merge 3.4 (asyncio) 2015-01-13 16:13:36 +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
610bc6a211 merge 3.4 (#23221) 2015-01-13 09:20:31 -05: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
458fc6f98c Issue #23209, #23225: selectors.BaseSelector.get_key() now raises a
RuntimeError if the selector is closed. And 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 10:00:55 +01: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
Antoine Pitrou
17cba7daf5 Issue #19777: Provide a home() classmethod on Path objects.
Contributed by Victor Salgado and Mayank Tripathi.
2015-01-12 21:03:41 +01:00
Donald Stufft
2b4ec1ce8a Merged 3.4 into default 2015-01-11 15:53:02 -05:00
Donald Stufft
d9fe22ce9b Update setuptools to 11.3.1 2015-01-11 15:51:11 -05:00
Benjamin Peterson
c114e7db60 remove extra definite article 2015-01-11 15:22:07 -05:00
Antoine Pitrou
dc3eaa80d4 Issue #23206: Make `json.dumps(..., ensure_ascii=False) as fast as the default case of ensure_ascii=True`. Patch by Naoki Inada. 2015-01-11 16:41:01 +01:00
Mark Dickinson
a5d0c7c2fd Issue #23185: add math.inf and math.nan constants. 2015-01-11 11:55:29 +00:00
Serhiy Storchaka
845b14cc8e Removed duplicated dict entries. 2015-01-11 12:48:17 +02:00
Victor Stinner
e969439862 Issue #19776: Fix test_pathlib.test_expanduser()
Skip users with an empty home directory.
2015-01-10 09:00:20 +01:00
Victor Stinner
c50a9c1617 (Merge 3.4) Issue #23209: Revert change on selectors, test_selectors failed. 2015-01-09 21:57:19 +01:00
Victor Stinner
686fe6e156 Issue #23209: Revert change on selectors, test_selectors failed. 2015-01-09 21:56:28 +01:00
Victor Stinner
6a825a8314 Merge 3.4 (asyncio, selectors) 2015-01-09 21:35:03 +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
3cd440df22 Merge 3.4 (asyncio) 2015-01-09 21:32:24 +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
Brett Cannon
02d8454002 Issue #23014: Make importlib.abc.Loader.create_module() required when
importlib.abc.Loader.exec_module() is also defined.

Before this change, create_module() was optional **and** could return
None to trigger default semantics. This change now reduces the
options for choosing default semantics to one and in the most
backporting-friendly way (define create_module() to return None).
2015-01-09 11:39:21 -05:00
Victor Stinner
b551fac136 Merge 3.4 (asyncio) 2015-01-09 01:43:04 +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
53a6d74fbf selectors: truncate to 80 characters 2015-01-09 00:13:39 +01:00
Victor Stinner
12985b5da7 Merge 3.4 (asyncio) 2015-01-09 00:09:35 +01:00
Victor Stinner
15cc678d89 asyncio: Truncate to 80 columns 2015-01-09 00:09:10 +01:00
Victor Stinner
540373310e Merge 3.4 (asyncio) 2015-01-08 12:07:00 +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
ef50fdf138 Merge with 3.4 2015-01-07 23:49:06 -05:00
Terry Jan Reedy
84d64a9c02 Issue #23184: delete unused idlelib file. 2015-01-07 23:48:46 -05:00
Benjamin Peterson
15042921ad enable cert validation in test 2015-01-07 22:12:43 -06:00
Benjamin Peterson
23ef9fac16 trying again 2015-01-07 21:21:34 -06:00
Benjamin Peterson
e6838e08ef reorder cipher prefs 2015-01-07 20:52:40 -06:00
Benjamin Peterson
44c77791ab drop 256 2015-01-07 20:30:59 -06:00
Benjamin Peterson
359f2982f4 try using AES256 2015-01-07 20:03:27 -06:00
Benjamin Peterson
8791d697e0 fix assertions after ciphers were changed 2015-01-07 14:29:45 -06:00
Benjamin Peterson
f78b78aed4 rc4 is a long time favorite 2015-01-07 14:21:22 -06:00
Benjamin Peterson
438a8db763 everyone should support AES ciphers 2015-01-07 13:28:40 -06:00
Benjamin Peterson
9f6eceab46 include some more ciphers 2015-01-07 12:59:20 -06:00
Benjamin Peterson
aacd524118 force test server to speak tlsv1 2015-01-07 11:42:38 -06:00
Benjamin Peterson
e27a421354 remove apparently wrong assertion about des bit size 2015-01-07 11:33:51 -06:00
Benjamin Peterson
5318c7aa59 explain None can be returned 2015-01-07 11:26:50 -06:00
Benjamin Peterson
4cb17812d9 expose the client's cipher suites from the handshake (closes #23186) 2015-01-07 11:14:26 -06:00