Benjamin Peterson
c2f665e721
don't put runtime values in array initializer for C89 compliance ( closes #20588 )
2014-02-10 22:19:02 -05:00
Serhiy Storchaka
1064a13bb0
Do not reset the line number because we already set file position to correct
...
value.
(fixes error in patch for issue #18960 )
2014-01-09 20:12:49 +02:00
Serhiy Storchaka
768c16ce02
Issue #18960 : Fix bugs with Python source code encoding in the second line.
...
* The first line of Python script could be executed twice when the source
encoding (not equal to 'utf-8') was specified on the second line.
* Now the source encoding declaration on the second line isn't effective if
the first line contains anything except a comment.
* As a consequence, 'python -x' works now again with files with the source
encoding declarations specified on the second file, and can be used again
to make Python batch files on Windows.
* The tokenize module now ignore the source encoding declaration on the second
line if the first line contains anything except a comment.
* IDLE now ignores the source encoding declaration on the second line if the
first line contains anything except a comment.
* 2to3 and the findnocoding.py script now ignore the source encoding
declaration on the second line if the first line contains anything except
a comment.
2014-01-09 18:36:09 +02:00
Ezio Melotti
7c4a7e6f3c
#18803 : fix more typos. Patch by Févry Thibault.
2013-08-26 01:32:56 +03:00
Christian Heimes
9ae513caa7
Issue #18368 : PyOS_StdioReadline() no longer leaks memory when realloc() fails.
2013-08-06 15:59:16 +02:00
Christian Heimes
5e4d372524
Silence warning about set but unused variable inside compile_atom() in non-debug builds
2013-07-31 23:47:56 +02:00
Christian Heimes
70c94e7896
Issue #18552 : Check return value of PyArena_AddPyObject() in obj2ast_object().
2013-07-27 00:33:13 +02:00
Victor Stinner
1acc129d48
Parser/asdl_c.py: use Py_CLEAR()
2013-07-27 00:03:47 +02:00
Victor Stinner
ce72e1ce6c
According to the PEP 7, C code must "use 4-space indents"
...
Replace 8 spaces with 4.
2013-07-27 00:00:36 +02:00
Christian Heimes
1eb0cb12ac
Some compilers complain about 'control reaches end of non-void function'
...
because they don't understand that Py_FatalError() terminates the program.
2013-07-22 16:34:13 +02:00
Christian Heimes
53d2dc4045
Add sanity check to PyGrammar_LabelRepr() in order to catch invalid tokens when debugging
...
a new grammar.
CID 715360
2013-07-22 10:30:14 +02:00
Benjamin Peterson
265fba40c8
move declaration to top of block
2013-07-15 20:50:22 -07:00
Benjamin Peterson
2dbfd88245
check the return value of new_string() ( closes #18470 )
2013-07-15 19:15:34 -07:00
Serhiy Storchaka
3af14aaba5
Issue #18038 : SyntaxError raised during compilation sources with illegal
...
encoding now always contains an encoding name.
2013-06-09 16:51:52 +03:00
Mark Dickinson
ded35aeb9d
Issue #16546 : make ast.YieldFrom argument mandatory.
2012-11-25 14:36:26 +00:00
Matthias Klose
aee3c76acf
- Issue #16262 : fix out-of-src-tree builds, if mercurial is not installed.
2012-10-21 23:12:35 +02:00
Ezio Melotti
8a9cc526fe
#15923 : merge with 3.2.
2012-09-30 22:47:47 +03:00
Ezio Melotti
cb2916a714
#15923 : fix a mistake in asdl_c.py that resulted in a TypeError after 2801bf875a24 (see #15801 ).
2012-09-30 22:41:37 +03: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
Georg Brandl
cc98887e45
Remove unused variables in parsetok().
2012-08-11 11:16:18 +02:00
Jesus Cea
88ca04e6a8
MERGE: Closes #15512 : Correct __sizeof__ support for parser
2012-08-03 14:29:26 +02:00
Jesus Cea
e9c5318967
Closes #15512 : Correct __sizeof__ support for parser
2012-08-03 14:28:37 +02:00
Benjamin Peterson
481ae50ccd
construct fields in the right order ( closes #15517 )
...
Patch from Taihyun Hwang.
2012-07-31 21:41:56 -07:00
Benjamin Peterson
8107176f9b
add gc support to the AST base type ( closes #15293 )
2012-07-08 11:03:46 -07:00
Antoine Pitrou
507507473e
Issue #15291 : Fix a memory leak where AST nodes where not properly deallocated.
2012-07-08 12:43:32 +02:00
Jesus Cea
035997f1a3
Issue #1677 : Unused variable warning in Non-Windows
2012-07-03 13:15:03 +02:00
Tim Golden
9175c3d804
Issue #1677 : Handle better a race condition between the interactive interpreter and
...
the Ctrl-C signal handler on Windows
2012-06-29 18:39:26 +01:00
Tim Golden
b92b757eed
Issue #1677 : Handle better a race condition between the interactive interpreter and
...
the Ctrl-C signal handler on Windows
2012-06-29 18:27:08 +01:00
Christian Heimes
0b3847de6d
Issue #15096 : Drop support for the ur string prefix
2012-06-20 11:17:58 +02:00
Benjamin Peterson
77fa9379e2
use Py_ssize_t for ast sequence lengths
2012-05-15 10:10:27 -07:00
Martin v. Löwis
ce58ed3e7c
Merge with 3.2: issue #14433
2012-04-30 06:20:37 +02:00
Martin v. Löwis
e654c11f56
Issue #14433 : Prevent msvcrt crash in interactive prompt when stdin is closed.
2012-04-30 06:10:41 +02:00
Benjamin Peterson
1767e0274b
free AST's dict
2012-03-14 21:50:29 -05:00
Victor Stinner
45e50de1f5
Try to fix compilation of Python-ast.c on Visual Studio 2008
2012-03-13 01:17:31 +01:00
Benjamin Peterson
7e0dbfbbde
give the AST class a __dict__
2012-03-12 09:46:44 -07:00
Armin Ronacher
6ecf77b3f8
Basic support for PEP 414 without docs or tests.
2012-03-04 12:04:06 +00:00
Benjamin Peterson
cff9237d57
check after comments, too ( #13832 )
2012-01-19 17:46:13 -05:00
Benjamin Peterson
188bee5873
don't leak node
2012-01-19 08:48:18 -05:00
Benjamin Peterson
79c1f96438
only check this when parsing python
2012-01-19 08:48:11 -05:00
Meador Inge
fa21bf015d
Issue #12705 : Raise SyntaxError when compiling multiple statements as single interactive statement
2012-01-19 01:08:41 -06:00
Benjamin Peterson
8d5a62df10
murder tabs
2012-01-16 09:54:28 -05:00
Benjamin Peterson
527c622926
make YieldFrom its own distinct from Yield ( closes #13780 )
2012-01-14 08:58:23 -05:00
Nick Coghlan
1f7ce62bd6
Implement PEP 380 - 'yield from' ( closes #11682 )
2012-01-13 21:43:40 +10:00
Antoine Pitrou
3a5d4cb940
Issue #13748 : Raw bytes literals can now be written with the `rb` prefix as well as `br`.
2012-01-12 22:46:19 +01:00
Benjamin Peterson
f51d36a743
evidently some buildbots don't have python 3 installed
2011-12-29 12:07:21 -06:00
Benjamin Peterson
3ab85886d6
run AST toolchain on python3
2011-12-29 12:03:55 -06:00
Antoine Pitrou
ab0e9f7089
Issue #10350 : Read and save errno before calling a function which might overwrite it.
...
Original patch by Hallvard B Furuseth.
2011-12-16 12:29:37 +01:00
Antoine Pitrou
c345ce1a69
Issue #10350 : Read and save errno before calling a function which might overwrite it.
...
Original patch by Hallvard B Furuseth.
2011-12-16 12:28:32 +01:00
Amaury Forgeot d'Arc
942d5ba125
Merge branch 3.2
2011-11-22 22:02:01 +01:00
Amaury Forgeot d'Arc
58e8761da6
Issue #13436 : Fix a bogus error message when an AST object was passed
...
an invalid integer value.
2011-11-22 21:51:55 +01:00