Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | gh-109120: Fix syntax error in handlinh of incorrect star expressions (#117444) | Grigoriev Semyon | 2024-04-02 | 1 | -1230/+1417 |
| | |||||
* | gh-117266: Fix crashes on user-created AST subclasses (GH-117276) | Jelle Zijlstra | 2024-03-28 | 1 | -2/+13 |
| | | | Fix crashes on user-created AST subclasses | ||||
* | bpo-24612: Improve syntax error for 'not' after an operator (GH-28170) | Pablo Galindo Salgado | 2024-03-26 | 1 | -594/+970 |
| | | | Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com> | ||||
* | gh-116437: Use new C API PyDict_Pop() to simplify the code (GH-116438) | Serhiy Storchaka | 2024-03-07 | 1 | -9/+9 |
| | |||||
* | gh-105858: Improve AST node constructors (#105880) | Jelle Zijlstra | 2024-02-28 | 1 | -7/+231 |
| | | | | | | | | | | | | | | | | | Demonstration: >>> ast.FunctionDef.__annotations__ {'name': <class 'str'>, 'args': <class 'ast.arguments'>, 'body': list[ast.stmt], 'decorator_list': list[ast.expr], 'returns': ast.expr | None, 'type_comment': str | None, 'type_params': list[ast.type_param]} >>> ast.FunctionDef() <stdin>:1: DeprecationWarning: FunctionDef.__init__ missing 1 required positional argument: 'name'. This will become an error in Python 3.15. <stdin>:1: DeprecationWarning: FunctionDef.__init__ missing 1 required positional argument: 'args'. This will become an error in Python 3.15. <ast.FunctionDef object at 0x101959460> >>> node = ast.FunctionDef(name="foo", args=ast.arguments()) >>> node.decorator_list [] >>> ast.FunctionDef(whatever="you want", name="x", args=ast.arguments()) <stdin>:1: DeprecationWarning: FunctionDef.__init__ got an unexpected keyword argument 'whatever'. Support for arbitrary keyword arguments is deprecated and will be removed in Python 3.15. <ast.FunctionDef object at 0x1019581f0> | ||||
* | gh-115823: Calculate correctly error locations when dealing with implicit ↵ | Pablo Galindo Salgado | 2024-02-26 | 1 | -11/+9 |
| | | | | encodings (#115824) | ||||
* | gh-115881: Ensure `ast.parse()` parses conditional context managers even ↵ | Alex Waygood | 2024-02-26 | 1 | -1/+1 |
| | | | | with low `feature_version` passed (#115920) | ||||
* | gh-113744: Add a new IncompleteInputError exception to improve incomplete ↵ | Pablo Galindo Salgado | 2024-01-30 | 1 | -1/+1 |
| | | | | | input detection in the codeop module (#113745) Signed-off-by: Pablo Galindo <pablogsal@gmail.com> | ||||
* | gh-114569: Use PyMem_* APIs for most non-PyObject uses (#114574) | Erlend E. Aasland | 2024-01-26 | 1 | -2/+2 |
| | | | Fix usage in Modules, Objects, and Parser subdirectories. | ||||
* | GH-113655: Lower the C recursion limit on various platforms (GH-113944) | Mark Shannon | 2024-01-16 | 1 | -3/+2 |
| | |||||
* | gh-111488: Changed error message in case of no 'in' keyword after 'for' in ↵ | Grigoriev Semyon | 2024-01-06 | 1 | -1592/+1785 |
| | | | | cmp (#113656) | ||||
* | gh-113703: Correctly identify incomplete f-strings in the codeop module ↵ | Pablo Galindo Salgado | 2024-01-05 | 1 | -2/+6 |
| | | | | (#113709) | ||||
* | gh-113602: Bail out when the parser tries to override existing errors (#113607) | Pablo Galindo Salgado | 2024-01-02 | 1 | -0/+4 |
| | | | Signed-off-by: Pablo Galindo <pablogsal@gmail.com> | ||||
* | gh-106905: Use separate structs to track recursion depth in each ↵ | Yilei Yang | 2023-12-25 | 1 | -25/+28 |
| | | | | | | PyAST_mod2obj call. (GH-113035) Co-authored-by: Gregory P. Smith [Google LLC] <greg@krypto.org> | ||||
* | gh-112943: Correctly compute end offsets for multiline tokens in the ↵ | Pablo Galindo Salgado | 2023-12-11 | 2 | -5/+12 |
| | | | | tokenize module (#112949) | ||||
* | Fix typos in variable names, function names, and comments (GH-101868) | Yang Hau | 2023-12-01 | 1 | -1/+1 |
| | |||||
* | gh-112387: Fix error positions for decoded strings with backwards tokenize ↵ | Pablo Galindo Salgado | 2023-11-27 | 1 | -0/+4 |
| | | | | | errors (#112409) Signed-off-by: Pablo Galindo <pablogsal@gmail.com> | ||||
* | gh-112388: Fix an error that was causing the parser to try to overwrite ↵ | Pablo Galindo Salgado | 2023-11-27 | 1 | -0/+4 |
| | | | | | tokenizer errors (#112410) Signed-off-by: Pablo Galindo <pablogsal@gmail.com> | ||||
* | gh-112243: Don't include comments in f-string debug expressions (#112284) | Pablo Galindo Salgado | 2023-11-20 | 1 | -6/+49 |
| | |||||
* | bpo-45759: Better error messages for non-matching 'elif'/'else' statements ↵ | Crowthebird | 2023-11-20 | 1 | -435/+533 |
| | | | | (#29513) | ||||
* | GH-111807: Lower the parser stack depth under WASI debug builds (#112225) | Brett Cannon | 2023-11-20 | 1 | -1/+5 |
| | |||||
* | gh-111956: Add thread-safe one-time initialization. (gh-111960) | Sam Gross | 2023-11-16 | 1 | -47/+42 |
| | |||||
* | gh-106905: avoid incorrect SystemError about recursion depth mismatch (#106906) | Markus Mohrhard | 2023-11-13 | 1 | -0/+1 |
| | | | | | | | | | | * gh-106905: avoid incorrect SystemError about recursion depth mismatch * Update Misc/NEWS.d/next/Core and Builtins/2023-07-20-11-41-16.gh-issue-106905.AyZpuB.rst --------- Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com> Co-authored-by: Serhiy Storchaka <storchaka@gmail.com> | ||||
* | Simplify _PyPegen_join_names_with_dot() (GH-111602) | Serhiy Storchaka | 2023-11-01 | 1 | -32/+2 |
| | |||||
* | gh-111420: Allow type comments in parenthesized `with` statements (#111468) | Tomas R | 2023-10-31 | 1 | -6/+9 |
| | |||||
* | gh-111380: Show SyntaxWarnings only once when parsing if invalid syntax is ↵ | Pablo Galindo Salgado | 2023-10-27 | 1 | -0/+5 |
| | | | | encouintered (#111381) | ||||
* | gh-100445: Improve error message for unterminated strings with escapes (#100446) | Shantanu | 2023-10-18 | 1 | -2/+16 |
| | |||||
* | gh-110938: Fix error messages for indented blocks with functions and classes ↵ | Pablo Galindo Salgado | 2023-10-17 | 1 | -19/+31 |
| | | | | with generic type parameters (#110973) | ||||
* | gh-107450: Remove unnecessary overflow check in parser error handler (#110940) | Lysandros Nikolaou | 2023-10-16 | 1 | -6/+0 |
| | |||||
* | gh-107450: Check for overflow in the tokenizer and fix overflow test (#110832) | Lysandros Nikolaou | 2023-10-16 | 2 | -0/+9 |
| | | | | Co-authored-by: Filipe Laíns <lains@riseup.net> Co-authored-by: Serhiy Storchaka <storchaka@gmail.com> | ||||
* | gh-110805: Allow the repl to show source code and complete tracebacks (#110775) | Pablo Galindo Salgado | 2023-10-13 | 3 | -3/+27 |
| | |||||
* | gh-107450: Raise OverflowError when parser column offset overflows (#110754) | Lysandros Nikolaou | 2023-10-12 | 1 | -0/+6 |
| | |||||
* | gh-110696: Fix incorrect syntax error message for incorrect argument ↵ | Pablo Galindo Salgado | 2023-10-12 | 1 | -1133/+1485 |
| | | | | unpacking (#110706) | ||||
* | gh-104169: Fix test_peg_generator after tokenizer refactoring (#110727) | Lysandros Nikolaou | 2023-10-12 | 2 | -4/+5 |
| | | | | * Fix test_peg_generator after tokenizer refactoring * Remove references to tokenizer.c in comments etc. | ||||
* | GH-110749: fix unistd.h import in file_tokenizer.c (#110750) | Filipe Laíns | 2023-10-12 | 1 | -4/+4 |
| | |||||
* | gh-104169: Refactor tokenizer into lexer and wrappers (#110684) | Lysandros Nikolaou | 2023-10-11 | 19 | -2978/+3075 |
| | | | | | | | | | | | * The lexer, which include the actual lexeme producing logic, goes into the `lexer` directory. * The wrappers, one wrapper per input mode (file, string, utf-8, and readline), go into the `tokenizer` directory and include logic for creating a lexer instance and managing the buffer for different modes. --------- Co-authored-by: Pablo Galindo <pablogsal@gmail.com> Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> | ||||
* | gh-110309: Prune empty constant in format specs (#110320) | sunmy2019 | 2023-10-05 | 1 | -10/+30 |
| | | | Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> | ||||
* | gh-110259: Fix f-strings with multiline expressions and format specs (#110271) | Pablo Galindo Salgado | 2023-10-05 | 1 | -6/+18 |
| | | | Signed-off-by: Pablo Galindo <pablogsal@gmail.com> | ||||
* | gh-110014: Include explicitly <unistd.h> header (#110155) | Victor Stinner | 2023-09-30 | 2 | -4/+10 |
| | | | | | | | | | | | * Remove unused <locale.h> includes. * Remove unused <fcntl.h> include in traceback.h. * Remove redundant <assert.h> and <stddef.h> includes. They are already included by "Python.h". * Remove <object.h> include in faulthandler.c. Python.h already includes it. * Add missing <stdbool.h> in pycore_pythread.h if HAVE_PTHREAD_STUBS is defined. * Fix also warnings in pthread_stubs.h: don't redefine macros if they are already defined, like the __NEED_pthread_t macro. | ||||
* | gh-109596: Ensure repeated rules in the grammar are not allowed and fix ↵ | Pablo Galindo Salgado | 2023-09-22 | 2 | -1208/+1180 |
| | | | | incorrect soft keywords (#109606) | ||||
* | gh-109114: Relax the check for invalid lambdas inside f-strings to avoid ↵ | Pablo Galindo Salgado | 2023-09-08 | 1 | -1124/+1065 |
| | | | | false positives (#109121) | ||||
* | GH-91079: Rename C_RECURSION_LIMIT to Py_C_RECURSION_LIMIT (#108507) | Victor Stinner | 2023-09-08 | 1 | -2/+2 |
| | | | | | | | Symbols of the C API should be prefixed by "Py_" to avoid conflict with existing names in 3rd party C extensions on "#include <Python.h>". test.pythoninfo now logs Py_C_RECURSION_LIMIT constant and other _testcapi and _testinternalcapi constants. | ||||
* | gh-88943: Improve syntax error for non-ASCII character that follows a ↵ | Serhiy Storchaka | 2023-09-07 | 1 | -1/+1 |
| | | | | | numerical literal (GH-109081) It now points on the invalid non-ASCII character, not on the valid numerical literal. | ||||
* | gh-108767: Replace ctype.h functions with pyctype.h functions (#108772) | Victor Stinner | 2023-09-01 | 1 | -19/+18 |
| | | | | | | | | | | | | | | Replace <ctype.h> locale dependent functions with Python "pyctype.h" locale independent functions: * Replace isalpha() with Py_ISALPHA(). * Replace isdigit() with Py_ISDIGIT(). * Replace isxdigit() with Py_ISXDIGIT(). * Replace tolower() with Py_TOLOWER(). Leave Modules/_sre/sre.c unchanged, it uses locale dependent functions on purpose. Include explicitly <ctype.h> in _decimal.c to get isascii(). | ||||
* | gh-108444: Remove _PyLong_AsInt() function (#108461) | Victor Stinner | 2023-08-25 | 1 | -1/+1 |
| | | | | * Update Parser/asdl_c.py to regenerate Python/Python-ast.c. * Remove _PyLong_AsInt() alias to PyLong_AsInt(). | ||||
* | gh-108179: Add error message for parser stack overflows (#108256) | Dennis Sweeney | 2023-08-22 | 3 | -1060/+540 |
| | |||||
* | gh-108216: Cleanup #include in internal header files (#108228) | Victor Stinner | 2023-08-21 | 1 | -1/+1 |
| | | | | | | | | | | | * Add missing includes. * Remove unused includes. * Update old include/symbol names to newer names. * Mention at least one included symbol. * Sort includes. * Update Tools/cases_generator/generate_cases.py used to generated pycore_opcode_metadata.h. * Update Parser/asdl_c.py used to generate pycore_ast.h. * Cleanup also includes in _testcapimodule.c and _testinternalcapi.c. | ||||
* | gh-108113: Make it possible to create an optimized AST (#108154) | Irit Katriel | 2023-08-21 | 1 | -0/+3 |
| | |||||
* | gh-107967: Fix infinite recursion on invalid escape sequence warning (#107968) | Lysandros Nikolaou | 2023-08-15 | 1 | -0/+3 |
| | |||||
* | GH-107263: Increase C stack limit for most functions, except ↵ | Mark Shannon | 2023-08-04 | 1 | -1/+1 |
| | | | | | | `_PyEval_EvalFrameDefault()` (GH-107535) * Set C recursion limit to 1500, set cost of eval loop to 2 frames, and compiler mutliply to 2. |