79811 Commits

Author SHA1 Message Date
Victor Stinner
53510cda59 Issue #18408: type_new() and PyType_FromSpecWithBases() now raise MemoryError
on memory allocation failure
2013-07-15 19:34:20 +02:00
Victor Stinner
e699e5a218 Issue #18408: Don't check unicode consistency in _PyUnicode_HAS_UTF8_MEMORY()
and _PyUnicode_HAS_WSTR_MEMORY() macros

These macros are called in unicode_dealloc(), whereas the unicode object can be
"inconsistent" if the creation of the object failed.

For example, when unicode_subtype_new() fails on a memory allocation,
_PyUnicode_CheckConsistency() fails with an assertion error because data is
NULL.
2013-07-15 18:22:47 +02:00
R David Murray
48830035e5 Closes #18464: fix typo in test name. 2013-07-15 12:09:47 -04:00
Victor Stinner
3de5869864 Issue #18408: PyObject_Call() now fails with an assertion error in debug mode
if the function called failed whereas no exception was raised, to detect bugs
earlier.
2013-07-15 17:50:07 +02:00
Victor Stinner
33283ba300 Issue #18408: Fix CJK decoders, raise MemoryError on memory allocation failure 2013-07-15 17:47:39 +02:00
Victor Stinner
54b2d2ec69 Issue #18408: Fix pyexpat.ParserCreate()
Check if XML_ParserCreate_MM() failed (ex: MemoryError) before using
self->itself.
2013-07-15 17:15:57 +02:00
Barry Warsaw
4958f714bd - Issue #18440: Clarify that hash() can truncate the value returned from an
object's custom `__hash__()` method.
2013-07-15 15:21:41 -04:00
Ronald Oussoren
0fedb37c47 Issue #18393: Remove use of deprecated API on OSX
The "Gestalt" function on OSX is deprecated (starting with OSX 10.8),
remove its usage from the stdlib. The patch removes a number of private
functions and a private module, but does not change the public API.

The removed code was effectively dead, the platform module has used
other code to fetch the OSX version for years and could only use
on the Gestalt-based code as a fallback. That fallback can only trigger
on broken OSX installs (that is, someone has removed parts of the system
install)
2013-07-15 18:32:09 +02:00
R David Murray
7f93b36e73 Merge: Closes #18464: fix typo in test name. 2013-07-15 12:10:29 -04:00
Richard Oudkerk
9ba6962a04 Issue #18344: Fix potential ref-leaks in _bufferedreader_read_all(). 2013-07-15 16:10:28 +01:00
Richard Oudkerk
9ad51ec81b Issue #18344: Fix potential ref-leaks in _bufferedreader_read_all(). 2013-07-15 16:05:22 +01:00
Nick Coghlan
24c05bc154 Close issue 17482: don't overwrite __wrapped__ 2013-07-15 21:13:08 +10:00
Serhiy Storchaka
6180a2f453 Issue #18449: Make Tools/demo/ss1.py work again on Python 3. Patch by
Févry Thibault.
2013-07-15 12:37:43 +03:00
Serhiy Storchaka
2670b9acb6 Issue #18449: Make Tools/demo/ss1.py work again on Python 3. Patch by
Févry Thibault.
2013-07-15 12:34:17 +03:00
Ned Deily
d57b268653 Closes #18452: fix several "occurrence" typos (reported by Févry Thibault). 2013-07-14 12:45:18 -07:00
Ned Deily
0995c47891 Issue #18452: fix several "occurrence" typos (reported by Févry Thibault). 2013-07-14 12:43:16 -07:00
Brett Cannon
20f5e37457 Issue #9893: remove an outdated mention of the Vim-related files. 2013-07-14 09:50:50 -04:00
Raymond Hettinger
468bcaffd6 merge 2013-07-13 22:48:49 -07:00
Raymond Hettinger
889b92d3aa Issue #18432: Fix unintended API change in the sched module 2013-07-13 22:42:09 -07:00
Raymond Hettinger
90dea4ce43 Tweak the deque struct by moving the least used fields (maxlen and weakref) to the end. 2013-07-13 22:30:25 -07:00
Raymond Hettinger
840533bf1c Use a do-while loop in the inner loop for rotate (m is always greater than zero). 2013-07-13 17:03:58 -07:00
Raymond Hettinger
3959af9b2a Move the freeblock() call outside the main loop to speed-up and simplify the block re-use logic. 2013-07-13 02:34:08 -07:00
Terry Jan Reedy
ae13ff1c5f Merge with 3.3 2013-07-13 04:06:03 -04:00
Terry Jan Reedy
e6a17862e7 Issue #18365: convert buildbot errors to skips. 2013-07-13 04:05:42 -04:00
Terry Jan Reedy
371f746bdc Merge with 3.3 2013-07-13 02:35:07 -04:00
Terry Jan Reedy
4f133e2e98 Issue #18279: Add tests for idlelib/RstripExtension.py. Original patch by
Phil Webster. With that available, modify RstripExtension.py to stop deleting
null slices, which caused a file to be marked as changed when it was not.
2013-07-13 02:34:43 -04:00
R David Murray
1424e7d688 Merge: #18437: fix comment typo. 2013-07-12 22:56:15 -04:00
R David Murray
037f65841c #18437: fix comment typo. 2013-07-12 22:55:43 -04:00
Terry Jan Reedy
4064b2448c Merge with 3.3 2013-07-12 20:17:00 -04:00
Terry Jan Reedy
04ff0382b2 Issue #18365: normalize whitespace 2013-07-12 20:16:28 -04:00
Terry Jan Reedy
0c92553d85 Merge with 3.3 2013-07-12 20:10:48 -04:00
Terry Jan Reedy
21784da416 Issue #18365: Add mock Text class and test thereof versus tk.Text.
Based on patches by Todd.Rovito and Phil Webster.
2013-07-12 20:10:23 -04:00
R David Murray
d0a03ad139 #18389: Clarify that relpath does not access the file system.
Initial patch by Madison May.
2013-07-12 17:43:53 -04:00
R David Murray
ce10fab9f6 #18389: Clarify that relpath does not access the file system.
Initial patch by Madison May.
2013-07-12 17:43:11 -04:00
Vinay Sajip
11b38f17ca Closes #18433: Merged documentation update from 3.3. 2013-07-12 21:54:12 +01:00
Vinay Sajip
577d4ff6e0 Issue #18433: Clarified venv documentation. 2013-07-12 21:52:51 +01:00
Vinay Sajip
c1a9d30354 Merged changes. 2013-07-12 21:46:05 +01:00
Vinay Sajip
ad6bb031d7 Issue #18434: Updated example script to tidy up resources. 2013-07-12 21:44:35 +01:00
Vinay Sajip
8c7dde3bd9 Merged upstream changes. 2013-07-12 21:19:41 +01:00
Vinay Sajip
4969d468cb Merged upstream changes. 2013-07-12 21:18:49 +01:00
Vinay Sajip
ad644e011f Closes #18435: Merged fix from 3.3. 2013-07-12 21:13:01 +01:00
Vinay Sajip
c07aa9e41f Issue #18435: Replaced simple attribute container class Context with types.SimpleNamespace. 2013-07-12 21:10:19 +01:00
R David Murray
a03a7c79ca Merge heads. 2013-07-12 16:04:18 -04:00
R David Murray
8863bfe618 Merge heads. 2013-07-12 16:03:44 -04:00
R David Murray
1f9d24a18d Merge: #18431: Decode encoded words in atoms in new email parser. 2013-07-12 16:01:10 -04:00
R David Murray
923512f327 #18431: Decode encoded words in atoms in new email parser.
There is more to be done here in terms of accepting RFC invalid
input that some mailers accept, but this covers the valid
RFC places where encoded words can occur in structured headers.
2013-07-12 16:00:28 -04:00
Vinay Sajip
62926eed68 Closes #18434: Merged documentation update from 3.3. 2013-07-12 20:58:14 +01:00
Vinay Sajip
3c557f298a Issue #18434: Updated example script in venv docs to use setuptools rather than Distribute. 2013-07-12 20:54:25 +01:00
Brett Cannon
ae95b4f7a5 Issue #17845: Clarify the message setup.py prints upon successfully
building Python but having some optional module which didn't build.

Patch by Yogesh Chaudhari.
2013-07-12 11:30:32 -04:00
Brett Cannon
a79e4fb38d Issue #18342: Use the repr of a module name for ``from ... import
...`` when an ImportError occurs.

Other cases had already been switched over to using the repr.

Thanks to Tomasz Maćkowiak for the patch.
2013-07-12 11:22:26 -04:00