Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | bpo-31241: Fix AST node position for list and generator comprehensions. ↵ | Serhiy Storchaka | 2018-11-27 | 1 | -17/+32 |
| | | | | | | | | (GH-10633) The lineno and col_offset attributes of AST nodes for list comprehensions, generator expressions and tuples are now point to the opening parenthesis or square brace. For tuples without parenthesis they point to the position of the first item. | ||||
* | bpo-18407: ast.c uses Py_ssize_t for asdl_seq_LEN() iterator (GH-10655) | Victor Stinner | 2018-11-22 | 1 | -9/+9 |
| | | | | | | | When iterating using asdl_seq_LEN(), use 'Py_ssize_t' type instead of 'int' for the iterator variable, to avoid downcast on 64-bit platforms. _Py_asdl_int_seq_new() now also ensures that the index is greater than or equal to 0. | ||||
* | bpo-35169: Improve error messages for forbidden assignments. (GH-10342) | Serhiy Storchaka | 2018-11-20 | 1 | -60/+46 |
| | |||||
* | bpo-34876: Change the lineno of the AST for decorated function and class. ↵ | Serhiy Storchaka | 2018-10-30 | 1 | -6/+0 |
| | | | | | | | (GH-9731) It was overridden by the lineno of the first decorator. Now it is the lineno of 'def' or 'class'. | ||||
* | bpo-32912: Replace a DeprecationWarning with a SyntaxWarning (GH-9652) | Serhiy Storchaka | 2018-10-19 | 1 | -3/+3 |
| | | | | for invalid escape sequences in string and bytes literals. | ||||
* | bpo-32892: Use ast.Constant instead of specific constant AST types. (GH-9445) | Serhiy Storchaka | 2018-09-27 | 1 | -54/+28 |
| | |||||
* | bpo-34683: Make SyntaxError column offsets consistently 1-indexed (gh-9338) | Ammar Askar | 2018-09-24 | 1 | -1/+1 |
| | | | | | | Also point to start of tokens in parsing errors. Fixes bpo-34683 | ||||
* | closes bpo-34641: Further restrict the LHS of keyword argument function call ↵ | Benjamin Peterson | 2018-09-13 | 1 | -14/+41 |
| | | | | syntax. (GH-9212) | ||||
* | Make sure the line comes from the same node as the col offset. (GH-9189) | Benjamin Peterson | 2018-09-11 | 1 | -3/+3 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Followup to 90fc8980bbcc5c7dcced3627fe172b0bfd193a3b. <!-- Thanks for your contribution! Please read this comment in its entirety. It's quite important. # Pull Request title It should be in the following format: ``` bpo-NNNN: Summary of the changes made ``` Where: bpo-NNNN refers to the issue number in the https://bugs.python.org. Most PRs will require an issue number. Trivial changes, like fixing a typo, do not need an issue. # Backport Pull Request title If this is a backport PR (PR made against branches other than `master`), please ensure that the PR title is in the following format: ``` [X.Y] <title from the original PR> (GH-NNNN) ``` Where: [X.Y] is the branch name, e.g. [3.6]. GH-NNNN refers to the PR number from `master`. --> | ||||
* | closes bpo-31902: Fix the col_offset attribute for ast.Async* nodes to point ↵ | guoci | 2018-09-11 | 1 | -18/+21 |
| | | | | | | to the "async" keyword. (GH-4175) Previously, col_offset points to the keyword after "async". | ||||
* | bpo-34457: Python/ast.c: Add missing NULL check to alias_for_import_name(). ↵ | Alexey Izbyshev | 2018-08-22 | 1 | -0/+2 |
| | | | | | (GH-8852) Reported by Svace static analyzer. | ||||
* | bpo-33691: Add _PyAST_GetDocString(). (GH-7236) | Serhiy Storchaka | 2018-05-30 | 1 | -0/+20 |
| | |||||
* | bpo-32911: Revert bpo-29463. (GH-7121) (GH-7197) | Serhiy Storchaka | 2018-05-29 | 1 | -63/+24 |
| | | | | | | Remove the docstring attribute of AST types and restore docstring expression as a first stmt in their body. Co-authored-by: INADA Naoki <methane@users.noreply.github.com> | ||||
* | fix error message in ast.c (#6776) | Jelle Zijlstra | 2018-05-13 | 1 | -1/+1 |
| | | | small_stmt -> compound_stmt | ||||
* | bpo-30465: Fix C downcast warning on Windows in ast.c (#6593) | Victor Stinner | 2018-04-30 | 1 | -1/+1 |
| | | | | ast.c: fstring_fix_node_location() downcasts a pointer difference to a C int. Replace int with Py_ssize_t to fix the compiler warning. | ||||
* | Don't hide unexpected errors in PyErr_WarnExplicitObject(). (#4585) | Serhiy Storchaka | 2017-12-01 | 1 | -9/+10 |
| | |||||
* | bpo-32023: Disallow genexprs without parenthesis in class definitions. (#4400) | Serhiy Storchaka | 2017-11-15 | 1 | -5/+10 |
| | |||||
* | bpo-32012: Disallow trailing comma after genexpr without parenthesis. (#4382) | Serhiy Storchaka | 2017-11-15 | 1 | -10/+9 |
| | |||||
* | Fix miscellaneous typos (#4275) | luzpaz | 2017-11-05 | 1 | -1/+1 |
| | |||||
* | bpo-31825: Fixed OverflowError in the 'unicode-escape' codec (#4058) | Serhiy Storchaka | 2017-10-20 | 1 | -1/+1 |
| | | | | and in codecs.escape_decode() when decode an escaped non-ascii byte. | ||||
* | bpo-30406: Make async and await proper keywords (#1669) | Jelle Zijlstra | 2017-10-06 | 1 | -40/+35 |
| | | | Per PEP 492, 'async' and 'await' should become proper keywords in 3.7. | ||||
* | bpo-31592: Fix an assertion failure in Python parser in case of a bad ↵ | Oren Milman | 2017-09-30 | 1 | -12/+16 |
| | | | | unicodedata.normalize(). (#3767) | ||||
* | bpo-31338 (#3374) | Barry Warsaw | 2017-09-15 | 1 | -4/+2 |
| | | | | | | | * 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. | ||||
* | bpo-30465: Fix lineno and col_offset in fstring AST nodes (#1800) | Łukasz Langa | 2017-09-07 | 1 | -5/+67 |
| | | | For f-string ast nodes, fix the line and columns so that tools such as flake8 can identify them correctly. | ||||
* | bpo-30923: Silence fall-through warnings included in -Wextra since gcc-7.0. ↵ | Stefan Krah | 2017-08-21 | 1 | -0/+3 |
| | | | | (#3157) | ||||
* | bpo-30682: Removed a too-strict assertion that failed for certain f-strings. ↵ | ericvsmith | 2017-06-16 | 1 | -2/+2 |
| | | | | | | (#2232) This caused a segfault on eval("f'\\\n'") and eval("f'\\\r'") in debug build. | ||||
* | bpo-30529: Fix errors for invalid whitespaces in f-string subexpressions. ↵ | Serhiy Storchaka | 2017-06-08 | 1 | -24/+7 |
| | | | | | | | | (#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. | ||||
* | bpo-29104: Fixed parsing backslashes in f-strings. (#490) | Serhiy Storchaka | 2017-05-25 | 1 | -21/+32 |
| | |||||
* | bpo-29865: Use PyXXX_GET_SIZE macros rather than Py_SIZE for concrete types. ↵ | Serhiy Storchaka | 2017-03-21 | 1 | -1/+1 |
| | | | | (#748) | ||||
* | bpo-29463: Add docstring field to some AST nodes. (#46) | INADA Naoki | 2017-02-22 | 1 | -26/+63 |
| | | | | | | | | | | | * 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 | ||||
* | Issue #18896: Python function can now have more than 255 parameters. | Serhiy Storchaka | 2016-12-16 | 1 | -5/+0 |
| | | | | collections.namedtuple() now supports tuples with more than 255 elements. | ||||
* | Issue #28739: f-string expressions no longer accepted as docstrings and | Serhiy Storchaka | 2016-12-11 | 1 | -6/+5 |
|\ | | | | | | | by ast.literal_eval() even if they do not include subexpressions. | ||||
| * | Issue #28739: f-string expressions no longer accepted as docstrings and | Serhiy Storchaka | 2016-12-11 | 1 | -6/+5 |
| | | | | | | | | by ast.literal_eval() even if they do not include subexpressions. | ||||
* | | Issue #12844: More than 255 arguments can now be passed to a function. | Serhiy Storchaka | 2016-11-28 | 1 | -5/+0 |
|/ | |||||
* | Issue #28715: Added error checks for PyUnicode_AsUTF8(). | Serhiy Storchaka | 2016-11-20 | 1 | -3/+5 |
|\ | |||||
| * | Issue #28715: Added error checks for PyUnicode_AsUTF8(). | Serhiy Storchaka | 2016-11-20 | 1 | -3/+5 |
| | | |||||
* | | Issue #28701: Replace PyUnicode_CompareWithASCIIString with ↵ | Serhiy Storchaka | 2016-11-16 | 1 | -4/+4 |
|\ \ | |/ | | | | | | | | | _PyUnicode_EqualToASCIIString. The latter function is more readable, faster and doesn't raise exceptions. | ||||
| * | Issue #28701: Replace PyUnicode_CompareWithASCIIString with ↵ | Serhiy Storchaka | 2016-11-16 | 1 | -2/+2 |
| | | | | | | | | | | | | _PyUnicode_EqualToASCIIString. The latter function is more readable, faster and doesn't raise exceptions. | ||||
* | | Fix warn_invalid_escape_sequence() | Victor Stinner | 2016-11-15 | 1 | -1/+7 |
| | | | | | | | | | | | | | | | | 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. | ||||
* | | Issue #26182: Fix ia refleak in code that raises DeprecationWarning. | Yury Selivanov | 2016-11-08 | 1 | -3/+5 |
| | | |||||
* | | Fixed issue #28633: segfault when concatenating bytes literal and f-string. | Eric V. Smith | 2016-11-07 | 1 | -4/+5 |
| | | |||||
* | | Issue 28128: Print out better error/warning messages for invalid string ↵ | Eric V. Smith | 2016-10-31 | 1 | -5/+61 |
| | | | | | | | | escapes. Backport to 3.6. | ||||
* | | delete dead code | Benjamin Peterson | 2016-09-19 | 1 | -3/+0 |
| | | |||||
* | | Issue #26182: Raise DeprecationWarning for improper use of async/await keywords | Yury Selivanov | 2016-09-15 | 1 | -0/+20 |
| | | |||||
* | | Make an f-string error message more exact and consistent. | Eric V. Smith | 2016-09-11 | 1 | -1/+1 |
| | | |||||
* | | just start with an int rather than casting | Benjamin Peterson | 2016-09-10 | 1 | -2/+2 |
| | | |||||
* | | Issue 27948: Allow backslashes in the literal string portion of f-strings, ↵ | Eric V. Smith | 2016-09-10 | 1 | -273/+211 |
| | | | | | | | | but not in the expressions. Also, require expressions to begin and end with literal curly braces. | ||||
* | | Issue #26331: Implement the parsing part of PEP 515. | Brett Cannon | 2016-09-09 | 1 | -1/+26 |
| | | | | | | | | Thanks to Georg Brandl for the patch. | ||||
* | | Issue #28008: Implement PEP 530 -- asynchronous comprehensions. | Yury Selivanov | 2016-09-09 | 1 | -11/+24 |
| | | |||||
* | | Issue #27985: Implement PEP 526 -- Syntax for Variable Annotations. | Yury Selivanov | 2016-09-09 | 1 | -2/+84 |
| | | | | | | | | Patch by Ivan Levkivskyi. |