Christian Heimes
72f562f719
Fix potential NULL pointer dereferencing in ast module
CID 719690
13 years ago
Victor Stinner
0fae8f9083
Issue #18408 : Fix ast_for_atom(), PyErr_Fetch(&type, &value, &tback) can set value to NULL
13 years ago
Victor Stinner
43d8195a70
Issue #18408 : Handle PyArena_AddPyObject() failure in ast.c
PyList_Append() (called by PyArena_AddPyObject()) can fail because of a
MemoryError for example.
13 years ago
Benjamin Peterson
aad1d87339
move declaration to top of block
13 years ago
Benjamin Peterson
cda75be02a
unify some ast.argument's attrs; change Attribute column offset ( closes #16795 )
Patch from Sven Brauch.
13 years ago
Serhiy Storchaka
5e61f14c6d
Issue #12983 : Bytes literals with invalid \x escape now raise a SyntaxError
and a full traceback including line number.
13 years ago
Antoine Pitrou
4de7457009
Issue #17173 : Remove uses of locale-dependent C functions (isalpha() etc.) in the interpreter.
I've left a couple of them in: zlib (third-party lib), getaddrinfo.c
(doesn't include Python.h, and probably obsolete), _sre.c (legitimate
use for the re.LOCALE flag).
13 years ago
Benjamin Peterson
442f20996d
create NameConstant AST class for None, True, and False literals ( closes #16619 )
13 years ago
Mark Dickinson
b1cc6aa2df
Issue #9011 : AST creation no longer modifies CST for negated numeric literals.
13 years ago
Mark Dickinson
ded35aeb9d
Issue #16546 : make ast.YieldFrom argument mandatory.
13 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
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
Stefan Krah
28a2ad556a
Check return value of asdl_seq_new(). Found by Coverity.
14 years ago
Benjamin Peterson
3f3584695e
kill this disabled code
14 years ago
Benjamin Peterson
bc4665ebcb
use correct naming convention
14 years ago
Armin Ronacher
6ecf77b3f8
Basic support for PEP 414 without docs or tests.
14 years ago
Benjamin Peterson
c64ae92bf1
fix indentation
14 years ago
Benjamin Peterson
c8909ddd28
break out switch at correct place
14 years ago
Benjamin Peterson
205ad61313
only finish error if one occurred
14 years ago
Benjamin Peterson
c0beabc2a5
move LINENO define to where it actually belongs
14 years ago
Benjamin Peterson
55e0043a51
streamline normalizer identification a bit
14 years ago
Benjamin Peterson
d3af6e30a2
fix spelling
14 years ago
Benjamin Peterson
de5827dcd2
invert condition (head bang)
14 years ago
Benjamin Peterson
0fa35ea8f3
fix possible refleaks
14 years ago
Benjamin Peterson
89f8b80202
use helpful PyUnicode_IS_ASCII macro
14 years ago
Benjamin Peterson
5eda913cd2
PyUnicode_DecodeUTF8 will always return a ready string
14 years ago
Benjamin Peterson
8f56e0909f
rewrite such that this actually makes sense
14 years ago
Benjamin Peterson
527c622926
make YieldFrom its own distinct from Yield ( closes #13780 )
14 years ago
Nick Coghlan
1f7ce62bd6
Implement PEP 380 - 'yield from' ( closes #11682 )
14 years ago
Antoine Pitrou
3a5d4cb940
Issue #13748 : Raw bytes literals can now be written with the `rb` prefix as well as `br`.
14 years ago
Martin v. Löwis
bd928fef42
Rename _Py_identifier to _Py_IDENTIFIER.
14 years ago
Martin v. Löwis
afe55bba33
Add API for static strings, primarily good for identifiers.
Thanks to Konrad Schöbel and Jasper Schulz for helping with the mass-editing.
14 years ago
Martin v. Löwis
d63a3b8beb
Implement PEP 393.
14 years ago
Benjamin Peterson
832bfe2ebd
add a AST validator ( closes #12575 )
15 years ago
Benjamin Peterson
f63d615f8b
fix indentation
15 years ago
Benjamin Peterson
43af12b0b4
unify TryExcept and TryFinally ( closes #12199 )
15 years ago
Benjamin Peterson
bf1bbc1452
reflect with statements with multiple items in the AST ( closes #12106 )
15 years ago
Benjamin Peterson
bd3e362089
make assigning to a bytes literal a syntax error ( closes #11506 )
15 years ago
Brett Cannon
b94767ff44
Issue #8914 : fix various warnings from the Clang static analyzer v254.
15 years ago
Georg Brandl
e5b99f0fb3
Remove redundant includes of headers that are already included by Python.h.
15 years ago
Victor Stinner
15244f7b12
Recorded merge of revisions 85569-85570 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r85569 | victor.stinner | 2010-10-16 15:14:10 +0200 (sam., 16 oct. 2010) | 4 lines
Issue #9713 , #10114 : Parser functions (eg. PyParser_ASTFromFile) expects
filenames encoded to the filesystem encoding with surrogateescape error handler
(to support undecodable bytes), instead of UTF-8 in strict mode.
........
r85570 | victor.stinner | 2010-10-16 15:42:53 +0200 (sam., 16 oct. 2010) | 4 lines
Fix ast_error_finish() and err_input(): filename can be NULL
Fix my previous commit (r85569).
........
15 years ago
Victor Stinner
2f2ed1f36c
Fix ast_error_finish() and err_input(): filename can be NULL
Fix my previous commit (r85569).
15 years ago
Victor Stinner
4c7c8c3023
Issue #9713 , #10114 : Parser functions (eg. PyParser_ASTFromFile) expects
filenames encoded to the filesystem encoding with surrogateescape error handler
(to support undecodable bytes), instead of UTF-8 in strict mode.
15 years ago
Benjamin Peterson
d4efd9eb15
add column offset to all syntax errors
16 years ago
Amaury Forgeot d'Arc
b1147f5d0a
Merged revisions 84209, 84214 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r84209 | amaury.forgeotdarc | 2010-08-19 19:43:15 +0200 (jeu., 19 août 2010) | 5 lines
Check the return values for all functions returning an ast node.
Failure to do it may result in strange error messages or even crashes,
in admittedly convoluted cases that are normally syntax errors, like:
def f(*xx, __debug__): pass
........
r84214 | amaury.forgeotdarc | 2010-08-19 23:32:38 +0200 (jeu., 19 août 2010) | 3 lines
Add tests for r84209 (crashes in the Ast builder)
Also remove one tab, and move a check closer to the possible failure.
........
16 years ago
Amaury Forgeot d'Arc
a1e5c69d5b
Merged revisions 84214 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r84214 | amaury.forgeotdarc | 2010-08-19 23:32:38 +0200 (jeu., 19 août 2010) | 3 lines
Add tests for r84209 (crashes in the Ast builder)
Also remove one tab, and move a check closer to the possible failure.
........
16 years ago
Amaury Forgeot d'Arc
12844e6df6
Add tests for r84209 (crashes in the Ast builder)
Also remove one tab, and move a check closer to the possible failure.
16 years ago