Commit Graph

88620 Commits

Author SHA1 Message Date
Serhiy Storchaka f7ef47583e Added tests for mixed kinds of Unicode strings. 2015-03-24 21:49:53 +02:00
Serhiy Storchaka be1eb14241 Added tests for mixed kinds of Unicode strings. 2015-03-24 21:48:30 +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 6c86fe2d4b Issue #23583: Added tests for standard IO streams in IDLE. 2015-03-24 19:46:54 +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 ec4f9592f5 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:44:35 +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
Ezio Melotti 2e3998fae0 #11468: improve unittest basic example. Initial patch by Florian Preinstorfer. 2015-03-24 12:42:41 +02:00
Victor Stinner 0e98a76b65 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 11:24:06 +01: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
Victor Stinner 19276f184f Issue #23654: Fix faulthandler._stack_overflow() for the Intel C Compiler (ICC)
Issue #23654: Turn off ICC's tail call optimization for the stack_overflow
generator. ICC turns the recursive tail call into a loop.

Patch written by Matt Frank.
2015-03-23 21:20:27 +01:00
Serhiy Storchaka 4dc2c221ca Null merge 2015-03-23 15:26:49 +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
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
Raymond Hettinger f6e31b79a8 Issue 23729: Document ElementTree namespace handling and fix an omission in the XPATH predicate table. 2015-03-22 15:29:09 -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 936da2a796 #23647: Increase imaplib's MAXLINE to accommodate modern mailbox sizes. 2015-03-22 16:17:46 -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 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
R David Murray 5d06c74f41 Merge: #23700: fix/improve comment 2015-03-22 12:34:50 -04:00
R David Murray 75ed90a4cf #23700: fix/improve comment 2015-03-22 12:33:46 -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
Benjamin Peterson 218144a94d clarify behavior of shutil.move when destination exists (closes #22933)
Patch by Mike Short.
2015-03-22 10:11:54 -04:00
Ned Deily 2f7bf23925 Issue #22289: merge from 3.4 2015-03-22 01:19:10 -07: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 8472f39b06 Null merge 2015-03-22 09:47:20 +02:00
Serhiy Storchaka d357b89f0b Issue #22079: Deprecation warning now is issued in PyType_Ready() instead of
raising TypeError when statically allocated type subclasses dynamically
allocated type
2015-03-22 09:46:36 +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