[issue32888] Improve exception message in ast.literal_eval

2019-12-19 Thread Batuhan
Change by Batuhan : -- pull_requests: +17130 pull_request: https://github.com/python/cpython/pull/17662 ___ Python tracker ___ ___

[issue32888] Improve exception message in ast.literal_eval

2019-12-14 Thread Batuhan
Change by Batuhan : -- pull_requests: +17076 pull_request: https://github.com/python/cpython/pull/16620 ___ Python tracker ___ ___

[issue32888] Improve exception message in ast.literal_eval

2018-07-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Please wait until issue32892 and issue32893 be committed or rejected before merging this PR. -- dependencies: +Remove specific constant AST types in favor of ast.Constant, ast.literal_eval() shouldn't accept booleans as numbers in AST nosy:

[issue32888] Improve exception message in ast.literal_eval

2018-02-24 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: - ___ Python tracker ___

[issue32888] Improve exception message in ast.literal_eval

2018-02-20 Thread Chris Angelico
Chris Angelico added the comment: (BTW, by "proposed" I mean that the change that I describe is in the PR.) -- ___ Python tracker ___

[issue32888] Improve exception message in ast.literal_eval

2018-02-20 Thread Chris Angelico
Chris Angelico added the comment: Actually, it's a bit more complicated than I thought. Current proposed solution: Track the context of each conversion, thus allowing different errors to be distinguished. -- ___ Python tracker

[issue32888] Improve exception message in ast.literal_eval

2018-02-20 Thread Chris Angelico
Chris Angelico added the comment: Hmm, I think I see what I broke there. It was part of the merge conflict resolution - I moved the check into the function, which is actually incorrect. It wasn't misleading like that in the original patch. Will fix that. --

[issue32888] Improve exception message in ast.literal_eval

2018-02-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I afraid this makes an error message more confusing and misleading. >>> ast.literal_eval('~2') Traceback (most recent call last): File "", line 1, in File "/home/serhiy/py/cpython/Lib/ast.py", line 93, in literal_eval

[issue32888] Improve exception message in ast.literal_eval

2018-02-20 Thread Chris Angelico
Change by Chris Angelico : -- keywords: +patch pull_requests: +5558 stage: -> patch review ___ Python tracker ___

[issue32888] Improve exception message in ast.literal_eval

2018-02-20 Thread Chris Angelico
New submission from Chris Angelico : When a non-literal is given to literal_eval, attempt to be more helpful with the message, rather than calling it 'malformed'. -- components: Library (Lib) messages: 312423 nosy: Rosuav priority: normal pull_requests: severity: