Serhiy Storchaka
9165f77d5f
bpo-32012: Disallow trailing comma after genexpr without parenthesis. ( #4382 )
2017-11-15 08:49:40 +02:00
luzpaz
a5293b4ff2
Fix miscellaneous typos ( #4275 )
2017-11-05 15:37:50 +02:00
Serhiy Storchaka
56cb465cc9
bpo-31825: Fixed OverflowError in the 'unicode-escape' codec ( #4058 )
...
and in codecs.escape_decode() when decode an escaped non-ascii byte.
2017-10-20 17:08:15 +03:00
Jelle Zijlstra
ac317700ce
bpo-30406: Make async and await proper keywords ( #1669 )
...
Per PEP 492, 'async' and 'await' should become proper keywords in 3.7.
2017-10-05 23:24:46 -04:00
Oren Milman
7dc46d8cf5
bpo-31592: Fix an assertion failure in Python parser in case of a bad unicodedata.normalize(). ( #3767 )
2017-09-30 20:16:24 +03:00
Barry Warsaw
b2e5794870
bpo-31338 ( #3374 )
...
* Add Py_UNREACHABLE() as an alias to abort().
* Use Py_UNREACHABLE() instead of assert(0)
* Convert more unreachable code to use Py_UNREACHABLE()
* Document Py_UNREACHABLE() and a few other macros.
2017-09-14 18:13:16 -07:00
Łukasz Langa
e7c566caf1
bpo-30465: Fix lineno and col_offset in fstring AST nodes ( #1800 )
...
For f-string ast nodes, fix the line and columns so that tools such as flake8 can identify them correctly.
2017-09-06 17:27:58 -07:00
Stefan Krah
f432a3234f
bpo-30923: Silence fall-through warnings included in -Wextra since gcc-7.0. ( #3157 )
2017-08-21 13:09:59 +02:00
ericvsmith
11e97f2f80
bpo-30682: Removed a too-strict assertion that failed for certain f-strings. ( #2232 )
...
This caused a segfault on eval("f'\\\n'") and eval("f'\\\r'") in debug build.
2017-06-16 13:19:32 +03:00
Serhiy Storchaka
2e9cd5825c
bpo-30529: Fix errors for invalid whitespaces in f-string subexpressions. ( #1888 )
...
'invalid character in identifier' now is raised instead of
'f-string: empty expression not allowed' if a subexpression contains
only whitespaces and they are not accepted by Python parser.
2017-06-08 23:43:54 +03:00
Serhiy Storchaka
0cd7a3f196
bpo-29104: Fixed parsing backslashes in f-strings. ( #490 )
2017-05-25 13:33:55 +03:00
Serhiy Storchaka
fff9a31a91
bpo-29865: Use PyXXX_GET_SIZE macros rather than Py_SIZE for concrete types. ( #748 )
2017-03-21 08:53:25 +02:00
INADA Naoki
cb41b2766d
bpo-29463: Add docstring field to some AST nodes. ( #46 )
...
* bpo-29463: Add docstring field to some AST nodes.
ClassDef, ModuleDef, FunctionDef, and AsyncFunctionDef has docstring
field for now. It was first statement of there body.
* fix document. thanks travis!
* doc fixes
2017-02-22 16:31:59 +01:00
Serhiy Storchaka
5bb8b9134b
Issue #18896 : Python function can now have more than 255 parameters.
...
collections.namedtuple() now supports tuples with more than 255 elements.
2016-12-16 19:19:02 +02:00
Serhiy Storchaka
0f6373c34f
Issue #28739 : f-string expressions no longer accepted as docstrings and
...
by ast.literal_eval() even if they do not include subexpressions.
2016-12-11 19:39:36 +02:00
Serhiy Storchaka
4cc30ae313
Issue #28739 : f-string expressions no longer accepted as docstrings and
...
by ast.literal_eval() even if they do not include subexpressions.
2016-12-11 19:37:19 +02:00
Serhiy Storchaka
214678e44b
Issue #12844 : More than 255 arguments can now be passed to a function.
2016-11-28 10:52:05 +02:00
Serhiy Storchaka
e20973926a
Issue #28715 : Added error checks for PyUnicode_AsUTF8().
2016-11-20 08:48:07 +02:00
Serhiy Storchaka
144f77a981
Issue #28715 : Added error checks for PyUnicode_AsUTF8().
2016-11-20 08:47:21 +02:00
Serhiy Storchaka
3b73ea1278
Issue #28701 : Replace PyUnicode_CompareWithASCIIString with _PyUnicode_EqualToASCIIString.
...
The latter function is more readable, faster and doesn't raise exceptions.
2016-11-16 10:19:20 +02:00
Serhiy Storchaka
f4934ea77d
Issue #28701 : Replace PyUnicode_CompareWithASCIIString with _PyUnicode_EqualToASCIIString.
...
The latter function is more readable, faster and doesn't raise exceptions.
2016-11-16 10:17:58 +02:00
Victor Stinner
f9cca365c7
Fix warn_invalid_escape_sequence()
...
Issue #28691 : Fix warn_invalid_escape_sequence(): handle correctly
DeprecationWarning raised as an exception. First clear the current exception to
replace the DeprecationWarning exception with a SyntaxError exception.
Unit test written by Serhiy Storchaka.
2016-11-15 09:12:10 +01:00
Yury Selivanov
1a9d687a49
Issue #26182 : Fix ia refleak in code that raises DeprecationWarning.
2016-11-08 16:54:18 -05:00
Eric V. Smith
9b88fdf4f0
Fixed issue #28633 : segfault when concatenating bytes literal and f-string.
2016-11-07 17:54:01 -05:00
Eric V. Smith
5646648678
Issue 28128: Print out better error/warning messages for invalid string escapes. Backport to 3.6.
2016-10-31 14:46:26 -04:00
Benjamin Peterson
286987bbac
delete dead code
2016-09-18 23:49:51 -07:00
Yury Selivanov
8987c9d219
Issue #26182 : Raise DeprecationWarning for improper use of async/await keywords
2016-09-15 12:50:23 -04:00
Eric V. Smith
09835dcdbb
Make an f-string error message more exact and consistent.
2016-09-11 18:58:20 -04:00
Benjamin Peterson
4ba5c88a3f
just start with an int rather than casting
2016-09-09 19:31:12 -07:00
Eric V. Smith
451d0e38fc
Issue 27948: Allow backslashes in the literal string portion of f-strings, but not in the expressions. Also, require expressions to begin and end with literal curly braces.
2016-09-09 21:56:20 -04:00
Brett Cannon
a721abac29
Issue #26331 : Implement the parsing part of PEP 515.
...
Thanks to Georg Brandl for the patch.
2016-09-09 14:57:09 -07:00
Yury Selivanov
52c4e7cc84
Issue #28008 : Implement PEP 530 -- asynchronous comprehensions.
2016-09-09 10:36:01 -07:00
Yury Selivanov
f8cb8a16a3
Issue #27985 : Implement PEP 526 -- Syntax for Variable Annotations.
...
Patch by Ivan Levkivskyi.
2016-09-08 20:50:03 -07:00
Benjamin Peterson
2f8bfef158
replace PY_SIZE_MAX with SIZE_MAX
2016-09-07 09:26:18 -07:00
Eric V. Smith
6a4efce7a5
Closes issue 27921: Disallow backslashes anywhere in f-strings. This is a temporary restriction. In 3.6 beta 2, the plan is to again allow backslashes in the string parts of f-strings, but disallow them in the expression parts.
2016-09-03 09:18:34 -04:00
Martin Panter
02b75abf73
Merge spelling and grammar fixes from 3.5
2016-08-05 01:51:39 +00:00
Martin Panter
69332c1a64
Fix spelling and grammar in documentation and code comments
2016-08-04 13:07:31 +00:00
Serhiy Storchaka
fbd1523525
Issue #27352 : Correct the validation of the ImportFrom AST node and simplify
...
the implementation of the IMPORT_NAME opcode.
2016-06-27 21:39:12 +03:00
Berker Peksag
094c9c921c
Issue #23275 : Allow () = iterable assignment syntax
...
Documentation updates by Martin Panter.
2016-05-18 08:44:29 +03:00
Benjamin Peterson
9d66d4af06
remove unused c_encoding struct member
2016-02-25 23:25:14 -08:00
Benjamin Peterson
768921cf33
rewrite parsestr() so it's comprehensible; remove dead code
2016-02-25 23:13:53 -08:00
Benjamin Peterson
202803a0c0
c_encoding can never be NULL, which allows some code simplification
2016-02-25 22:34:45 -08:00
Victor Stinner
be59d1489b
Issue #26146 : enhance ast.Constant error message
...
Mention the name of the invalid type in error message of AST validation for
constants.
Suggestion made by Joseph Jevnik on a review.
2016-01-27 00:39:12 +01:00
Victor Stinner
726f6902ce
Fix a refleak in validate_constant()
...
Issue #26146 .
2016-01-27 00:11:47 +01:00
Victor Stinner
f2c1aa1661
Add ast.Constant
...
Issue #26146 : Add a new kind of AST node: ast.Constant. It can be used by
external AST optimizers, but the compiler does not emit directly such node.
An optimizer can replace the following AST nodes with ast.Constant:
* ast.NameConstant: None, False, True
* ast.Num: int, float, complex
* ast.Str: str
* ast.Bytes: bytes
* ast.Tuple if items are constants too: tuple
* frozenset
Update code to accept ast.Constant instead of ast.Num and/or ast.Str:
* compiler
* docstrings
* ast.literal_eval()
* Tools/parser/unparse.py
2016-01-26 00:40:57 +01:00
Georg Brandl
5c60ea3fa1
Fix two instances of wrong indentation.
2016-01-18 07:53:59 +01:00
Serhiy Storchaka
726fc139a5
Issue #20440 : More use of Py_SETREF.
...
This patch is manually crafted and contains changes that couldn't be handled
automatically.
2015-12-27 15:44:33 +02:00
Serhiy Storchaka
2d06e84455
Issue #25923 : Added the const qualifier to static constant arrays.
2015-12-25 19:53:18 +02:00
Victor Stinner
f9827ea618
Issue #25555 : Fix parser and AST: fill lineno and col_offset of "arg" node when
...
compiling AST from Python objects.
2015-11-06 17:01:48 +01:00
Victor Stinner
c106c68aeb
Issue #25555 : Fix parser and AST: fill lineno and col_offset of "arg" node when
...
compiling AST from Python objects.
2015-11-06 17:01:48 +01:00
Martin Panter
c2432f6edb
One more typo in a comment
2015-10-07 11:15:15 +00:00
Benjamin Peterson
00d4442979
merge 3.5 ( #25131 )
2015-09-25 22:44:55 -07:00
Benjamin Peterson
58b53953f8
make opening brace of container literals and comprehensions correspond to the line number and col offset of the AST node ( closes #25131 )
2015-09-25 22:44:43 -07:00
Eric V. Smith
1e5fcc3dea
Fixed error creation if the problem is an empty expression in an f-string: use ast_error instead of PyErr_SetString.
2015-09-24 08:52:04 -04:00
Eric V. Smith
1d44c41b0c
Move f-string compilation of the expression earlier, before the conversion character and format_spec are checked. This allows for error messages that more closely match what a user would expect.
2015-09-23 07:49:00 -04:00
Eric V. Smith
5567f89c6f
Issue #24779 : Remove unused rawmode parameter to unicode_decode.
2015-09-21 13:36:09 -04:00
Eric V. Smith
235a6f0984
Issue #24965 : Implement PEP 498 "Literal String Interpolation". Documentation is still needed, I'll open an issue for that.
2015-09-19 14:51:32 -04:00
Victor Stinner
00723e0353
Fix ast_for_atom()
...
Clear PyObject_Str() exception if it failed, ast_error() should not be called
with an exception set.
2015-09-03 12:57:11 +02:00
Yury Selivanov
1fa3652e59
Merge 3.5 (issue #24975 )
2015-09-02 15:50:04 -04:00
Yury Selivanov
b3d531348c
Issue #24975 : Fix AST compilation for PEP 448 syntax.
2015-09-01 16:10:49 -04:00
Eric V. Smith
163b5c668d
Fix a trivial typo.
2015-08-21 09:40:38 -04:00
Robert Collins
df395991f6
Issue #9232 : Support trailing commas in function declarations.
...
For example, "def f(*, a = 3,): pass" is now legal.
Patch from Mark Dickinson.
2015-08-12 08:00:06 +12:00
Yury Selivanov
14acf5f41d
Issue #24791 : Fix grammar regression for call syntax: 'g(*a or b)'.
2015-08-05 17:54:10 -04:00
Yury Selivanov
7544508f02
PEP 0492 -- Coroutines with async and await syntax. Issue #24017 .
2015-05-11 22:57:16 -04:00
Benjamin Peterson
025e9ebd0a
PEP 448: additional unpacking generalizations ( closes #2292 )
...
Patch by Neil Girdhar.
2015-05-05 20:16:41 -04:00
Victor Stinner
0c39b1b970
Initialize variables to prevent GCC warnings
2015-03-18 15:02:06 +01:00
Benjamin Peterson
f86d1fdab7
merge 3.4 ( #21295 )
2015-02-02 10:52:56 -05:00
Benjamin Peterson
7a66fc22ad
revert lineno and col_offset changes from #16795 ( closes #21295 )
2015-02-02 10:51:20 -05:00
Benjamin Peterson
d51374ed78
PEP 465: a dedicated infix operator for matrix multiplication ( closes #21176 )
2014-04-09 23:55:56 -04:00
Benjamin Peterson
0714b8b6ab
set line and column numbers for keyword-only arg nodes ( closes #20619 )
2014-02-13 19:22:14 -05:00
Benjamin Peterson
e84fde981d
set line and column numbers for keyword-only arg nodes ( closes #20619 )
2014-02-13 19:22:14 -05:00
Serhiy Storchaka
c679227e31
Issue #1772673 : The type of `char*` arguments now changed to `const char*`.
2013-10-19 21:03:34 +03:00
Antoine Pitrou
d01d396e7f
Issue #4555 : All exported C symbols are now prefixed with either "Py" or "_Py".
...
("make smelly" now clean)
2013-10-12 22:52:43 +02:00
Victor Stinner
14e461d5b9
Close #11619 : The parser and the import machinery do not encode Unicode
...
filenames anymore on Windows.
2013-08-26 22:28:21 +02:00
Christian Heimes
6f08d30afe
Fix potential NULL pointer dereferencing in ast module
...
CID 719690
2013-07-24 21:02:50 +02:00
Christian Heimes
72f562f719
Fix potential NULL pointer dereferencing in ast module
...
CID 719690
2013-07-24 21:02:17 +02:00
Victor Stinner
0fae8f9083
Issue #18408 : Fix ast_for_atom(), PyErr_Fetch(&type, &value, &tback) can set value to NULL
2013-07-17 21:51:42 +02:00
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.
2013-07-17 00:57:58 +02:00
Benjamin Peterson
aad1d87339
move declaration to top of block
2013-03-18 10:59:41 -07:00
Benjamin Peterson
cda75be02a
unify some ast.argument's attrs; change Attribute column offset ( closes #16795 )
...
Patch from Sven Brauch.
2013-03-18 10:48:58 -07:00
Serhiy Storchaka
b8cbba5877
Issue #12983 : Bytes literals with invalid \x escape now raise a SyntaxError
...
and a full traceback including line number.
2013-02-10 17:43:25 +02:00
Serhiy Storchaka
801d955f04
Issue #12983 : Bytes literals with invalid \x escape now raise a SyntaxError
...
and a full traceback including line number.
2013-02-10 17:42:01 +02:00
Serhiy Storchaka
5e61f14c6d
Issue #12983 : Bytes literals with invalid \x escape now raise a SyntaxError
...
and a full traceback including line number.
2013-02-10 17:36:00 +02:00
Antoine Pitrou
8ad5b07ccb
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), mpdecimal (needs to build without Python.h).
2013-02-09 23:16:51 +01:00
Antoine Pitrou
c73c561181
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), mpdecimal (needs to build without Python.h).
2013-02-09 23:14:42 +01:00
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).
2013-02-09 23:11:27 +01:00
Benjamin Peterson
442f20996d
create NameConstant AST class for None, True, and False literals ( closes #16619 )
2012-12-06 17:41:04 -05:00
Mark Dickinson
ded35aeb9d
Issue #16546 : make ast.YieldFrom argument mandatory.
2012-11-25 14:36:26 +00:00
Christian Heimes
10e85ded9b
Fixed memory leak in error branch of parsestrplus. CID 715374 Variable s going out of scope leaks the storage it points to.
2012-09-10 16:53:28 +02:00
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.
2012-09-10 16:52:42 +02:00
Benjamin Peterson
d40528fe9a
merge 3.2
2012-09-02 16:37:09 -04:00
Benjamin Peterson
c7dedb0945
put * in the normal place
2012-09-02 16:36:01 -04:00
Benjamin Peterson
bd0df50fb6
get rid of ast_error_finish by passing the compiling struct to ast_error
2012-09-02 15:04:51 -04:00
Benjamin Peterson
e9f72dbf0d
merge 3.2
2012-09-02 14:38:15 -04:00
Benjamin Peterson
c5d7518a2e
move variable decl to the top of the function
2012-09-02 14:38:08 -04:00
Benjamin Peterson
c7f447c89f
merge 3.2 ( #15846 )
2012-09-02 14:24:44 -04:00
Benjamin Peterson
2e2c903700
prevert ast errors from being normalized before ast_error_finish is called ( closes #15846 )
2012-09-02 14:23:15 -04:00
Stefan Krah
28a2ad556a
Check return value of asdl_seq_new(). Found by Coverity.
2012-08-20 16:07:38 +02:00
Benjamin Peterson
518cf94ad7
merge 3.2
2012-03-12 11:16:03 -07:00
Benjamin Peterson
3f3584695e
kill this disabled code
2012-03-12 11:15:48 -07:00
Benjamin Peterson
bebcd18b75
merge 3.2
2012-03-12 11:02:10 -07:00
Benjamin Peterson
bc4665ebcb
use correct naming convention
2012-03-12 11:00:41 -07:00
Armin Ronacher
6ecf77b3f8
Basic support for PEP 414 without docs or tests.
2012-03-04 12:04:06 +00:00
Benjamin Peterson
c64ae92bf1
fix indentation
2012-01-16 18:02:21 -05:00
Benjamin Peterson
c8909ddd28
break out switch at correct place
2012-01-16 17:44:12 -05:00
Benjamin Peterson
205ad61313
only finish error if one occurred
2012-01-16 17:31:43 -05:00
Benjamin Peterson
c0beabc2a5
move LINENO define to where it actually belongs
2012-01-16 17:29:05 -05:00
Benjamin Peterson
55e0043a51
streamline normalizer identification a bit
2012-01-16 17:22:31 -05:00
Benjamin Peterson
d3af6e30a2
fix spelling
2012-01-16 09:56:35 -05:00
Benjamin Peterson
de5827dcd2
invert condition (head bang)
2012-01-16 09:55:53 -05:00
Benjamin Peterson
0fa35ea8f3
fix possible refleaks
2012-01-16 09:50:48 -05:00
Benjamin Peterson
89f8b80202
use helpful PyUnicode_IS_ASCII macro
2012-01-16 09:49:20 -05:00
Benjamin Peterson
5eda913cd2
PyUnicode_DecodeUTF8 will always return a ready string
2012-01-16 09:47:42 -05:00
Benjamin Peterson
8f56e0909f
rewrite such that this actually makes sense
2012-01-16 09:42:36 -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
Martin v. Löwis
bd928fef42
Rename _Py_identifier to _Py_IDENTIFIER.
2011-10-14 10:20:37 +02:00
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.
2011-10-09 10:38:36 +02:00
Martin v. Löwis
d63a3b8beb
Implement PEP 393.
2011-09-28 07:41:54 +02:00
Benjamin Peterson
832bfe2ebd
add a AST validator ( closes #12575 )
2011-08-09 16:15:04 -05:00
Benjamin Peterson
267ca6cb23
merge 3.2
2011-06-20 21:40:46 -05:00
Benjamin Peterson
f63d615f8b
fix indentation
2011-06-20 21:40:19 -05:00
Benjamin Peterson
43af12b0b4
unify TryExcept and TryFinally ( closes #12199 )
2011-05-29 11:43:10 -05:00
Benjamin Peterson
bf1bbc1452
reflect with statements with multiple items in the AST ( closes #12106 )
2011-05-27 13:58:08 -05:00
Benjamin Peterson
59c90c6cb2
merge 3.2
2011-04-12 18:35:21 -05:00
Benjamin Peterson
62f8bcb0a4
merge 3.1
2011-04-12 18:34:30 -05:00
Benjamin Peterson
bd3e362089
make assigning to a bytes literal a syntax error ( closes #11506 )
2011-04-12 18:33:28 -05:00
Brett Cannon
b94767ff44
Issue #8914 : fix various warnings from the Clang static analyzer v254.
2011-02-22 20:15:44 +00:00
Georg Brandl
e5b99f0fb3
Remove redundant includes of headers that are already included by Python.h.
2010-11-30 09:41:01 +00:00
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).
........
2010-10-19 01:22:07 +00:00
Victor Stinner
2f2ed1f36c
Fix ast_error_finish() and err_input(): filename can be NULL
...
Fix my previous commit (r85569).
2010-10-16 13:42:53 +00:00
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.
2010-10-16 13:14:10 +00:00
Benjamin Peterson
d4efd9eb15
add column offset to all syntax errors
2010-09-20 23:02:10 +00:00
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.
........
2010-08-19 21:35:59 +00:00
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.
2010-08-19 21:32:38 +00:00
Amaury Forgeot d'Arc
fc34ac5fdd
Merged revisions 84209 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
........
2010-08-19 20:26:00 +00:00
Amaury Forgeot d'Arc
92dc80a8d8
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
2010-08-19 17:43:15 +00:00
Mark Dickinson
ce5b6c43bf
Revert r82044, since it changed the semantics of negated imaginary literals.
...
Before r82044, '-7j' became complex(0.0, -7.0); afterwards it was
complex(-0.0, -7.0). See issue 9011.
2010-06-30 10:34:53 +00:00
Mark Dickinson
a58eed9cca
Merged revisions 82043 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r82043 | mark.dickinson | 2010-06-17 13:33:22 +0100 (Thu, 17 Jun 2010) | 6 lines
Issue #9011 : Remove buggy and unnecessary ST->AST compilation code
dealing with unary minus applied to a constant. The removed code was
mutating the ST, causing a second compilation to fail. (The peephole
optimizer already takes care of optimizing this case, so there's no
lost optimization opportunity here.)
........
2010-06-17 12:37:17 +00:00
Mark Dickinson
d35a32e12e
Issue #9011 : Remove buggy and unnecessary ST->AST compilation code
...
dealing with unary minus applied to a constant. The removed code was
mutating the ST, causing a second compilation to fail. (The peephole
optimizer already takes care of optimizing this case, so there's no
lost optimization opportunity here.)
2010-06-17 12:33:22 +00:00
Antoine Pitrou
7f14f0d8a0
Recorded merge of revisions 81032 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/branches/py3k
................
r81032 | antoine.pitrou | 2010-05-09 17:52:27 +0200 (dim., 09 mai 2010) | 9 lines
Recorded merge of revisions 81029 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r81029 | antoine.pitrou | 2010-05-09 16:46:46 +0200 (dim., 09 mai 2010) | 3 lines
Untabify C files. Will watch buildbots.
........
................
2010-05-09 16:14:21 +00:00
Antoine Pitrou
f95a1b3c53
Recorded merge of revisions 81029 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/trunk
........
r81029 | antoine.pitrou | 2010-05-09 16:46:46 +0200 (dim., 09 mai 2010) | 3 lines
Untabify C files. Will watch buildbots.
........
2010-05-09 15:52:27 +00:00
Benjamin Peterson
7dc5ac5ec6
Merged revisions 75928 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r75928 | benjamin.peterson | 2009-10-28 16:59:39 -0500 (Wed, 28 Oct 2009) | 5 lines
in wide builds, avoid storing high unicode characters from source code with surrogates
This is accomplished by decoding with utf-32 instead of utf-16 on all builds.
The patch is by Adam Olsen.
........
2009-10-29 01:22:38 +00:00
Benjamin Peterson
b2e796aa27
in wide builds, avoid storing high unicode characters from source code with surrogates
...
This is accomplished by decoding with utf-32 instead of utf-16 on all builds.
The patch is by Adam Olsen.
2009-10-28 21:59:39 +00:00
Skip Montanaro
ba1e0f46ab
Issue 7147 - remove ability to attempt to build Python without complex number support (was broken anyway)
2009-10-18 14:25:35 +00:00
Benjamin Peterson
4fac706833
Merged revisions 75224 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/branches/py3k
................
r75224 | benjamin.peterson | 2009-10-03 15:27:13 -0500 (Sat, 03 Oct 2009) | 9 lines
Merged revisions 75223 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r75223 | benjamin.peterson | 2009-10-03 15:23:24 -0500 (Sat, 03 Oct 2009) | 1 line
#7050 fix a SystemError when using tuple unpacking and augmented assignment
........
................
2009-10-03 20:28:47 +00:00
Benjamin Peterson
bd27aef8a0
Merged revisions 75223 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/trunk
........
r75223 | benjamin.peterson | 2009-10-03 15:23:24 -0500 (Sat, 03 Oct 2009) | 1 line
#7050 fix a SystemError when using tuple unpacking and augmented assignment
........
2009-10-03 20:27:13 +00:00
Benjamin Peterson
defa04ec8b
star_expr now always has two nodes
2009-09-27 14:08:59 +00:00
Benjamin Peterson
4905e80c3d
fix an ambiguity in the grammar from the implementation of extended unpacking
...
(one which was strangely "resolved" by pgen)
This also kills the unused testlist1 rule and fixes parse tree validation of
extended unpacking.
2009-09-27 02:43:28 +00:00