Commit Graph

86014 Commits

Author SHA1 Message Date
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 be1eb14241 Added tests for mixed kinds of Unicode strings. 2015-03-24 21:48:30 +02:00
Serhiy Storchaka 6c86fe2d4b Issue #23583: Added tests for standard IO streams in IDLE. 2015-03-24 19:46:54 +02: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 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
Ezio Melotti 2e3998fae0 #11468: improve unittest basic example. Initial patch by Florian Preinstorfer. 2015-03-24 12:42:41 +02: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 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
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 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
R David Murray 75ed90a4cf #23700: fix/improve comment 2015-03-22 12:33:46 -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 ce8f5ded65 Issue #22289: Prevent test_urllib2net failures due to ftp connection timeout. 2015-03-22 01:14:48 -07: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
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
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
Serhiy Storchaka 74a49ac3f5 Issue #23681: Fixed Python 2 to 3 poring bugs.
Indexing bytes retiurns an integer, not bytes.
2015-03-20 16:46:19 +02:00
Serhiy Storchaka d83b7c2df4 Issue #23700: NamedTemporaryFile iterator closed underlied file object in
some circunstances while NamedTemporaryFile object was living.  This causes
failing test_csv.  Changed the implementation of NamedTemporaryFile.__iter__
to make tests passed.
2015-03-20 16:11:20 +02: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
Serhiy Storchaka 64c439d3ae Fixed Misc/NEWS entry for issue #23136. 2015-03-19 19:52:50 +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 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
Benjamin Peterson 86fdbf3152 wrap properly 2015-03-18 21:35:38 -05:00
Ethan Furman 482fe0477e issue23673
add private method to enum to support replacing global constants with Enum members:
- search for candidate constants via supplied filter
- create new enum class and members
- insert enum class and replace constants with members via supplied module name
- replace __reduce_ex__ with function that returns member name, so previous Python versions can unpickle
modify IntEnum classes to use new method
2015-03-18 18:19:30 -07: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
Antoine Pitrou c4c19b3938 Issue #23353: improve exceptions tests for generators 2015-03-18 22:22:46 +01:00
Victor Stinner 444f124fcf _tracemalloc.c: Fix typo 2015-03-18 16:05:18 +01:00
Victor Stinner 376658fa13 Issue #11726: Fix linecache example in the doc
Use a Python source file (linecache.__file__) instead of /etc/passwd.

Modify also linecache docstrings to clarify the linecache is written to cache
Python source files, not any text files.
2015-03-18 14:16:50 +01:00
Victor Stinner 93f0665fb6 Issue #11726: clarify linecache doc: linecache is written to cache Python
source files, even if "it works" with other text files encoded to UTF-8.
2015-03-18 14:14:42 +01:00
Victor Stinner 6a318d420a Issue #19428: Document that PyMarshal_ReadLongFromFile() and
PyMarshal_ReadShortFromFile() can fail.
2015-03-18 13:58:49 +01:00
Victor Stinner d6dc7bdaf9 Issue #23456: Add missing @coroutine decorators in asyncio 2015-03-18 11:37:42 +01:00
Vinay Sajip d55436ace3 Issue #23207: Improved kwarg validation. 2015-03-18 08:47:58 +00:00
Ned Deily ab6b9f8a5b Issue #22585: make URandomFDTests test case actually run 2015-03-17 04:30:08 -07:00
Berker Peksag 6a98002d47 Issue #23682: Delete Python 2.2 mention from distutils documentation.
Patch by Thomas Kluyver.
2015-03-17 06:55:48 +02:00
Benjamin Peterson 59c4eb71f2 versionchanged for rc4 removal (closes #23679) 2015-03-16 12:43:38 -05:00
Serhiy Storchaka 05d54730da Use non-zero and non-last positions in error handler tests. 2015-03-16 08:29:47 +02:00
Serhiy Storchaka 98d156b2b2 Increased coverage of standard codec error handlers. 2015-03-15 23:41:37 +02:00
Eli Bendersky 39430daa3b Issue #23549: Clarify confusion in heapq doc - accessing the mininmal element
The current documentation only mentions heap[0] as the smallest element in the
beginning, and not in any of the methods' docs. There's no method to access the
minimal element without popping it, and the documentation of nsmallest is
confusing because it may suggest that min() is the way to go for n==1.
2015-03-14 20:14:23 -07: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
Serhiy Storchaka b19542d062 Fix minor docs markup errors. 2015-03-14 21:32:57 +02:00
Steve Dower 41e7244c06 Fixes incorrect use of GetLastError where errno should be used. 2015-03-14 11:38:27 -07:00
Benjamin Peterson 0d70ab6b8c __getslice__ certainly won't appear in the output 2015-03-13 16:21:23 -05:00
Brett Cannon 2645bad04f Make the case to only support Python 2.7 when supporting 2/3 simultaneously 2015-03-13 12:49:44 -04: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
Benjamin Peterson f0f14f72bb use the meth role for ZipFile.open 2015-03-12 22:41:06 -05:00
Berker Peksag 32799953b0 Issue #23081: Document that PySequence_List also accepts iterables.
Patch by Lars Buitinck.
2015-03-13 02:55:45 +02:00
Berker Peksag ce77ee9183 Issue #22154: Add an example to show context management protocol support of ZipFile.open().
Patch by Mike Short.
2015-03-13 02:29:54 +02:00
Serhiy Storchaka a60c2fe480 Issue #23641: Cleaned out legacy dunder names from tests and docs.
Fixed 2 to 3 porting bug in pynche.ColorDB.
2015-03-12 21:56:08 +02:00