Andrew Svetlov
90c0eb28c5
Issue #16218 : Support non ascii characters in python launcher.
Patch by Serhiy Storchaka.
14 years ago
Benjamin Peterson
d9c8702c0f
point errors related to nonlocals and globals to the statement declaring them ( closes #10189 )
14 years ago
Benjamin Peterson
e132f527c9
check return value of _PyUnicode_AsString
14 years ago
Benjamin Peterson
42124a727d
initialize map/filter/zip in _PyBuiltin_Init rather than the catch-all function
14 years ago
Victor Stinner
76df43de30
Issue #16330 : Use surrogate-related macros
Patch written by Serhiy Storchaka.
14 years ago
Philip Jenvey
45c41494bf
bounds check for bad data (thanks amaury)
14 years ago
Nick Coghlan
557c76c136
Fix compilation on Windows
14 years ago
Nick Coghlan
eb8d627bbd
Issue #6074 : Apply an appropriate fix for importlib based imports
14 years ago
Nick Coghlan
34937ce249
Issue #6074 : Forward port Windows read-only source file fix from 2.7
14 years ago
Nick Coghlan
b48c028ca7
Issue #6074 : Restore the long-broken support for running with read-only source files on Windows
14 years ago
Christian Heimes
743e0cd6b5
Issue #16166 : Add PY_LITTLE_ENDIAN and PY_BIG_ENDIAN macros and unified
endianess detection and handling.
14 years ago
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.
14 years ago
Benjamin Peterson
fe1bcb64cd
move more variable declarations to the top of blocks
14 years ago
Benjamin Peterson
f208df3618
move declaration to top of block
14 years ago
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 .
14 years ago
Brett Cannon
6072e0bf42
Remove uses of % with str.format.
14 years ago
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.
14 years ago
Benjamin Peterson
00f86f2202
add some missing DISPATCH()
14 years ago
Chris Jerdonek
ad4b000179
Issue #14783 : Backport changes from 3.2.
14 years ago
Jesus Cea
f01d695ccd
Closes #16135 : Removal of OS/2 support
14 years ago
Jesus Cea
b48925a406
#16135 : Removal of OS/2 support (I)
14 years ago
Victor Stinner
3b635cd447
Close #15766 : Catch exceptions while raising the ImportError in imp.load_dynamic()
14 years ago
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
14 years ago
Brett Cannon
8ed677db12
Add some comments.
14 years ago
Benjamin Peterson
0beb4d28d0
don't depend on __debug__ because it's baked in at freeze time (issue #16046 )
14 years ago
Benjamin Peterson
feaa54f537
don't depend on __debug__ because it's baked in at freeze time (issue #16046 )
14 years ago
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.
14 years ago
Christian Heimes
dfaf90da9c
Cleanup 'k' when the creation of PySTEntryObject fails. ad3824a90261 used to decref 'k' in too many error cases.
14 years ago
Christian Heimes
55ad6515c9
Cleanup 'k' when the creation of PySTEntryObject fails. ad3824a90261 used to decref 'k' in too many error cases.
14 years ago
Christian Heimes
65a0141e14
Partly revert ad3824a90261 and add comment about reference ownership
14 years ago
Christian Heimes
1526582df6
Partly revert ad3824a90261 and add comment about reference ownership
14 years ago
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
14 years ago
Christian Heimes
6d29352cfd
Issue #15895 : my analysis was slightly off. The FILE pointer is only leaked when set_main_loader() fails for a pyc file with closeit=0. In the success case run_pyc_file() does its own cleanup of the fp. I've changed the code to use another FILE ptr for pyc files and moved the fclose() to PyRun_SimpleFileExFlags() to make it more obvious what's happening.
14 years ago
Christian Heimes
6a77af690f
Issue #15895 : Fix FILE pointer leak in PyRun_SimpleFileExFlags() when filename points to a pyc/pyo file and closeit is false.
14 years ago
Christian Heimes
3d463393bb
Fixed memory leak in error branch of parsestrplus. CID 715374 Variable s going out of scope leaks the storage it points to.
14 years ago
Christian Heimes
48d8d21438
Added missing va_end in error branch of PyArg_UnpackTuple(). CID 486641
14 years ago
Christian Heimes
d8edcb6505
Added missing va_end in error branch of PyArg_UnpackTuple(). CID 486641
14 years ago
Christian Heimes
04ac4c1cb8
Issue #15895 : my analysis was slightly off. The FILE pointer is only leaked when set_main_loader() fails for a pyc file with closeit=0. In the success case run_pyc_file() does its own cleanup of the fp. I've changed the code to use another FILE ptr for pyc files and moved the fclose() to PyRun_SimpleFileExFlags() to make it more obvious what's happening.
14 years ago
Christian Heimes
eeb5635843
Issue #15895 : Fix FILE pointer leak in PyRun_SimpleFileExFlags() when filename points to a pyc/pyo file and closeit is false.
14 years ago
Christian Heimes
837e53a7c2
Closed reference leak of variable 'k' in function ste_new which wasn't decrefed in error cases
14 years ago
Christian Heimes
8c1bce00d2
Closed reference leak of variable 'k' in function ste_new which wasn't decrefed in error cases
14 years ago
Antoine Pitrou
e299cae230
Issue #15340 : Fix importing the random module when /dev/urandom cannot be opened.
This was a regression caused by the hash randomization patch.
14 years ago
Antoine Pitrou
7ff1822ec7
Issue #15340 : Fix importing the random module when /dev/urandom cannot be opened.
This was a regression caused by the hash randomization patch.
14 years ago
Stefan Krah
d9c1bf7f1f
After the jump in line 1051 unicode_tmp is NULL. Found by Coverity.
14 years ago
Antoine Pitrou
58098a77e6
Issue #13992 : The trashcan mechanism is now thread-safe. This eliminates
sporadic crashes in multi-thread programs when several long deallocator
chains ran concurrently and involved subclasses of built-in container
types.
Because of this change, a couple extension modules compiled for 2.7.4
(those which use the trashcan mechanism, despite it being undocumented)
will not be loadable by 2.7.3 and earlier. However, extension modules
compiled for 2.7.3 and earlier will be loadable by 2.7.4.
14 years ago
Antoine Pitrou
56cd62c04a
Issue #13992 : The trashcan mechanism is now thread-safe. This eliminates
sporadic crashes in multi-thread programs when several long deallocator
chains ran concurrently and involved subclasses of built-in container
types.
Because of this change, a couple extension modules compiled for 3.2.4
(those which use the trashcan mechanism, despite it being undocumented)
will not be loadable by 3.2.3 and earlier. However, extension modules
compiled for 3.2.3 and earlier will be loadable by 3.2.4.
14 years ago
Benjamin Peterson
c7dedb0945
put * in the normal place
14 years ago
Benjamin Peterson
bd0df50fb6
get rid of ast_error_finish by passing the compiling struct to ast_error
14 years ago
Benjamin Peterson
c5d7518a2e
move variable decl to the top of the function
14 years ago
Benjamin Peterson
2e2c903700
prevert ast errors from being normalized before ast_error_finish is called ( closes #15846 )
14 years ago