Commit Graph

15076 Commits

Author SHA1 Message Date
Christian Heimes 418fd74f87 Issue #23998: PyImport_ReInitLock() now checks for lock allocation error 2015-04-19 21:08:42 +02:00
R David Murray 11c5aba6c9 News item for #16914. 2015-04-16 17:16:15 -04:00
R David Murray 4c7f995e80 #7159: generalize urllib prior auth support.
This fix is a superset of the functionality introduced by the issue #19494
enhancement, and supersedes that fix.  Instead of a new handler, we have a new
password manager that tracks whether we should send the auth for a given uri.
This allows us to say "always send", satisfying #19494, or track that we've
succeeded in auth and send the creds right away on every *subsequent* request.
The support for using the password manager is added to AbstractBasicAuth,
which means the proxy handler also now can handle prior auth if passed
the new password manager.

Patch by Akshit Khurana, docs mostly by me.
2015-04-16 16:36:18 -04:00
R David Murray 2b78129b3a #18128: use standard +NNNN timezone format in POT-Creation-Date header.
Patch by Michael McFadden, with a few small style tweaks.
2015-04-16 12:15:09 -04:00
Larry Hastings 7f90cba7f3 Issue #23935: Argument Clinic's understanding of format units
accepting bytes, bytearrays, and buffers is now consistent with
both the documentation and the implementation.
2015-04-15 23:02:12 -04:00
Ned Deily 3b8124884c Issues #22980, 23969: For OS X, use PEP 3149-style file names for extension
module binaries, with a platform triple of just "darwin", resulting in
file names like:

    _ssl.cpython-35m-darwin.so

rather than just _ssl.so as previously.

Instead of attempting to encode differences in CPU architecture and OS X
deployment targets in the file name as is done on other platforms,
these continue to be managed by the use of Apple multi-architecture
("fat") files, by the system dynamic loader, and by logic in higher-levels
like sysconfig.get_platform() and pip.
2015-04-15 17:11:47 -07:00
Berker Peksag 20416f7994 Issue #23703: Fix a regression in urljoin() introduced in 901e4e52b20a.
Patch by Demian Brecht.
2015-04-16 02:31:14 +03:00
Steve Dower d2bc389e55 Issue #4254: Adds _curses.update_lines_cols() Patch by Arnon Yaari 2015-04-15 18:06:05 -04:00
Steve Dower cb39d1f466 Issue 19933: Provide default argument for ndigits in round. Patch by Vajrasky Kok. 2015-04-15 16:10:59 -04:00
doko@ubuntu.com d3899c1a96 - Issue #22980: Under Linux, GNU/KFreeBSD and the Hurd, C extensions now include
the architecture triplet in the extension name, to make it easy to test builds
  for different ABIs in the same working tree.
2015-04-15 20:23:14 +02:00
Eric V. Smith 7a80389ce5 Issue 23193: Add numeric_owner to tarfile.TarFile.extract() and tarfile.TarFile.extractall(). 2015-04-15 10:27:58 -04:00
Benjamin Peterson 28edf12cd4 add Allison Kaptur (#21217) 2015-04-15 00:00:41 -04:00
Gregory P. Smith 6e73000723 Add a subprocess.run() function than returns a CalledProcess instance for a
more consistent API than the existing call* functions.
(enhancement from issue 23342)
2015-04-14 16:14:25 -07:00
Antoine Pitrou a8723a02ea Issue #21217: inspect.getsourcelines() now tries to compute the start and
end lines from the code object, fixing an issue when a lambda function is
used as decorator argument.  Patch by Thomas Ballinger.
2015-04-15 00:41:29 +02:00
Larry Hastings 89964c48d1 Issue #23944: Argument Clinic now wraps long impl prototypes at column 78. 2015-04-14 18:07:59 -04:00
Berker Peksag 012e287081 Issue #23811: Add missing newline to the PyCompileError error message.
Patch by Alex Shkop.
2015-04-14 18:58:45 +03:00
Berker Peksag 34c9be7ebd Issue #23811: Add missing newline to the PyCompileError error message.
Patch by Alex Shkop.
2015-04-14 18:57:55 +03:00
Andrew Kuchling 19ddaf6d40 Merge from 3.4 2015-04-14 10:35:43 -04:00
Andrew Kuchling b3c30d9114 Reword NEWS item a bit 2015-04-14 10:18:46 -04:00
Berker Peksag dfa4e045a3 Issue #23943: Fix typos. Patch by Piotr Kasprzyk. 2015-04-14 09:35:51 +03:00
Berker Peksag 4882cacab6 Issue #23943: Fix typos. Patch by Piotr Kasprzyk. 2015-04-14 09:30:01 +03:00
Łukasz Langa a468db9b0b Issue #23310: Fix MagicMock's initializer to work with __methods__.
Behavior equivalent to m.configure_mock().  Patch by Kasia Jachim.
2015-04-13 23:12:42 -07:00
Zachary Ware 8ef887ce47 Issue #20586: Argument Clinic now ensures signatures on functions without docstrings. 2015-04-13 18:22:35 -05:00
Larry Hastings a6cc551502 Issue #22631: Added Linux-specific socket constant CAN_RAW_FD_FRAMES.
Patch courtesy of Joe Jevnik.
2015-04-13 17:48:40 -04:00
Antoine Pitrou d5aec7ba48 Issue #21116: Avoid blowing memory when allocating a multiprocessing shared
array that's larger than 50% of the available RAM.

Patch by Médéric Boquien.
2015-04-13 20:53:43 +02:00
Brett Cannon f299abdafa Issue #23731: Implement PEP 488.
The concept of .pyo files no longer exists. Now .pyc files have an
optional `opt-` tag which specifies if any extra optimizations beyond
the peepholer were applied.
2015-04-13 14:21:02 -04:00
Antoine Pitrou a63cc21234 Issue #23726: Don't enable GC for user subclasses of non-GC types that don't add any new fields.
Patch by Eugene Toder.
2015-04-13 20:10:06 +02:00
Antoine Pitrou 56452eea39 Issue #22982: Improve BOM handling when seeking to multiple positions of a writable text file. 2015-04-13 20:02:33 +02:00
Antoine Pitrou 85e3ee749c Issue #22982: Improve BOM handling when seeking to multiple positions of a writable text file. 2015-04-13 20:01:21 +02:00
Antoine Pitrou cb46f0ecb0 Issue #23309: Avoid a deadlock at shutdown if a daemon thread is aborted
while it is holding a lock to a buffered I/O object, and the main thread
tries to use the same I/O object (typically stdout or stderr).  A fatal
error is emitted instead.
2015-04-13 19:48:19 +02:00
Antoine Pitrou 25f85d4bd5 Issue #23309: Avoid a deadlock at shutdown if a daemon thread is aborted
while it is holding a lock to a buffered I/O object, and the main thread
tries to use the same I/O object (typically stdout or stderr).  A fatal
error is emitted instead.
2015-04-13 19:41:47 +02:00
Andrew Kuchling 8b963c5853 #17898: reset k and v so that the loop doesn't use an old value 2015-04-13 10:38:56 -04:00
Łukasz Langa 5f6684efe0 Issue #23310: Fix MagicMock's initializer to work with __methods__.
Behavior equivalent to m.configure_mock().  Patch by Kasia Jachim.
2015-04-14 00:12:57 -07:00
Zachary Ware 1c8c32774e Fix warning from Sphinx. 2015-04-12 23:24:17 -05:00
R David Murray e81a773352 #23464: remove JoinableQueue that was deprecated in 3.4.4.
Patch by A. Jesse Jiryu Davis.
2015-04-12 18:47:56 -04:00
Serhiy Storchaka 7e7a3dba5f Issue #23865: close() methods in multiple modules now are idempotent and more
robust at shutdown. If needs to release multiple resources, they are released
even if errors are occured.
2015-04-10 13:24:41 +03:00
Steve Dower fe0a41aae4 Issue #23668: Adds support for os.truncate and os.ftruncate on Windows 2015-03-20 19:50:46 -07:00
Antoine Pitrou 2dbc6e6bce Issue #23529: Limit the size of decompressed data when reading from
GzipFile, BZ2File or LZMAFile.  This defeats denial of service attacks
using compressed bombs (i.e. compressed payloads which decompress to a huge
size).

Patch by Martin Panter and Nikolaus Rath.
2015-04-11 00:31:01 +02:00
Serhiy Storchaka 71fd224af0 Issue #21859: Added Python implementation of io.FileIO. 2015-04-10 16:16:16 +03:00
Serhiy Storchaka 2116b12da5 Issue #23865: close() methods in multiple modules now are idempotent and more
robust at shutdown. If needs to release multiple resources, they are released
even if errors are occured.
2015-04-10 13:29:28 +03:00
Victor Stinner 7cc28b6238 Issue #23817: FreeBSD now uses "1.0" the the SOVERSION as other operating
systems, instead of just "1".
2015-04-09 22:29:52 +02:00
Berker Peksag 291d7b0284 Issue #23400: Raise same exception on both Python 2 and 3 if sem_open is not available.
Patch by Davin Potts.
2015-04-08 17:57:44 +03:00
Berker Peksag 7ecfc82edb Issue #23400: Raise same exception on both Python 2 and 3 if sem_open is not available.
Patch by Davin Potts.
2015-04-08 17:56:30 +03:00
Gregory P. Smith ace55865c5 Addresses Issue #10838: The subprocess now module includes
SubprocessError and TimeoutError in its list of exported names for the
users wild enough to use "from subprocess import *".

MAXFD, mswindows and list2cmdline should be dealt with (renamed or
moved) in separate commits.

Committed at 35,000ft.  Thanks chromebook free gogo wifi passes!
2015-04-07 15:57:54 -07:00
Serhiy Storchaka 1515450440 Issue #23411: Added DefragResult, ParseResult, SplitResult, DefragResultBytes,
ParseResultBytes, and SplitResultBytes to urllib.parse.__all__.
Patch by Martin Panter.
2015-04-07 19:09:01 +03:00
Victor Stinner a9dd680d23 (Merge 3.4) Issue #23881: urllib.request.ftpwrapper constructor now closes the
socket if the FTP connection failed to fix a ResourceWarning.
2015-04-07 12:50:24 +02:00
Victor Stinner ab73e65032 Issue #23881: urllib.request.ftpwrapper constructor now closes the socket if
the FTP connection failed to fix a ResourceWarning.
2015-04-07 12:49:27 +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
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 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 9a6e201f7d 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:43:01 +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 2e229e025c Issue #23338: Fixed formatting ctypes error messages on Cygwin.
Patch by Makoto Kato.
2015-04-04 10:05:48 +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 61de087f0f Issue #2175: SAX parsers now support a character stream of InputSource object. 2015-04-02 21:00:13 +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
Serhiy Storchaka ea134da929 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:46:50 +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 8e44aa5ae4 Issue #23834: Fix socket.sendto(), use the C Py_ssize_t type to store the
result of sendto() instead of the C int type.
2015-04-02 17:16:08 +02:00
Victor Stinner 81c41dbfcc Issue #23618: socket.socket.connect() now waits until the connection completes
instead of raising InterruptedError if the connection is interrupted by
signals, signal handlers don't raise an exception and the socket is blocking or
has a timeout.

socket.socket.connect() still raise InterruptedError for non-blocking sockets.
2015-04-02 11:50:57 +02:00
Serhiy Storchaka b452f41cc8 Issue #21526: Fixed support of new boolean type in Tcl 8.5. 2015-04-02 10:58:40 +03:00
Serhiy Storchaka f7de3dd02d Issue #21526: Tkinter now supports new boolean type in Tcl 8.5. 2015-04-02 10:35:57 +03:00
Serhiy Storchaka 1399a01b90 Issue #22977: Fixed formatting Windows error messages on Wine.
Patch by Martin Panter.
2015-04-02 09:50:06 +03:00
Serhiy Storchaka f41f8f9974 Issue #22977: Fixed formatting Windows error messages on Wine.
Patch by Martin Panter.
2015-04-02 09:47:27 +03:00
Victor Stinner c7489a5595 Issue #23836: Fix the faulthandler module to handle reentrant calls
to its signal handlers.

Use also _Py_write_noraise() instead of write() to retry write() if it is
interrupted by a signal (fail with EINTR).

faulthandler.dump_traceback() also calls PyErr_CheckSignals() to call the
Python signal handler if a signal was received.
2015-04-01 18:48:58 +02:00
Serhiy Storchaka 05ddbf0875 Issue #23838: linecache now clears the cache and returns an empty result on
MemoryError.
2015-04-01 16:56:13 +03:00
Serhiy Storchaka c512adc90d Issue #23838: linecache now clears the cache and returns an empty result on
MemoryError.
2015-04-01 16:54:05 +03:00
Serhiy Storchaka c05e260ecb Issue #23799: Added test.support.start_threads() for running and cleaning up
multiple threads.
2015-04-01 13:06:18 +03:00
Serhiy Storchaka 263dcd20a3 Issue #23799: Added test.support.start_threads() for running and cleaning up
multiple threads.
2015-04-01 13:01:14 +03:00
Raymond Hettinger 41290a68ba Issue 23793: Add deque support for __add__(), __mul__(), and __imul__(). 2015-03-31 08:12:23 -07:00
Serhiy Storchaka 3822093143 Issue #10395: Added os.path.commonpath(). Implemented in posixpath and ntpath.
Based on patch by Rafik Draoui.
2015-03-31 15:31:53 +03:00
Serhiy Storchaka 58e4134a1c Issue #23611: Serializing more "lookupable" objects (such as unbound methods
or nested classes) now are supported with pickle protocols < 4.
2015-03-31 14:07:24 +03:00
Serhiy Storchaka 72e731cc03 Issue #13583: sqlite3.Row now supports slice indexing.
Tests by Jessica McKellar.
2015-03-31 13:33:11 +03:00
Serhiy Storchaka d5d818d40b Issue #18473: Fixed 2to3 and 3to2 compatible pickle mappings.
Fixed ambigious reverse mappings.  Added many new mappings.  Import mapping
is no longer applied to modules already mapped with full name mapping.

Added tests for compatible pickling and unpickling and for consistency of
_compat_pickle mappings.
2015-03-31 13:17:10 +03:00
Serhiy Storchaka bfe1824d08 Issue #18473: Fixed 2to3 and 3to2 compatible pickle mappings.
Fixed ambigious reverse mappings.  Added many new mappings.  Import mapping
is no longer applied to modules already mapped with full name mapping.

Added tests for compatible pickling and unpickling and for consistency of
_compat_pickle mappings.
2015-03-31 13:12:37 +03:00
Victor Stinner f70e1ca0fc Issue #23485: select.select() is now retried automatically with the recomputed
timeout when interrupted by a signal, except if the signal handler raises an
exception. This change is part of the PEP 475.

The asyncore and selectors module doesn't catch the InterruptedError exception
anymore when calling select.select(), since this function should not raise
InterruptedError anymore.
2015-03-30 21:16:11 +02:00
Serhiy Storchaka 2c7b5a9d0d Issue #23466: %c, %o, %x, and %X in bytes formatting now raise TypeError on
non-integer input.
2015-03-30 09:19:08 +03:00
Serhiy Storchaka 7901b48a1f Issue #23171: csv.Writer.writerow() now supports arbitrary iterables. 2015-03-30 09:09:54 +03:00
R David Murray 7d0325d6c8 #23745: handle duplicate MIME parameter names in new parser.
This mimics get_param's error handling for the most part.  It is slightly
better in some regards as get_param can produce some really weird results for
duplicate *0* parts.  It departs from get_param slightly in that if we have a
mix of non-extended and extended pieces for the same parameter name, the new
parser assumes they were all supposed to be extended and concatenates all the
values, whereas get_param always picks the non-extended parameter value.  All
of this error recovery is pretty much arbitrary decisions...
2015-03-29 21:53:05 -04:00
R David Murray c4bb599be0 Merge: #23745: handle duplicate MIME parameter names in new parser. 2015-03-29 21:54:27 -04:00
Victor Stinner 520bddf79a Issue #23752: When built from an existing file descriptor, io.FileIO() now only
calls fstat() once. Before fstat() was called twice, which was not necessary.
2015-03-30 03:21:06 +02:00
Victor Stinner dca028b86a Issue #22117: Fix os.utime(), it now rounds the timestamp towards minus
infinity (-inf) instead of rounding towards zero.

Replace _PyTime_ROUND_DOWN with _PyTime_ROUND_FLOOR.
2015-03-30 01:02:57 +02:00
Serhiy Storchaka a3a100b594 Issue #22390: test.regrtest now emits a warning if temporary files or
directories are left after running a test.
2015-03-30 01:28:02 +03:00
Serhiy Storchaka 10915aa85c Issue #22390: test.regrtest now emits a warning if temporary files or
directories are left after running a test.
2015-03-30 01:30:22 +03:00
Serhiy Storchaka 07360df481 Issue #14260: The groupindex attribute of regular expression pattern object
now is non-modifiable mapping.
2015-03-30 01:01:48 +03:00
Benjamin Peterson 0deefd5a94 merge 3.4 (#23801) 2015-03-29 16:45:19 -04:00
Donald Stufft d90f8d10e0 Closes #23801 - Ignore entire preamble to multipart in cgi.FieldStorage 2015-03-29 16:43:23 -04:00
R David Murray f375b0a4d5 Merge: #23792: Ignore KeyboardInterrupt when the pydoc pager is active. 2015-03-29 15:19:13 -04:00
R David Murray 1058cda38f #23792: Ignore KeyboardInterrupt when the pydoc pager is active.
Previously, if you hit ctl-c while the pager was active, the python that
launched the subprocess for the pager would see the KeyboardInterrupt in the
__exit__ method of the subprocess context manager where it was waiting for the
subprocess to complete, ending the wait.  This would leave the pager running,
while the interactive interpreter, after handling the exception by printing
it, would go back to trying to post a prompt...but the pager would generally
have the terminal in raw mode, and in any case would be still trying to read
from stdin.  On some systems, even exiting python at that point would not
restore the terminal mode.  The problem with raw mode could also happen if
ctl-C was hit when pydoc was called from the shell command line and the pager
was active.

Instead, we now wait on the subprocess in a loop, ignoring KeyboardInterrupt
just like the pager does, until the pager actually exits.

(Note: this was a regression relative to python2...in python2 the pager
is called via system, and system does not return until the pager exits.)
2015-03-29 15:15:40 -04:00
Serhiy Storchaka 48070c1248 Issue #23803: Fixed str.partition() and str.rpartition() when a separator
is wider then partitioned string.
2015-03-29 19:21:02 +03:00
Serhiy Storchaka aa4c36fbbb Issue #23775: pprint() of OrderedDict now outputs the same representation
as repr().
2015-03-26 08:51:33 +02:00
Steve Dower e6bb7eb27b Issue #23765: Removed IsBadStringPtr calls in ctypes 2015-03-25 21:58:36 -07:00
Serhiy Storchaka 632a77e6a3 Issue #22364: Improved some re error messages using regex for hints. 2015-03-25 21:03:47 +02:00
Serhiy Storchaka b20f905f6d Issue #23742: ntpath.expandvars() no longer loses unbalanced single quotes. 2015-03-25 16:41:15 +02:00
Serhiy Storchaka 1b87ae0c91 Issue #23742: ntpath.expandvars() no longer loses unbalanced single quotes. 2015-03-25 16:40:15 +02:00
Serhiy Storchaka 764fc9bfac Issue #21717: The zipfile.ZipFile.open function now supports 'x' (exclusive
creation) mode.
2015-03-25 10:09:41 +02:00
Serhiy Storchaka 7665be6087 Issue #21802: The reader in BufferedRWPair now is closed even when closing
writer failed in BufferedRWPair.close().
2015-03-24 23:21:57 +02:00
Serhiy Storchaka 8ffe917cee Issue #23671: string.Template now allows to specify the "self" parameter as
keyword argument.  string.Formatter now allows to specify the "self" and
the "format_string" parameters as keyword arguments.
2015-03-24 22:28:43 +02:00
Serhiy Storchaka 6c86fe2d4b Issue #23583: Added tests for standard IO streams in IDLE. 2015-03-24 19:46:54 +02:00
Serhiy Storchaka d4c2ac8394 Issue #21560: An attempt to write a data of wrong type no longer cause
GzipFile corruption.  Original patch by Wolfgang Maier.
2015-03-23 15:25:43 +02:00
R David Murray 936da2a796 #23647: Increase imaplib's MAXLINE to accommodate modern mailbox sizes. 2015-03-22 16:17:46 -04:00
R David Murray beed8402ca #23539: Set Content-Length to 0 for PUT, POST, and PATCH if body is None.
Some http servers will reject PUT, POST, and PATCH requests if they
do not have a Content-Length header.

Patch by James Rutherford, with additional cleaning up of the
'request' documentation by me.
2015-03-22 15:18:23 -04:00
Ned Deily ce8f5ded65 Issue #22289: Prevent test_urllib2net failures due to ftp connection timeout. 2015-03-22 01:14:48 -07:00
Serhiy Storchaka 52027c301a Issue #22351: The nntplib.NNTP constructor no longer leaves the connection
and socket open until the garbage collector cleans them up.  Patch by
Martin Panter.
2015-03-21 09:40:26 +02:00
Serhiy Storchaka 8be6be427d Issue #21802: The reader in BufferedRWPair now is closed even when closing
writer failed in BufferedRWPair.close().
2015-03-24 23:23:28 +02:00
Serhiy Storchaka a54aae0683 Issue #23622: Unknown escapes in regular expressions that consist of ``'\'``
and ASCII letter now raise a deprecation warning and will be forbidden in
Python 3.6.
2015-03-24 22:58:14 +02:00
Serhiy Storchaka 793c14ea29 Issue #4727: Fixed issue number in Misc/NEWS. 2015-03-24 22:37:08 +02:00
Serhiy Storchaka b876df4cbb Issue #23671: string.Template now allows to specify the "self" parameter as
keyword argument.  string.Formatter now allows to specify the "self" and
the "format_string" parameters as keyword arguments.
2015-03-24 22:30:46 +02:00
Serhiy Storchaka d9d769fcdd Issue #23573: Increased performance of string search operations (str.find,
str.index, str.count, the in operator, str.split, str.partition) with
arguments of different kinds (UCS1, UCS2, UCS4).
2015-03-24 21:55:47 +02:00
Serhiy Storchaka 520e00dd92 Issue #23583: Added tests for standard IO streams in IDLE. 2015-03-24 19:49:23 +02:00
Serhiy Storchaka 87eb482e30 Issue #23502: The pprint module now supports mapping proxies.
In particular the __dict__ attributes of building types.
2015-03-24 19:31:50 +02:00
Serhiy Storchaka 022f20376a Issue #17530: pprint now wraps long bytes objects and bytearrays. 2015-03-24 19:22:37 +02:00
Serhiy Storchaka 72bd327db0 Issue #22687: Fixed some corner cases in breaking words in tetxtwrap.
Got rid of quadratic complexity in breaking long words.
2015-03-24 18:32:27 +02:00
Serhiy Storchaka 32af7549a7 Issue #20289: The copy module now uses pickle protocol 4 (PEP 3154) and
supports copying of instances of classes whose __new__ method takes
keyword-only arguments.
2015-03-24 18:06:42 +02:00
Victor Stinner f329878e74 Issue #23753: Python doesn't support anymore platforms without stat() or
fstat(), these functions are always required.

Remove HAVE_STAT and HAVE_FSTAT defines, and stop supporting DONT_HAVE_STAT and
DONT_HAVE_FSTAT.
2015-03-24 10:27:50 +01:00
Paul Moore 929a14a880 Misc/NEWS entries for zipapp changes 2015-03-23 21:40:43 +00:00
Serhiy Storchaka bca63b362d Issue #23688: Added support of arbitrary bytes-like objects and avoided
unnecessary copying of memoryview in gzip.GzipFile.write().
Original patch by Wolfgang Maier.
2015-03-23 14:59:48 +02:00
Serhiy Storchaka 77d899726f Issue #23252: Added support for writing ZIP files to unseekable streams. 2015-03-23 01:09:35 +02:00
Serhiy Storchaka f07a4b663d Issue #21526: Tkinter now supports new boolean type in Tcl 8.5. 2015-03-23 00:47:45 +02:00
R David Murray 94a6448956 Merge: #23647: Increase imaplib's MAXLINE to accommodate modern mailbox sizes. 2015-03-22 16:18:59 -04:00
R David Murray 0a0d20edfb Merge: #23539: Set Content-Length to 0 for PUT, POST, and PATCH if body is None. 2015-03-22 15:19:01 -04:00
Ned Deily 2f7bf23925 Issue #22289: merge from 3.4 2015-03-22 01:19:10 -07:00
Raymond Hettinger 32ea16577d Issue 23704: Add index(), copy(), and insert() to deques. Register deques as a MutableSequence. 2015-03-21 01:37:37 -07:00
Serhiy Storchaka 0a9e2721fa Issue #22351: The nntplib.NNTP constructor no longer leaves the connection
and socket open until the garbage collector cleans them up.  Patch by
Martin Panter.
2015-03-21 09:41:19 +02:00
Serhiy Storchaka 1dd49824df Issue #23681: The -b option now affects comparisons of bytes with int. 2015-03-20 16:54:57 +02:00
Victor Stinner a453cd8d85 Issue #23715: signal.sigwaitinfo() and signal.sigtimedwait() are now retried
when interrupted by a signal not in the *sigset* parameter, if the signal
handler does not raise an exception. signal.sigtimedwait() recomputes the
timeout with a monotonic clock when it is retried.

Remove test_signal.test_sigwaitinfo_interrupted() because sigwaitinfo() doesn't
raise InterruptedError anymore if it is interrupted by a signal not in its
sigset parameter.
2015-03-20 12:54:28 +01:00
Serhiy Storchaka 53c3fb186a Issue #22826: The result of open() in Tools/freeze/bkfile.py is now better
compatible with regular files (in particular it now supports the context
management protocol).
2015-03-20 09:21:59 +02:00
Serhiy Storchaka 8490f5acfe Issue #23001: Few functions in modules mmap, ossaudiodev, socket, ssl, and
codecs, that accepted only read-only bytes-like object now accept writable
bytes-like object too.
2015-03-20 09:00:36 +02:00
Ned Deily b3aa2e7ba3 Issue #23686: Update OS X 10.5 installer build to use OpenSSL 1.0.2a. 2015-03-19 16:22:14 -07:00
Ned Deily f0c6cd3581 Issue #23686: Update OS X 10.5 installer build to use OpenSSL 1.0.2a. 2015-03-19 16:21:10 -07:00
Antoine Pitrou 31084ba528 Issue #23632: Memoryviews now allow tuple indexing (including for multi-dimensional memoryviews). 2015-03-19 23:29:36 +01:00
Victor Stinner 79d68f929d Issue #23646: If time.sleep() is interrupted by a signal, the sleep is now
retried with the recomputed delay, except if the signal handler raises an
exception (PEP 475).

Modify also test_signal to use a monotonic clock instead of the system clock.
2015-03-19 21:54:09 +01:00
Serhiy Storchaka 0ed56a0b42 Fixed Misc/NEWS entry for issue #23136. 2015-03-19 19:54:51 +02:00
Serhiy Storchaka 64c439d3ae Fixed Misc/NEWS entry for issue #23136. 2015-03-19 19:52:50 +02:00
Serhiy Storchaka fc7344a792 Issue #23136: _strptime now uniformly handles all days in week 0, including
Jan 30 of previous year.  Based on patch by Jim Carroll.
2015-03-19 19:14:15 +02:00
Serhiy Storchaka 423feea01e Issue #23136: _strptime now uniformly handles all days in week 0, including
Jan 30 of previous year.  Based on patch by Jim Carroll.
2015-03-19 19:13:37 +02:00
Serhiy Storchaka 4f418d3671 Issue #23700: Iterator of NamedTemporaryFile now keeps a reference to
NamedTemporaryFile instance.  Patch by Bohuslav Kabrda.
2015-03-19 15:24:27 +02:00
Serhiy Storchaka 56cefa69ee Issue #23700: Iterator of NamedTemporaryFile now keeps a reference to
NamedTemporaryFile instance.  Patch by Bohuslav Kabrda.
2015-03-19 15:23:15 +02:00
Antoine Pitrou 8eef6a9ad0 Issue #22903: The fake test case created by unittest.loader when it fails importing a test module is now picklable. 2015-03-19 00:01:37 +01:00
Antoine Pitrou d833779cea Issue #22903: The fake test case created by unittest.loader when it fails importing a test module is now picklable. 2015-03-18 23:56:46 +01:00
Victor Stinner 59f7fb29ec Issue #22181: On Linux, os.urandom() now uses the new getrandom() syscall if
available, syscall introduced in the Linux kernel 3.17. It is more reliable
and more secure, because it avoids the need of a file descriptor and waits
until the kernel has enough entropy.
2015-03-18 14:39:33 +01:00
Serhiy Storchaka 9c1a9b2657 Issue #2211: Updated the implementation of the http.cookies.Morsel class.
Setting attributes key, value and coded_value directly now is deprecated.
update() and setdefault() now transform and check keys.  Comparing for
equality now takes into account attributes key, value and coded_value.
copy() now returns a Morsel, not a dict.  repr() now contains all attributes.
Optimized checking keys and quoting values.  Added new tests.
Original patch by Demian Brecht.
2015-03-18 10:59:57 +02:00
Robert Collins b28de01992 Fix patch attribution for issue 18983. 2015-03-18 09:59:33 +13:00
Robert Collins 302dbc6792 Issue #18983: Allow selection of output units in timeit.
This allows manual selection of a specific unit such as usecs rather than the
use of a heuristic. This is intended to aid machine processing of timeit
output.

Patch by Serhiy Storchaka.
2015-03-18 09:54:50 +13:00
Robert Collins c7965e0c21 Issue #23585: make patchcheck will ensure the interpreter is built. 2015-03-16 15:30:31 +13:00
Robert Collins bbb8ade904 Issue #23631: Fix traceback.format_list when a traceback has been mutated. 2015-03-16 15:27:16 +13:00
Berker Peksag 7aaa85932c Issue #23568: Add rdivmod support to MagicMock() objects.
Patch by Håkan Lövdahl.
2015-03-15 01:57:38 +02:00
Berker Peksag a785dece57 Issue #23568: Add rdivmod support to MagicMock() objects.
Patch by Håkan Lövdahl.
2015-03-15 01:51:56 +02:00
Berker Peksag 102029dfd6 Issue #2052: Add charset parameter to HtmlDiff.make_file(). 2015-03-15 01:18:47 +02:00
Serhiy Storchaka 577fc4e87f Issue #23138: Fixed parsing cookies with absent keys or values in cookiejar.
Patch by Demian Brecht.
2015-03-13 09:05:01 +02:00
Serhiy Storchaka 79fbeee237 Issue #23051: multiprocessing.Pool methods imap() and imap_unordered() now
handle exceptions raised by an iterator.  Patch by Alon Diamant and Davin
Potts.
2015-03-13 08:25:26 +02:00
Serhiy Storchaka f7cc3fccad Issue #23138: Fixed parsing cookies with absent keys or values in cookiejar.
Patch by Demian Brecht.
2015-03-13 09:09:35 +02:00
Serhiy Storchaka 63623ac252 Issue #23051: multiprocessing.Pool methods imap() and imap_unordered() now
handle exceptions raised by an iterator.  Patch by Alon Diamant and Davin
Potts.
2015-03-13 08:30:33 +02:00
Berker Peksag 9bd8af788d Issue #23581: Add matmul support to MagicMock.
Patch by Håkan Lövdahl.
2015-03-12 20:42:48 +02:00
Victor Stinner 95bb714ff7 Issue #23566: enable(), register(), dump_traceback() and dump_traceback_later()
functions of faulthandler now accept file descriptors. Patch by Wei Wu.
2015-03-12 15:32:03 +01:00
Serhiy Storchaka b669bfc2be Issue #22928: Disabled HTTP header injections in http.client.
Original patch by Demian Brecht.
2015-03-12 11:15:15 +02:00
Serhiy Storchaka a112a8ae47 Issue #22928: Disabled HTTP header injections in http.client.
Original patch by Demian Brecht.
2015-03-12 11:13:36 +02:00
Serhiy Storchaka 91427733ea Issue #23192: Fixed generator lambdas. Patch by Bruno Cauet. 2015-03-11 18:22:29 +02:00
Serhiy Storchaka c775ad615a Issue #23192: Fixed generator lambdas. Patch by Bruno Cauet. 2015-03-11 18:20:35 +02:00
Serhiy Storchaka ca8b64461d Issue #23615: Modules bz2, tarfile and tokenize now can be reloaded with
imp.reload().  Patch by Thomas Kluyver.
2015-03-11 17:31:33 +02:00
Serhiy Storchaka cf4a2f29ad Issue #23615: Modules bz2, tarfile and tokenize now can be reloaded with
imp.reload().  Patch by Thomas Kluyver.
2015-03-11 17:18:03 +02:00
Antoine Pitrou 63afdaa110 Issue #23629: Fix the default __sizeof__ implementation for variable-sized objects. 2015-03-10 22:35:24 +01:00
Antoine Pitrou a654510150 Issue #23629: Fix the default __sizeof__ implementation for variable-sized objects. 2015-03-10 22:32:00 +01:00
Victor Stinner 524a5ba111 Issue #23605: os.walk() now calls os.scandir() instead of os.listdir().
The usage of os.scandir() reduces the number of calls to os.stat().
Initial patch written by Ben Hoyt.
2015-03-10 13:20:34 +01:00
Larry Hastings 551719be4a Merge. 2015-03-09 02:40:13 -07:00
Larry Hastings cfac654165 Post-release changes for 3.5.0a2. 2015-03-09 02:39:47 -07:00
Antoine Pitrou 5bd7bf5bab Issue #22980: Under Linux, C extensions now include bitness in the file name,
to make it easy to test 32-bit and 64-bit builds in the same working tree.
2015-03-08 20:43:10 +01:00
Victor Stinner 6036e4431d Issue #22524: New os.scandir() function, part of the PEP 471: "os.scandir()
function -- a better and faster directory iterator". Patch written by Ben
Hoyt.
2015-03-08 01:58:04 +01:00
Serhiy Storchaka 88f64f392c Issue #23103: Reduced the memory consumption of IPv4Address and IPv6Address. 2015-03-07 20:08:34 +02:00
Serhiy Storchaka c0a23e6320 Issue #21793: BaseHTTPRequestHandler again logs response code as numeric,
not as stringified enum.  Patch by Demian Brecht.
2015-03-07 11:51:37 +02:00
Victor Stinner 4a7cc88472 Issue #23571: PyObject_Call(), PyCFunction_Call() and call_function() now
raise a SystemError if a function returns a result and raises an exception.
The SystemError is chained to the previous exception.

Refactor also PyObject_Call() and PyCFunction_Call() to make them more readable.

Remove some checks which became useless (duplicate checks).

Change reviewed by Serhiy Storchaka.
2015-03-06 23:35:27 +01:00
Ned Deily 4a13cb94d3 Issue #23593: fix Misc/NEWS entries 2015-03-05 17:45:03 -08:00
Ned Deily b5a23223f0 Issue #23593: fix Misc/NEWS entries 2015-03-05 17:44:10 -08:00
Ned Deily 797d49682f Issue #23594: merge 3.4 2015-03-05 17:37:11 -08:00
Ned Deily ac677f3fed Issue #23594: Update OS X 10.5 installer build to use OpenSSL 1.0.2. 2015-03-05 17:34:24 -08:00
Robert Collins f0c819acd0 Issue #22936: Allow showing local variables in unittest errors. 2015-03-06 13:46:35 +13:00
Robert Collins d7c7e0ef69 Issue #22936: Make it possible to show local variables in tracebacks. 2015-03-05 20:28:52 +13:00
Benjamin Peterson b64ae7bf2d merge 3.4 (#23476) 2015-03-04 22:11:48 -05:00
Benjamin Peterson fdb1971587 enable X509_V_FLAG_TRUSTED_FIRST when possible (closes #23476) 2015-03-04 22:11:12 -05:00
Robert Collins 6bc2c1e7eb Issue #17911: traceback module overhaul
Provide a way to seed the linecache for a PEP-302 module without actually
loading the code.

Provide a new object API for traceback, including the ability to not lookup
lines at all until the traceback is actually rendered, without any trace of the
original objects being kept alive.
2015-03-05 12:07:57 +13:00
Antoine Pitrou 0bfd0a4048 Issue #23576: Avoid stalling in SSL reads when EOF has been reached in the SSL layer but the underlying connection hasn't been closed. 2015-03-04 20:54:57 +01:00
Antoine Pitrou f7f3b0a14a Issue #23576: Avoid stalling in SSL reads when EOF has been reached in the SSL layer but the underlying connection hasn't been closed. 2015-03-04 20:51:55 +01:00
Serhiy Storchaka 35e5b72740 Issue #23504: Added an __all__ to the types module. 2015-03-04 09:44:24 +02:00
Serhiy Storchaka 7beb4f96dc Issue #23504: Added an __all__ to the types module. 2015-03-04 09:43:27 +02:00
Serhiy Storchaka 44eceb6e2a Issue #23563: Optimized utility functions in urllib.parse. 2015-03-03 20:21:35 +02:00
Ethan Furman 738f805074 issue19075: add visual sorting algorithms to turtledemo; original code from Jason Yeo 2015-03-02 12:29:58 -08:00
Benjamin Peterson 83d8fc265a merge 3.4 (#23367) 2015-03-02 11:18:56 -05:00
Benjamin Peterson 5061e67f0f merge 3.3 (#23367) 2015-03-02 11:18:40 -05:00
Benjamin Peterson b779bfba45 fix possible overflow bugs in unicodedata (closes #23367) 2015-03-02 11:17:05 -05:00
Alexander Belopolsky e49af34151 Issue #7830: Flatten nested functools.partial. 2015-03-01 15:08:17 -05:00
Serhiy Storchaka 490055a167 Issue #20204: Deprecation warning is now raised for builtin type without the
__module__ attribute.
2015-03-01 10:03:02 +02:00
Serhiy Storchaka 50adb9fc32 Issue #20204: Added the __module__ attribute to _tkinter classes. 2015-03-01 09:07:10 +02:00
Serhiy Storchaka efdc16f978 Issue #20204: Added the __module__ attribute to _tkinter classes. 2015-03-01 09:06:29 +02:00
Serhiy Storchaka 1c205518a3 Issue #19980: Improved help() for non-recognized strings. help('') now
shows the help on str.  help('help') now shows the help on help().
Original patch by Mark Lawrence.
2015-03-01 00:42:54 +02:00
Alexander Belopolsky 184291aeb7 Fixes #23521: Corrected pure python implementation of timedelta division.
* Eliminated OverflowError from timedelta * float for some floats;
 * Corrected rounding in timedlta true division.
2015-02-28 10:44:47 -05:00