Commit Graph

89154 Commits

Author SHA1 Message Date
Donald Stufft 9bcbdb40da Merged update of pip to 6.1.0 and setuptools to 15.0 2015-04-07 01:30:33 -04:00
Victor Stinner 146907081c Issue #23853: Methods of SSL socket don't reset the socket timeout anymore each
time bytes are received or sent. The socket timeout is now the maximum total
duration of the method.

This change fixes a denial of service if the application is regulary
interrupted by a signal and the signal handler does not raise an exception.
2015-04-06 22:46:13 +02:00
Victor Stinner 222dfc7d94 Issue #22117: Fix sock_call_ex() for non-blocking socket
Call internal_select() with a timeout of 0 second, not a timeout of -1 second
(blocking)!
2015-04-06 22:30:41 +02:00
Victor Stinner 8912d1418e Issue #23853: socket.socket.sendall() does no more reset the socket timeout
each time data is sent successfuly. The socket timeout is now the maximum total
duration to send all data.
2015-04-06 23:16:34 +02:00
Victor Stinner 9001d8089c Issue #23834: Fix initial value of the socket timeout
Use _PyTime_FromSeconds() to initialize the default socket timeout to -1
second, instead of -1 nanosecond which causes rounding issues in
internal_select().
2015-04-06 23:06:01 +02:00
Serhiy Storchaka 62aa7dc7c9 Issue #22721: An order of multiline pprint output of set or dict containing
orderable and non-orderable elements no longer depends on iteration order of
set or dict.
2015-04-06 22:52:44 +03:00
Serhiy Storchaka 01362da7d0 Issue #22977: Remove unconditional import of ctypes. 2015-04-06 20:37:34 +03:00
Benjamin Peterson 7d71c97ec3 merge 3.4 (#23875) 2015-04-06 13:06:21 -04:00
Benjamin Peterson 55c14355ac fix building without threads (closes #23877) 2015-04-06 09:59:23 -04:00
Tim Golden 3fbcafa476 Merge doc change from 3.4 2015-04-06 11:06:18 +01:00
R David Murray cae7bdb424 #3566: Clean up handling of remote server disconnects.
This changeset does two things: introduces a new RemoteDisconnected exception
(that subclasses ConnectionResetError and BadStatusLine) so that a remote
server disconnection can be detected by client code (and provides a better
error message for debugging purposes), and ensures that the client socket is
closed if a ConnectionError happens, so that the automatic re-connection code
can work if the application handles the error and continues on.

Tests are added that confirm that a connection is re-used or not re-used
as appropriate to the various combinations of protocol version and headers.

Patch by Martin Panter, reviewed by Demian Brecht.  (Tweaked only slightly by
me.)
2015-04-05 19:26:29 -04:00
Benjamin Peterson 142bf565b4 merge 3.4 (#23872) 2015-04-05 10:03:23 -04:00
Serhiy Storchaka fcfcf853cf Updated pprint examples in according to issue #19105. 2015-04-05 08:22:41 +03:00
Serhiy Storchaka a4c6badfdd Issue #23501: #include "clinic/posixmodule.c.h" was in the section skipped on Windows. 2015-04-04 23:35:52 +03:00
Benjamin Peterson 1a6292194b fix refleak in deque_concat 2015-04-04 10:52:36 -04:00
Serhiy Storchaka de1c27feaa Issue #23466: Fixed expected error message in test_format. 2015-04-04 17:29:28 +03:00
Serhiy Storchaka 04e6dba7dc Fixed the array module broken in issue #23492.
array_array_frombytes() is used in other functions, but it's signature was
changed. Closes issue #23866.
2015-04-04 17:06:55 +03:00
Serhiy Storchaka b599ca8cff Fixed test_enum for issue #15582. 2015-04-04 12:48:04 +03:00
Serhiy Storchaka 06e66108c6 Issue #15133: _tkinter.tkapp.getboolean() now supports Tcl_Obj and always
returns bool.  tkinter.BooleanVar now validates input values (accepted bool,
int, str, and Tcl_Obj).  tkinter.BooleanVar.get() now always returns bool.
2015-04-04 12:44:30 +03:00
Serhiy Storchaka 46ba6c8563 Issue #22831: Use "with" to avoid possible fd leaks. 2015-04-04 11:01:02 +03:00
Serhiy Storchaka ae2d667ae8 Open files in binary mode to avoid newlines transformation. 2015-04-04 10:36:50 +03:00
Serhiy Storchaka 778db289b5 Issue #10590: xml.sax.parseString() now supports string argument. 2015-04-04 10:12:26 +03:00
Serhiy Storchaka f8aa133cce Issue #23338: Fixed formatting ctypes error messages on Cygwin.
Patch by Makoto Kato.
2015-04-04 10:06:58 +03:00
Serhiy Storchaka a110eb4331 Issue #23825: Fixed test_idle under -OO. 2015-04-04 09:48:17 +03:00
Serhiy Storchaka 51ff2ffb0d Moved Misc/NEWS entries not included in 3.5.0 alpha 3 to correct section. 2015-04-04 09:38:17 +03:00
Serhiy Storchaka 92e8af67a8 Issue #23492: Argument Clinic now generates argument parsing code with
PyArg_Parse instead of PyArg_ParseTuple if possible.
2015-04-04 00:12:11 +03:00
Serhiy Storchaka 1009bf18b3 Issue #23501: Argumen Clinic now generates code into separate files by default. 2015-04-03 23:53:51 +03:00
Larry Hastings 0759f84d62 Issue #23500: Argument Clinic is now smarter about generating the "#ifndef"
(empty) definition of the methoddef macro: it's only generated once, even
if Argument Clinic processes the same symbol multiple times, and it's emitted
at the end of all processing rather than immediately after the first use.
2015-04-03 13:09:02 -07:00
Serhiy Storchaka 5cf2b7253d Issue #15582: inspect.getdoc() now follows inheritance chains. 2015-04-03 22:38:53 +03:00
Serhiy Storchaka 41525e31a5 Issue #23466: Raised OverflowError if %c argument is out of range. 2015-04-03 20:53:46 +03:00
Serhiy Storchaka 45ec3288d0 Removed trailing whitespaces in miscalenous files. 2015-04-03 19:42:32 +03:00
Serhiy Storchaka 50ef0f41af Escaped backslashes in docstrings. 2015-04-03 18:13:23 +03:00
Victor Stinner 32ed750952 Merge 3.4 (asyncio doc) 2015-04-03 17:10:17 +02:00
Serhiy Storchaka a8cd4d482f Got rid of warnings "suggest braces around empty body in an ‘else’ statement"
in Parser/pgen.c.
2015-04-03 15:24:33 +03:00
Serhiy Storchaka 4deb950e2b Issue #22351. MockSslTests tests in test_nntplib now are reported if skipped. 2015-04-03 15:02:40 +03:00
Victor Stinner 4e3cfa46dc Issue #23853: Cleanup _ssl.c
* Rename check_socket_and_wait_for_timeout() to PySSL_select()
* PySSL_select() is now clearly splitted betwen poll() and select()
* Add empty lines for readability
2015-04-02 21:28:28 +02:00
Victor Stinner 10550cdb8a Issue #23834: Simplify timeout handling
* Use the new _PyTime_FromSeconds() function to set the timeout to -1 second
  for socket.settimeout(None). It avoids a special case in internal_select()
  because of a rounding issue: -1 nanosecond is rounded to 0 millisecond which
  means non-blocking, instead of blocking.
* Check if the interval the negative in sock_call_ex() instead of doing the
  check in internal_select(). sock_call_ex() remembers if the socket has a
  timeout or not, which avoids a race condition if the timeout is modified in a
  different thread.
2015-04-03 13:22:27 +02:00
Victor Stinner 13019fdef3 Issue #22117: Add a new _PyTime_FromSeconds() function
Fix also _Py_InitializeEx_Private(): initialize time before initializing
import, import_init() uses the _PyTime API (for thread locks).
2015-04-03 13:10:54 +02:00
Victor Stinner 21dfffa218 Merge 3.4 (test_nntplib) 2015-04-03 11:09:08 +02:00
Serhiy Storchaka f1468eb44c Issue #10590: Added tests for xml.sax.parse() and xml.sax.parseString(). 2015-04-02 23:07:19 +03:00
Serhiy Storchaka 61de087f0f Issue #2175: SAX parsers now support a character stream of InputSource object. 2015-04-02 21:00:13 +03:00
Serhiy Storchaka 278ba2690c Issue #2175: Added tests for xml.sax.saxutils.prepare_input_source().
Made test XML files non-ASCII.
2015-04-02 20:57:20 +03:00
Serhiy Storchaka b162914158 Issue #16840: Fixed test_tcl for Tcl < 8.5. 2015-04-02 20:07:24 +03:00
Serhiy Storchaka 9fe562b499 Issue #21526: Skip test_booleans on Tcl < 8.5. 2015-04-02 19:59:34 +03:00
Serhiy Storchaka 4c7dc48ea5 Issue #16840: Tkinter now supports 64-bit integers added in Tcl 8.4 and
arbitrary precision integers added in Tcl 8.5.
2015-04-02 18:49:14 +03:00
Victor Stinner ea534f79a5 (Merge 3.4) Issue #23834: Fix socket.sendto(), use the C Py_ssize_t type to
store the result of sendto() instead of the C int type.

(The bug was already fixed in the default branch, but differently.)
2015-04-02 17:20:48 +02:00
Victor Stinner 33f96f1800 Merge 3.4 (_posixsubprocess) 2015-04-02 16:25:01 +02:00
Victor Stinner a135cb8143 Issue #23618: Ooops, remove abort() added for debug purpose 2015-04-02 15:17:12 +02:00
Victor Stinner 38aec7525e Issue #23618: Fix sock_connect_impl(), set the socket error code
sock_call_ex() gets the socket error code when the socket function fails.
sock_connect_impl() didn't set the error correctly.
2015-04-02 14:37:20 +02:00
Victor Stinner 39c0721d7b Merge 3.4 (test_exceptions) 2015-04-02 14:22:44 +02:00