sobolevn
23f159ae71
gh-123562: Improve `SyntaxError` message for `case ... as a.b` ( #123563 )
2024-09-02 13:11:44 +02:00
sobolevn
e451a8937d
gh-123440: Improve error message for `except as` used with not a name ( #123442 )
2024-08-30 17:21:59 +01:00
Irit Katriel
d791b9815a
gh-122245: Add test case of generic type with __debug__ ( #122322 )
2024-07-26 18:40:36 +00:00
Irit Katriel
bc94cf7e25
gh-122245: move checks for writes and shadowing of __debug__ to symtable ( #122246 )
2024-07-26 14:39:56 +01:00
Bénédikt Tran
4bf17c381f
gh-119933: Improve ``SyntaxError`` message for invalid type parameters expressions ( #119976 )
...
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2024-06-17 06:51:03 -07:00
Petr Viktorin
31a4fb3c74
gh-119724: Revert "bpo-45759: Better error messages for non-matching 'elif'/'else' statements ( #29513 )" ( #119974 )
...
This reverts commit 1c8f912ebd
.
2024-06-03 18:10:15 -07:00
Nikita Sobolev
b60d4c0d53
gh-118090: Improve error message for empty type param brackets (GH-118091)
2024-05-07 14:01:06 +02:00
Irit Katriel
c1bf4874c1
gh-116767: fix crash on 'async with' with many context managers (GH-118348)
...
Account for `add_stopiteration_handler` pushing a block for `async with`.
To allow generator functions that previously almost hit the `CO_MAXBLOCKS`
limit by nesting non-async blocks, the limit is increased by 1.
This increase allows one more block in non-generator functions.
2024-05-01 13:01:16 +02:00
Nikita Sobolev
de1f686827
gh-118082: Improve `import` without names syntax error message ( #118083 )
2024-04-23 13:00:52 +01:00
Grigoriev Semyon
c97d3af239
gh-109120: Fix syntax error in handlinh of incorrect star expressions ( #117444 )
2024-04-02 11:42:58 +01:00
Pablo Galindo Salgado
61599a48f5
bpo-24612: Improve syntax error for 'not' after an operator (GH-28170)
...
Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
2024-03-26 10:30:46 +01:00
Grigoriev Semyon
bb4c167060
gh-111488: Changed error message in case of no 'in' keyword after 'for' in cmp ( #113656 )
2024-01-06 10:27:49 +00:00
Pablo Galindo Salgado
9ed36d533a
gh-113602: Bail out when the parser tries to override existing errors ( #113607 )
...
Signed-off-by: Pablo Galindo <pablogsal@gmail.com>
2024-01-02 13:00:52 +00:00
Irit Katriel
c31943af16
gh-113297: Fix segfault in compiler for with statement with 19 context managers ( #113327 )
2023-12-22 01:50:26 +00:00
Anthony Sottile
97cd45bfdb
Fix SyntaxWarning in test_syntax.py (GH-112944)
2023-12-11 11:48:52 +00:00
Pablo Galindo Salgado
45d648597b
gh-112387: Fix error positions for decoded strings with backwards tokenize errors ( #112409 )
...
Signed-off-by: Pablo Galindo <pablogsal@gmail.com>
2023-11-27 18:37:48 +00:00
Pablo Galindo Salgado
2c8b191742
gh-112388: Fix an error that was causing the parser to try to overwrite tokenizer errors ( #112410 )
...
Signed-off-by: Pablo Galindo <pablogsal@gmail.com>
2023-11-27 18:36:11 +00:00
Crowthebird
1c8f912ebd
bpo-45759: Better error messages for non-matching 'elif'/'else' statements ( #29513 )
2023-11-20 13:27:53 +00:00
Shantanu
3156d193b8
gh-100445: Improve error message for unterminated strings with escapes ( #100446 )
2023-10-18 13:58:51 +01:00
Nikita Sobolev
220bcc9e27
gh-110938: More syntax tests for PEP695 funcs and classes ( #110986 )
2023-10-17 22:00:04 -07:00
Pablo Galindo Salgado
24e4ec7766
gh-110938: Fix error messages for indented blocks with functions and classes with generic type parameters ( #110973 )
2023-10-17 13:45:13 +01:00
Pablo Galindo Salgado
3d180347ae
gh-110696: Fix incorrect syntax error message for incorrect argument unpacking ( #110706 )
2023-10-12 09:02:02 +00:00
Dennis Sweeney
86617518c4
gh-108179: Add error message for parser stack overflows ( #108256 )
2023-08-22 08:41:50 +01:00
Pablo Galindo Salgado
13237a2da8
gh-98931: Add custom error messages to invalid import/from with multiple targets ( #105985 )
...
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-06-22 15:56:40 +00:00
Jelle Zijlstra
97db2f3e07
gh-104572: Improve error messages for invalid constructs in PEP 695 contexts ( #104573 )
2023-05-17 06:05:42 -07:00
Nikita Sobolev
0fd3891758
gh-102310: Change error range for invalid bytes literals ( #103663 )
2023-04-22 18:08:27 -06:00
Dong-hee Na
e867c1b753
gh-101400: Fix incorrect lineno in exception message on continue/break which are not in a loop ( #101413 )
2023-01-30 23:33:54 +00:00
Pablo Galindo Salgado
97e7004cfe
gh-100050: Fix an assertion error when raising unclosed parenthesis errors in the tokenizer (GH-100065)
...
Automerge-Triggered-By: GH:pablogsal
2022-12-06 15:09:56 -08:00
Lysandros Nikolaou
6d8da238cc
gh-90994: Improve error messages upon call arguments syntax errors (GH-96893)
2022-11-21 00:15:05 +01:00
Lysandros Nikolaou
9c4232ae89
gh-99211: Point to except/except* on syntax errors when mixing them (GH-99215)
...
Automerge-Triggered-By: GH:lysnikolaou
2022-11-20 09:11:02 -08:00
Irit Katriel
61b6c40b64
gh-99153: set location on SyntaxError for try with both except and except* (GH-99160)
2022-11-06 15:36:19 +00:00
Pablo Galindo Salgado
395d4285bf
gh-98931: Improve error message when the user types 'import x from y' instead of 'from y import x' ( #98932 )
2022-11-01 13:01:20 +00:00
Lysandros Nikolaou
7e36abbb78
gh-91210: Improve error message when non-default param follows default (GH-95933)
...
- Improve error message when parameter without a default follows one with a default
- Show same error message when positional-only params precede the default/non-default sequence
2022-09-17 10:09:28 -07:00
Brandt Bucher
c7e5bbaee8
GH-95150: Use position and exception tables for code hashing and equality (GH-95509)
2022-08-01 11:02:56 -07:00
wookie184
8c237a7a71
gh-94192: Fix error for dictionary literals with invalid expression as value. ( #94304 )
...
* Fix error for dictionary literals with invalid expression as value.
* Remove trailing whitespace
2022-06-26 19:42:47 +01:00
wookie184
2fc83ac3af
gh-92858: Improve error message for some suites with syntax error before ':' ( #92894 )
2022-06-23 17:31:09 +01:00
Matthieu Dartiailh
aa0f056a00
bpo-47212: Improve error messages for un-parenthesized generator expressions (GH-32302)
2022-04-05 14:47:13 +01:00
Matthew Rahtz
e8e737bcf6
bpo-43224: Implement PEP 646 grammar changes (GH-31018)
...
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2022-03-26 09:55:35 -07:00
Pablo Galindo Salgado
7d810b6a4e
bpo-46838: Syntax error improvements for function definitions (GH-31590)
2022-03-22 11:38:41 +00:00
Serhiy Storchaka
6927632492
Remove trailing spaces (GH-31695)
2022-03-05 17:47:00 +02:00
Pablo Galindo Salgado
b71dc71905
bpo-46707: Avoid potential exponential backtracking in some syntax errors (GH-31241)
2022-02-10 03:37:17 +00:00
Pablo Galindo Salgado
a0efc0c196
bpo-46091: Correctly calculate indentation levels for whitespace lines with continuation characters (GH-30130)
2022-01-25 22:12:14 +00:00
Pablo Galindo Salgado
70f415fb8b
bpo-46240: Correct the error for unclosed parentheses when the tokenizer is not finished (GH-30378)
2022-01-04 10:41:22 +00:00
Pablo Galindo Salgado
dd6c35761a
bpo-46110: Restore commit e9898bf153
...
This restores commit e9898bf153
.
2022-01-03 19:54:06 +00:00
Pablo Galindo Salgado
9d35dedc5e
Revert "bpo-46110: Add a recursion check to avoid stack overflow in the PEG parser (GH-30177)" (GH-30363)
...
This reverts commit e9898bf153
temporarily as we want to confirm if this commit is the cause of a slowdown at startup time.
2022-01-03 18:29:18 +00:00
Pablo Galindo Salgado
e9898bf153
bpo-46110: Add a recursion check to avoid stack overflow in the PEG parser (GH-30177)
...
Co-authored-by: Batuhan Taskaya <isidentical@gmail.com>
2021-12-20 15:43:26 +00:00
Irit Katriel
d60457a667
bpo-45292: [PEP-654] add except* (GH-29581)
2021-12-14 16:48:15 +00:00
Pablo Galindo Salgado
81f4e116ef
bpo-45811: Improve error message when source code contains invisible control characters (GH-29654)
2021-11-20 18:28:28 +00:00
Pablo Galindo Salgado
7a1d932528
bpo-45450: Improve syntax error for parenthesized arguments (GH-28906)
2021-11-20 18:27:40 +00:00
Pablo Galindo Salgado
25835c518a
bpo-45738: Fix computation of error location for invalid continuation (GH-29550)
...
characters in the parser
2021-11-14 01:06:41 +00:00