Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | bpo-47212: Improve error messages for un-parenthesized generator expressions ↵ | Matthieu Dartiailh | 2022-04-05 | 3 | -4/+5 |
| | | | | (GH-32302) | ||||
* | bpo-46315: Use fopencookie only on Emscripten 3.x and newer (GH-32266) | Christian Heimes | 2022-04-02 | 1 | -1/+1 |
| | |||||
* | bpo-47126: Update to canonical PEP URLs specified by PEP 676 (GH-32124) | Hugo van Kemenade | 2022-03-30 | 1 | -1/+1 |
| | |||||
* | bpo-47129: Add more informative messages to f-string syntax errors (32127) | Maciej Górski | 2022-03-28 | 1 | -0/+5 |
| | | | | | | | | | | | | | * Add more informative messages to f-string syntax errors * 📜🤖 Added by blurb_it. * Fix whitespaces * Change error message * Remove the 'else' statement (as sugested in review) Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> | ||||
* | bpo-43224: Implement PEP 646 grammar changes (GH-31018) | Matthew Rahtz | 2022-03-26 | 1 | -2101/+2465 |
| | | | Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com> | ||||
* | bpo-47117: Don't crash if we fail to decode characters when the tokenizer ↵ | Pablo Galindo Salgado | 2022-03-26 | 1 | -2/+7 |
| | | | | | buffers are uninitialized (GH-32129) Automerge-Triggered-By: GH:pablogsal | ||||
* | bpo-46315: Use fopencookie() to avoid dup() in ↵ | Christian Heimes | 2022-03-22 | 1 | -6/+34 |
| | | | | | _PyTokenizer_FindEncodingFilename (GH-32033) WASI does not have dup() and Emscripten's emulation is slow. | ||||
* | bpo-46838: Syntax error improvements for function definitions (GH-31590) | Pablo Galindo Salgado | 2022-03-22 | 1 | -867/+3150 |
| | |||||
* | bpo-46920: Remove code that has explainers why it was disabled (GH-31813) | Oleg Iarygin | 2022-03-14 | 1 | -24/+0 |
| | |||||
* | bpo-46920: Remove disabled debug code added decades ago and likely ↵ | Oleg Iarygin | 2022-03-14 | 1 | -11/+0 |
| | | | | unnecessary (GH-31812) | ||||
* | bpo-46820: Fix a SyntaxError in a numeric literal followed by "not in" ↵ | Serhiy Storchaka | 2022-02-22 | 1 | -0/+3 |
| | | | | | | | (GH-31479) Fix parsing a numeric literal immediately (without spaces) followed by "not in" keywords, like in "1not in x". Now the parser only emits a warning, not a syntax error. | ||||
* | bpo-46762: Fix an assert failure in f-strings where > or < is the last ↵ | Eric V. Smith | 2022-02-16 | 1 | -10/+10 |
| | | | | character if the f-string is missing a trailing right brace. (#31365) | ||||
* | Don't print rejected tokens when using the debug flags in the parser (GH-31258) | Pablo Galindo Salgado | 2022-02-10 | 1 | -1/+0 |
| | |||||
* | Allow the parser to avoid nested processing of invalid rules (GH-31252) | Pablo Galindo Salgado | 2022-02-10 | 3 | -1044/+1033 |
| | |||||
* | bpo-46707: Avoid potential exponential backtracking in some syntax errors ↵ | Pablo Galindo Salgado | 2022-02-10 | 1 | -1015/+1020 |
| | | | | (GH-31241) | ||||
* | bpo-46541: Replace core use of _Py_IDENTIFIER() with statically initialized ↵ | Eric Snow | 2022-02-08 | 1 | -9/+10 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | global objects. (gh-30928) We're no longer using _Py_IDENTIFIER() (or _Py_static_string()) in any core CPython code. It is still used in a number of non-builtin stdlib modules. The replacement is: PyUnicodeObject (not pointer) fields under _PyRuntimeState, statically initialized as part of _PyRuntime. A new _Py_GET_GLOBAL_IDENTIFIER() macro facilitates lookup of the fields (along with _Py_GET_GLOBAL_STRING() for non-identifier strings). https://bugs.python.org/issue46541#msg411799 explains the rationale for this change. The core of the change is in: * (new) Include/internal/pycore_global_strings.h - the declarations for the global strings, along with the macros * Include/internal/pycore_runtime_init.h - added the static initializers for the global strings * Include/internal/pycore_global_objects.h - where the struct in pycore_global_strings.h is hooked into _PyRuntimeState * Tools/scripts/generate_global_objects.py - added generation of the global string declarations and static initializers I've also added a --check flag to generate_global_objects.py (along with make check-global-objects) to check for unused global strings. That check is added to the PR CI config. The remainder of this change updates the core code to use _Py_GET_GLOBAL_IDENTIFIER() instead of _Py_IDENTIFIER() and the related _Py*Id functions (likewise for _Py_GET_GLOBAL_STRING() instead of _Py_static_string()). This includes adding a few functions where there wasn't already an alternative to _Py*Id(), replacing the _Py_Identifier * parameter with PyObject *. The following are not changed (yet): * stop using _Py_IDENTIFIER() in the stdlib modules * (maybe) get rid of _Py_IDENTIFIER(), etc. entirely -- this may not be doable as at least one package on PyPI using this (private) API * (maybe) intern the strings during runtime init https://bugs.python.org/issue46541 | ||||
* | bpo-46521: Fix codeop to use a new partial-input mode of the parser (GH-31010) | Pablo Galindo Salgado | 2022-02-08 | 3 | -11/+31 |
| | |||||
* | bpo-14916: use specified tokenizer fd for file input (GH-31006) | Paul m. p. P | 2022-02-01 | 1 | -1/+1 |
| | | | | | | | | | | @pablogsal, sorry i failed to rebase to main, so i recreated https://github.com/python/cpython/pull/22190#issuecomment-1024633392 > PyRun_InteractiveOne\*() functions allow to explicitily set fd instead of stdin. but stdin was hardcoded in readline call. > This patch does not fix target file for prompt unlike original bpo one : prompt fd is unrelated to tokenizer source which could be read only. It is more of a bugfix regarding the docs : actual documentation say "prompt the user" so one would expect prompt to go on stdout not a file for both PyRun_InteractiveOne\*() and PyRun_InteractiveLoop\*(). Automerge-Triggered-By: GH:pablogsal | ||||
* | bpo-46091: Correctly calculate indentation levels for whitespace lines with ↵ | Pablo Galindo Salgado | 2022-01-25 | 1 | -13/+33 |
| | | | | continuation characters (GH-30130) | ||||
* | bpo-46503: Prevent an assert from firing when parsing some invalid \N ↵ | Eric V. Smith | 2022-01-25 | 1 | -2/+14 |
| | | | | | | | sequences in f-strings. (GH-30865) * bpo-46503: Prevent an assert from firing. Also fix one nearby tiny PEP-7 nit. * Added blurb. | ||||
* | Fix the caret position in some syntax errors in interactive mode (GH-30718) | Pablo Galindo Salgado | 2022-01-20 | 1 | -2/+3 |
| | |||||
* | bpo-46339: Include clarification on assert in ↵ | Pablo Galindo Salgado | 2022-01-18 | 1 | -0/+3 |
| | | | | 'get_error_line_from_tokenizer_buffers' (#30545) | ||||
* | bpo-46339: Fix crash in the parser when computing error text for multi-line ↵ | Pablo Galindo Salgado | 2022-01-11 | 1 | -2/+9 |
| | | | | | f-strings (GH-30529) Automerge-Triggered-By: GH:pablogsal | ||||
* | bpo-46237: Fix the line number of tokenizer errors inside f-strings (GH-30463) | Pablo Galindo Salgado | 2022-01-08 | 2 | -5/+8 |
| | |||||
* | bpo-46289: Make conversion of FormattedValue not optional on ASDL (GH-30467) | Batuhan Taskaya | 2022-01-07 | 1 | -1/+1 |
| | | | Automerge-Triggered-By: GH:isidentical | ||||
* | bpo-46240: Correct the error for unclosed parentheses when the tokenizer is ↵ | Pablo Galindo Salgado | 2022-01-04 | 1 | -1/+2 |
| | | | | not finished (GH-30378) | ||||
* | bpo-46110: Restore commit e9898bf153d26059261ffef11f7643ae991e2a4c | Pablo Galindo Salgado | 2022-01-03 | 2 | -3193/+4581 |
| | | | This restores commit e9898bf153d26059261ffef11f7643ae991e2a4c . | ||||
* | Revert "bpo-46110: Add a recursion check to avoid stack overflow in the PEG ↵ | Pablo Galindo Salgado | 2022-01-03 | 2 | -4581/+3193 |
| | | | | | parser (GH-30177)" (GH-30363) This reverts commit e9898bf153d26059261ffef11f7643ae991e2a4c temporarily as we want to confirm if this commit is the cause of a slowdown at startup time. | ||||
* | bpo-46110: Add a recursion check to avoid stack overflow in the PEG parser ↵ | Pablo Galindo Salgado | 2021-12-20 | 2 | -3193/+4581 |
| | | | | | (GH-30177) Co-authored-by: Batuhan Taskaya <isidentical@gmail.com> | ||||
* | bpo-45292: [PEP-654] add except* (GH-29581) | Irit Katriel | 2021-12-14 | 2 | -1776/+2721 |
| | |||||
* | bpo-45855: Replaced deprecated `PyImport_ImportModuleNoBlock` with ↵ | Kumar Aditya | 2021-12-12 | 2 | -2/+2 |
| | | | | PyImport_ImportModule (GH-30046) | ||||
* | bpo-46054: Fix parsing error when parsing non-utf8 characters in source ↵ | Pablo Galindo Salgado | 2021-12-12 | 1 | -8/+5 |
| | | | | files (GH-30068) | ||||
* | bpo-42918: Improve build-in function compile() in mode 'single' (GH-29934) | Weipeng Hong | 2021-12-10 | 1 | -19/+1 |
| | | | Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com> | ||||
* | bpo-46004: Fix error location for loops with invalid targets (GH-29959) | Pablo Galindo Salgado | 2021-12-07 | 1 | -1/+2 |
| | |||||
* | bpo-45866: pegen strips directory of "generated from" header (GH-29777) | Victor Stinner | 2021-11-26 | 1 | -1/+1 |
| | | | | | "make regen-all" now produces the same output when run from a directory other than the source tree: when building Python out of the source tree. | ||||
* | bpo-45727: Only trigger the 'did you forgot a comma' error suggestion if ↵ | Pablo Galindo Salgado | 2021-11-24 | 4 | -4/+7 |
| | | | | inside parentheses (GH-29757) | ||||
* | Ensure the str member of the tokenizer is always initialised (GH-29681) | Pablo Galindo Salgado | 2021-11-21 | 3 | -3/+3 |
| | |||||
* | Refactor parser compilation units into specific components (GH-29676) | Pablo Galindo Salgado | 2021-11-21 | 4 | -1868/+1894 |
| | |||||
* | bpo-45811: Improve error message when source code contains invisible control ↵ | Pablo Galindo Salgado | 2021-11-20 | 1 | -0/+6 |
| | | | | characters (GH-29654) | ||||
* | bpo-45450: Improve syntax error for parenthesized arguments (GH-28906) | Pablo Galindo Salgado | 2021-11-20 | 1 | -445/+849 |
| | |||||
* | bpo-45494: Fix error location in EOF tokenizer errors (GH-29108) | Pablo Galindo Salgado | 2021-11-20 | 1 | -2/+7 |
| | |||||
* | bpo-45848: Allow the parser to get error lines from encoded files (GH-29646) | Pablo Galindo Salgado | 2021-11-20 | 1 | -7/+8 |
| | |||||
* | bpo-45727: Make the syntax error for missing comma more consistent (GH-29427) | Pablo Galindo Salgado | 2021-11-19 | 2 | -22/+24 |
| | |||||
* | bpo-45822: Respect PEP 263's coding cookies in the parser even if flags are ↵ | Pablo Galindo Salgado | 2021-11-16 | 1 | -1/+1 |
| | | | | not provided (GH-29582) | ||||
* | bpo-45820: Fix a segfault when the parser fails without reading any input ↵ | Pablo Galindo Salgado | 2021-11-16 | 1 | -0/+8 |
| | | | | (GH-29580) | ||||
* | bpo-45738: Fix computation of error location for invalid continuation (GH-29550) | Pablo Galindo Salgado | 2021-11-14 | 2 | -11/+5 |
| | | | characters in the parser | ||||
* | bpo-45764: improve error message when missing '(' after 'def' (GH-29484) | Carl Friedrich Bolz-Tereick | 2021-11-09 | 1 | -12/+12 |
| | | | | | to achieve this, change the grammar to expect the '(' token after 'def' NAME. Automerge-Triggered-By: GH:pablogsal | ||||
* | bpo-45716: Improve the error message when using True/False/None as keywords ↵ | Pablo Galindo Salgado | 2021-11-05 | 1 | -689/+795 |
| | | | | in a call (GH-29413) | ||||
* | bpo-44257: fix "assigment_expr" typo + regenerate the grammar, and remove ↵ | wim glenn | 2021-11-03 | 1 | -60/+60 |
| | | | | | | unused imports (GH-29393) Co-authored-by: Wim Glenn <wglenn@jumptrading.com> | ||||
* | bpo-45562: Ensure all tokenizer debug messages are printed to stderr (GH-29270) | Pablo Galindo Salgado | 2021-10-28 | 1 | -1/+1 |
| |