Commit Graph

3970 Commits

Author SHA1 Message Date
Nick Coghlan
d4f5ad6c6e Merge fix from #6074 from 3.3 2012-10-19 23:36:15 +10:00
Nick Coghlan
eb8d627bbd Issue #6074: Apply an appropriate fix for importlib based imports 2012-10-19 23:32:00 +10:00
Christian Heimes
743e0cd6b5 Issue #16166: Add PY_LITTLE_ENDIAN and PY_BIG_ENDIAN macros and unified
endianess detection and handling.
2012-10-17 23:52:17 +02:00
Trent Nelson
744faddae8 Merge issue #15833: don't raise an exception if importlib can't write
byte-compiled files.

This fixes a regression introduced by 3.3.

Patch by Charles-François Natali.
2012-10-16 08:03:21 -04:00
Trent Nelson
d783c8ed00 Issue #15833: don't raise an exception if importlib can't write byte-compiled
files.

This fixes a regression introduced by 3.3.  Patch by Charles-François Natali.
2012-10-16 07:47:34 -04:00
Benjamin Peterson
fe1bcb64cd move more variable declarations to the top of blocks 2012-10-12 11:40:01 -04:00
Benjamin Peterson
f208df3618 move declaration to top of block 2012-10-12 11:37:56 -04:00
Benjamin Peterson
31a58ff1c3 ceval cleanup
- Make many variables local to the opcode; Kill u, v, w, and x.
- Force every opcode to end with DISPATCH or jump to error handling.
- Simplify error handling.
- Check error statuses in more places.

Closes #16191.
2012-10-12 11:34:51 -04:00
Brett Cannon
6072e0bf42 Remove uses of % with str.format. 2012-10-12 10:00:34 -04:00
Brett Cannon
9407d50208 Merge fix for issue #15111. 2012-10-10 19:18:37 -04:00
Brett Cannon
a6ce4fd426 Closes issue #15111: Calling __import__ with a module specified in
fromlist which causes its own ImportError (e.g. the module tries to
import a non-existent module) should have that exception propagate.
2012-10-10 19:03:46 -04:00
Benjamin Peterson
00f86f2202 add some missing DISPATCH() 2012-10-10 14:10:33 -04:00
Jesus Cea
f01d695ccd Closes #16135: Removal of OS/2 support 2012-10-05 03:36:11 +02:00
Jesus Cea
b48925a406 #16135: Removal of OS/2 support (I) 2012-10-05 01:04:27 +02:00
Victor Stinner
3b635cd447 Close #15766: Catch exceptions while raising the ImportError in imp.load_dynamic() 2012-10-02 00:55:07 +02:00
Victor Stinner
621ef3d84f Issue #15609: Optimize str%args for integer argument
- Use _PyLong_FormatWriter() instead of formatlong() when possible, to avoid
   a temporary buffer
 - Enable the fast path when width is smaller or equals to the length,
   and when the precision is bigger or equals to the length
 - Add unit tests!
 - formatlong() uses PyUnicode_Resize() instead of _PyUnicode_FromASCII()
   to resize the output string
2012-10-02 00:33:47 +02:00
Brett Cannon
8ed677db12 Add some comments. 2012-09-28 16:41:39 -04:00
Benjamin Peterson
feaa54f537 don't depend on __debug__ because it's baked in at freeze time (issue #16046) 2012-09-25 11:22:59 -04:00
Antoine Pitrou
ca8aa4acf6 Issue #15144: Fix possible integer overflow when handling pointers as integer values, by using Py_uintptr_t instead of size_t.
Patch by Serhiy Storchaka.
2012-09-20 20:56:47 +02:00
Christian Heimes
10ca1fee8f Cleanup 'k' when the creation of PySTEntryObject fails. ad3824a90261 used to decref 'k' in too many error cases. 2012-09-12 17:58:20 +02:00
Christian Heimes
55ad6515c9 Cleanup 'k' when the creation of PySTEntryObject fails. ad3824a90261 used to decref 'k' in too many error cases. 2012-09-12 17:58:10 +02:00
Christian Heimes
9c5b521c71 Partly revert ad3824a90261 and add comment about reference ownership 2012-09-12 17:53:15 +02:00
Christian Heimes
1526582df6 Partly revert ad3824a90261 and add comment about reference ownership 2012-09-12 17:52:46 +02:00
Christian Heimes
e9a6d62d9f Fix null pointer dereferencing in structmember.c PyMember_SetOne() for T_CHAR. _PyUnicode_AsStringAndSize() can return NULL without touching the len argument. Also remove unnecessary PyUnicode_Check(), _PyUnicode_AsStringAndSize() performance the test again. CID 486815 2012-09-11 17:31:08 +02:00
Christian Heimes
5557a9c73f Fix null pointer dereferencing in structmember.c PyMember_SetOne() for T_CHAR. _PyUnicode_AsStringAndSize() can return NULL without touching the len argument. Also remove unnecessary PyUnicode_Check(), _PyUnicode_AsStringAndSize() performance the test again. CID 486815 2012-09-11 17:30:53 +02:00