Commit graph

101860 commits

Author SHA1 Message Date
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
f7ef47583e Added tests for mixed kinds of Unicode strings. 2015-03-24 21:49:53 +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
8e2aa88a40 Issue #23741: Slightly refactor the pprint module to make it a little more
extesible.  No public API is added.
2015-03-24 18:45:23 +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
Benjamin Peterson
b365a06a84 change Σ to ν for obscure joke reasons
https://twitter.com/ncoghlan_dev/status/579173053793353728
2015-03-24 12:12:44 -04: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
944fbcc478 Issue #23571: Enhance _Py_CheckFunctionResult()
Too bad, sometimes Py_FatalError() is unable to write the exception into
sys.stderr (on "AMD64 OpenIndiana 3.x" buildbot, the buildbot was probably out
of memory).

Call Py_FatalError() with a different message for the two cases (result+error,
or no result and no error).
2015-03-24 16:28:52 +01:00
Victor Stinner
381a9bce97 Issue #23571: Update test_capi 2015-03-24 14:01:32 +01:00
Victor Stinner
e0deff31d3 (Merge 3.4) Issue #23571: Py_FatalError() now tries to flush sys.stdout and
sys.stderr

It should help to see exceptions when stderr if buffered: PyErr_Display() calls
sys.stderr.write(), it doesn't write into stderr file descriptor directly.
2015-03-24 13:46:18 +01:00
Victor Stinner
454bd3a277 stdprinter_write(): mention the encoding 2015-03-24 13:40:29 +01:00
Victor Stinner
3b06dfb9d1 Issue #23571: In debug mode, _Py_CheckFunctionResult() now calls
Py_FatalError() instead of using an assertion in debug mode. Py_FatalError()
displays the current exception and the traceback which contain more information
than just the assertion error.
2015-03-24 12:53:59 +01:00
Victor Stinner
de821befd4 Issue #23571: PyErr_FormatV() and PyErr_SetObject() now always clear the
current exception because they can run arbitrary Python code and so no
exception must be set.
2015-03-24 12:41:23 +01:00
Victor Stinner
91afbb6088 Issue #23753: Move _Py_wstat() from Python/fileutils.c to Modules/getpath.c
I expected more users of _Py_wstat(), but in practice it's only used by
Modules/getpath.c. Move the function because it's not needed on Windows.
Windows uses PC/getpathp.c which uses the Win32 API (ex: GetFileAttributesW())
not the POSIX API.
2015-03-24 12:16:28 +01:00
Victor Stinner
10dc48497e (Merge 3.4) Issue #23571: Enhance Py_FatalError()
* Display the current Python stack if an exception was raised but the exception
  has no traceback
* Disable faulthandler if an exception was raised (before it was only disabled
  if no exception was raised)
* To display the current Python stack, call PyGILState_GetThisThreadState()
  which works even if the GIL was released
2015-03-24 12:01:30 +01:00
Ezio Melotti
0f05cea057 #11468: merge with 3.4. 2015-03-24 12:52:13 +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
Raymond Hettinger
551350a79f Improve and fix-up comments. 2015-03-24 00:19:53 -07:00
Raymond Hettinger
0f1451c8c0 Issue 23744: Minor speed-up for deque.__bool__(). 2015-03-23 23:23:55 -07:00
Paul Moore
929a14a880 Misc/NEWS entries for zipapp changes 2015-03-23 21:40:43 +00:00
Victor Stinner
d1f3a002c3 Merge 3.4 (faulthandler ICC) 2015-03-23 21:21:00 +01:00
Serhiy Storchaka
4dc2c221ca Null merge 2015-03-23 15:26:49 +02: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
Raymond Hettinger
1b2f4d5f0c merge 2015-03-22 15:29:48 -07: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
R David Murray
5d06c74f41 Merge: #23700: fix/improve comment 2015-03-22 12:34:50 -04:00
Paul Moore
a4d4dd3a9d #23657 Don't explicitly do an isinstance check for str in zipapp
As a result, explicitly support pathlib.Path objects as arguments.
Also added tests for the CLI interface.
2015-03-22 15:32:36 +00:00
Benjamin Peterson
67057ab57c merge 3.4 (#22933) 2015-03-22 10:15:12 -04:00
Ned Deily
2f7bf23925 Issue #22289: merge from 3.4 2015-03-22 01:19:10 -07:00
Serhiy Storchaka
8472f39b06 Null merge 2015-03-22 09:47:20 +02:00
Victor Stinner
4f0efb0522 Issue #23571: Fix test_capi 2015-03-21 17:24:50 +01:00
Victor Stinner
efde146b0c Issue #23571: _Py_CheckFunctionResult() now gives the name of the function
which returned an invalid result (result+error or no result without error) in
the exception message.

Add also unit test to check that the exception contains the name of the
function.

Special case: the final _PyEval_EvalFrameEx() check doesn't mention the
function since it didn't execute a single function but a whole frame.
2015-03-21 15:04:43 +01:00
Raymond Hettinger
6921c13bbb Minor nit. Make the rotate() success/fail tests consistent. 2015-03-21 02:03:40 -07:00
Raymond Hettinger
ac13ad6a32 For safety, wait to decref deleted values until the deque state has been restored. 2015-03-21 01:53:16 -07:00
Raymond Hettinger
0f6f94778a Fix minor formatting nits and remove unnecessary comment. 2015-03-21 01:42: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
f402775e5d Removed trailing tabs. 2015-03-21 09:25:53 +02:00
Steve Dower
e9ae8340a3 Update Wix version and fixes wxs file. 2015-03-20 22:05:33 -07:00
Raymond Hettinger
39dadf7abf Issue 23705: Improve the performance of __contains__ checks for deques. 2015-03-20 16:38:56 -07:00
Serhiy Storchaka
17d3a58e39 Issue #22832: Tweaked parameter names for fcntl module to better match
official POSIX documentation.  Updated the documenttion for Python 3.
Patch by Alex Shkop.
2015-03-20 20:04:21 +02:00
R David Murray
6faa62445f Merge: #11726: Make linecache docs reflect that all files are treated the same. 2015-03-20 11:32:17 -04:00
R David Murray
63998a3520 #11726: Make linecache docs reflect that all files are treated the same.
Being able to read non-python text files is not a purpose of linecache, but it
does work and people use it.  This changeset adjusts the language to make it
clear that Python files are not treated uniquely, but does not go so far as to
say reading non-python files is explicitly supported.
2015-03-20 11:31:38 -04:00
Victor Stinner
8291b5e4f7 Issue #22181: Run "aclocal; autoconf; autoheader" to regenerate configure 2015-03-20 16:03:14 +01:00