[issue17490] Improve ast.literal_eval test suite coverage

2020-10-02 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> rejected stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue17490] Improve ast.literal_eval test suite coverage

2020-10-02 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: -21504 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue17490] Improve ast.literal_eval test suite coverage

2020-10-01 Thread Guido van Rossum
Guido van Rossum added the comment: Hm, I don't think PR 22469 is relevant to this issue? -- ___ Python tracker ___ ___

[issue17490] Improve ast.literal_eval test suite coverage

2020-10-01 Thread Batuhan Taskaya
Change by Batuhan Taskaya : -- keywords: +patch pull_requests: +21504 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/22469 ___ Python tracker

[issue17490] Improve ast.literal_eval test suite coverage

2020-10-01 Thread Guido van Rossum
Guido van Rossum added the comment: I agree that it's better to just close this issue, the patch is 7 years old. -- nosy: +gvanrossum ___ Python tracker ___

[issue17490] Improve ast.literal_eval test suite coverage

2020-09-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: literal_eval() is not purposed to evaluate arbitrary arithmetic expressions. It is only purposed to handle strings produced by repr() of some simple builtin objects. repr(6j+3) is '(3+6j)', not '(6j+3)' and not '(6j--3)', so it accepts the former form and

[issue17490] Improve ast.literal_eval test suite coverage

2020-09-27 Thread Irit Katriel
Irit Katriel added the comment: I just noticed that the patch by Serhiy has unit tests for this case, expecting ValueError. So this is apprently a feature and not a bug. -- ___ Python tracker

[issue17490] Improve ast.literal_eval test suite coverage

2020-09-27 Thread Irit Katriel
Irit Katriel added the comment: I think this is a bug in literal_eval: >>> 3+6j (3+6j) >>> 6j+3 (3+6j) >>> ast.literal_eval('3+6j') (3+6j) >>> ast.literal_eval('6j+3') Traceback (most recent call last): File "", line 1, in File "C:\Users\User\src\cpython\lib\ast.py", line 105, in

[issue17490] Improve ast.literal_eval test suite coverage

2020-07-10 Thread Batuhan Taskaya
Change by Batuhan Taskaya : -- nosy: +BTaskaya ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue17490] Improve ast.literal_eval test suite coverage

2020-06-28 Thread Rahul Jha
Rahul Jha added the comment: Some of the test cases from Nick's patch are not passing on master: ast.literal_eval('') # raises SyntaxError; expected: ValueError ast.literal_eval('6j--3') # expected: 3+6j ast.literal_eval('(2j+4j)+(1+2)') # expected: 3+6j

[issue17490] Improve ast.literal_eval test suite coverage

2020-06-28 Thread Rahul Jha
Rahul Jha added the comment: Nick, hello! I'd like to take it onwards from here. -- nosy: +RJ722 ___ Python tracker ___ ___

[issue17490] Improve ast.literal_eval test suite coverage

2020-06-28 Thread Nick Coghlan
Nick Coghlan added the comment: Belatedly removing the issue assignment here, as I'm not actively working on this. I've also marked this as an easy newcomer friendly task, as all that's involved is taking the `test_ast.py` changes from

[issue17490] Improve ast.literal_eval test suite coverage

2018-11-22 Thread Nick Coghlan
Change by Nick Coghlan : -- assignee: -> ncoghlan ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue17490] Improve ast.literal_eval test suite coverage

2018-11-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Nick, do you mind to create a PR for new tests? Some additional tests were added since this issue was created. -- ___ Python tracker ___

[issue17490] Improve ast.literal_eval test suite coverage

2016-12-01 Thread Nick Coghlan
Nick Coghlan added the comment: Right, the only reason this is still open is because I thought the extra test cases might be interesting in their own right (just not interesting enough to sit down and apply). -- ___ Python tracker

[issue17490] Improve ast.literal_eval test suite coverage

2016-12-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I agreed with Raymond, the current version of the code looks clearer. -- nosy: +serhiy.storchaka ___ Python tracker

[issue17490] Improve ast.literal_eval test suite coverage

2016-11-30 Thread Nick Coghlan
Nick Coghlan added the comment: I don't know if the suggested test suite diff gives full coverage, but unless other improvements have been made to those tests in the meantime, it should give more coverage than we have right now. -- ___ Python

[issue17490] Improve ast.literal_eval test suite coverage

2016-11-30 Thread Julien Palard
Julien Palard added the comment: > I also discovered several holes in the test suite coverage while refactoring > it. Are they all tested in the current diff? -- nosy: +mdk ___ Python tracker

[issue17490] Improve ast.literal_eval test suite coverage

2013-03-21 Thread Nick Coghlan
Nick Coghlan added the comment: I don't think we should change the implementation, but I also discovered several holes in the test suite coverage while refactoring it. We should pursue some of the test suite changes, including switching them over to be data driven and take advantage of the