Commit graph

8449 commits

Author SHA1 Message Date
Serhiy Storchaka
47efb4a5dc Issue #19361: JSON decoder now raises JSONDecodeError instead of ValueError. 2015-01-26 13:16:30 +02:00
Steve Dower
7d0e0c9f7b Closes #23253: Delay-load ShellExecute 2015-01-24 08:18:24 -08:00
Benjamin Peterson
8861502e07 prefer server alpn ordering over the client's 2015-01-23 17:30:26 -05:00
Benjamin Peterson
cca2732a82 add support for ALPN (closes #20188) 2015-01-23 16:35:37 -05:00
Victor Stinner
5da0549154 Merge 3.4 (asyncio) 2015-01-22 23:50:34 +01: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
Victor Stinner
58c85144db Merge 3.4 (asyncio) 2015-01-22 22:55:31 +01: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
91d11bbb2d Merge 3.4 (asyncio) 2015-01-21 23:40:19 +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
Zachary Ware
b4826c3fd1 Merge with 3.4 (closes #23280) 2015-01-20 14:11:38 -06:00
Zachary Ware
b176d40398 Issue #23280: Fix docstrings for binascii.(un)hexlify 2015-01-20 13:59:46 -06:00
Antoine Pitrou
3b225d8bfb Issue #23248: Update ssl error codes from latest OpenSSL git master. 2015-01-18 17:40:17 +01:00
Antoine Pitrou
173ad83b07 Issue #23248: Update ssl error codes from latest OpenSSL git master. 2015-01-18 17:39:32 +01:00
Serhiy Storchaka
82e07b92b3 Issue #23181: More "codepoint" -> "code point". 2015-01-18 11:33:31 +02:00
Serhiy Storchaka
d3faf43f9b Issue #23181: More "codepoint" -> "code point". 2015-01-18 11:28:37 +02:00
Serhiy Storchaka
acdb7c158a Issue #23098: 64-bit dev_t is now supported in the os module. 2015-01-18 11:17:39 +02:00
Serhiy Storchaka
b2653b344e Issue #23098: 64-bit dev_t is now supported in the os module. 2015-01-18 11:12:11 +02:00
Antoine Pitrou
26795baaa8 Issue #15955: Add an option to limit output size when decompressing LZMA data.
Patch by Nikolaus Rath and Martin Panter.
2015-01-17 16:22:18 +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
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
cc8617b93a Issue #21092: Merge from 3.4. 2015-01-11 13:22:44 +00:00
Mark Dickinson
dfe0b2326b Issue #21902: Replace incorrect 'hyperbolic arc sine' (etc.) with 'inverse hyperbolic sine' (etc.). Remove meaningless reference to radians. 2015-01-11 13:08:05 +00:00
Mark Dickinson
a5d0c7c2fd Issue #23185: add math.inf and math.nan constants. 2015-01-11 11:55:29 +00:00
Benjamin Peterson
baf7c1e546 use SSL_get_session 2015-01-07 11:32:00 -06:00
Benjamin Peterson
4cb17812d9 expose the client's cipher suites from the handshake (closes #23186) 2015-01-07 11:14:26 -06:00
Nick Coghlan
582acb75e9 Merge issue 19548 changes from 3.4 2015-01-07 00:37:01 +10: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
Antoine Pitrou
bc26646505 Issue #23143: Remove compatibility with OpenSSLs older than 0.9.8.
(now the hashlib module)
2015-01-03 23:21:21 +01:00
Antoine Pitrou
5e8430d02c Issue #23143: Remove compatibility with OpenSSLs older than 0.9.8.
(the last 0.9.7 release was in 2007)
2015-01-03 23:17:23 +01:00
Benjamin Peterson
98beb7599e merge 3.4 (#23093) 2014-12-21 21:00:51 -06: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
Steve Dower
2a8ef68028 Issue #22733: MSVC ffi_prep_args doesn't handle 64-bit arguments properly 2014-12-17 06:31:44 -08:00
Serhiy Storchaka
707b5ccde5 Issue #22783: Pickling now uses the NEWOBJ opcode instead of the NEWOBJ_EX
opcode if possible.
2014-12-16 19:43:46 +02:00
Serhiy Storchaka
01bdd9a980 Issue #15513: Added a __sizeof__ implementation for pickle classes. 2014-12-16 19:40:58 +02:00
Serhiy Storchaka
5bbd231f27 Issue #15513: Added a __sizeof__ implementation for pickle classes. 2014-12-16 19:39:08 +02: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
Serhiy Storchaka
b757c83ec6 Issue #22581: Use more "bytes-like object" throughout the docs and comments. 2014-12-05 22:25:22 +02:00
Serhiy Storchaka
56a6d855e2 Removed duplicated words in in comments and docs. 2014-12-01 18:28:43 +02: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
Steve Dower
65e4cb10d9 Issue #22919: Windows build updated to support VC 14.0 (Visual Studio 2015), which will be used for the official 3.5 release. 2014-11-22 12:54:57 -08:00
Benjamin Peterson
22293df016 merge 3.4 (#22935) 2014-12-05 22:11:33 -05:00
Victor Stinner
cbc18f328c Issue #9647: os.confstr() ensures that the second call to confstr() returns the
same length.
2014-12-05 22:51:51 +01:00
Serhiy Storchaka
92bf919ed0 Issue #22581: Use more "bytes-like object" throughout the docs and comments. 2014-12-05 22:26:10 +02:00
Serhiy Storchaka
4954f9fcab Issue #17401: Output the closefd attribute as boolean. 2014-12-02 23:39:56 +02:00
Antoine Pitrou
6cd5eda0dd Fix uninitialized variable after #22676. 2014-12-02 00:20:03 +01:00
Serhiy Storchaka
83000a490a Removed duplicated words in in comments and docs. 2014-12-01 18:30:14 +02:00
Victor Stinner
beeb512fe1 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.
2014-11-28 13:28:25 +01:00