[issue28376] rangeiter_new fails when creating a range of step 0

2017-03-31 Thread Donald Stufft
Changes by Donald Stufft : -- pull_requests: +1098 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue28376] rangeiter_new fails when creating a range of step 0

2016-10-09 Thread Oren Milman
Oren Milman added the comment: Thanks for the reviews and patience :) -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsu

[issue28376] rangeiter_new fails when creating a range of step 0

2016-10-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset ee049edc3fff by Serhiy Storchaka in branch '3.5': Issue #28376: Fixed typos. https://hg.python.org/cpython/rev/ee049edc3fff New changeset e486f3d30e0e by Serhiy Storchaka in branch '3.5': Issue #28376: The constructor of range_iterator now checks th

[issue28376] rangeiter_new fails when creating a range of step 0

2016-10-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you for your contribution Oren. -- assignee: -> serhiy.storchaka resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker __

[issue28376] rangeiter_new fails when creating a range of step 0

2016-10-08 Thread Oren Milman
Oren Milman added the comment: Alright, just added 'with test.support.check_warnings(('', DeprecationWarning)):'. *ver4.diff is attached. I ran the tests again (this time using 'python_d.exe -We -m test -j3'), and they were successful :) That was totally my bad, of course, but anyway, ISTM tha

[issue28376] rangeiter_new fails when creating a range of step 0

2016-10-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thanks Oren. Patches for 3.5 and 3.7 LGTM, the patch for 3.6 should be fixed. Tests should pass with -Wa and -We. No need to attach test output. Just check that your patch doesn't add a regression. -- ___ Python

[issue28376] rangeiter_new fails when creating a range of step 0

2016-10-08 Thread Oren Milman
Changes by Oren Milman : Added file: http://bugs.python.org/file45021/patchedCPython37TestOutput_ver3.txt ___ Python tracker ___ ___ Python-bu

[issue28376] rangeiter_new fails when creating a range of step 0

2016-10-08 Thread Oren Milman
Changes by Oren Milman : Added file: http://bugs.python.org/file45019/issue28376_CPython37_ver3.diff ___ Python tracker ___ ___ Python-bugs-li

[issue28376] rangeiter_new fails when creating a range of step 0

2016-10-08 Thread Oren Milman
Oren Milman added the comment: The diff files for 3.6 and 3.7 are attached (named '*ver3.diff'). Changes: - in 3.6, added: * raising a DeprecationWarning in rangeiter_new * a test to verify the DeprecationWarning is raised - in 3.7: * changed the tests so they woul

[issue28376] rangeiter_new fails when creating a range of step 0

2016-10-08 Thread Oren Milman
Changes by Oren Milman : Added file: http://bugs.python.org/file45020/patchedCPython36TestOutput_ver3.txt ___ Python tracker ___ ___ Python-bu

[issue28376] rangeiter_new fails when creating a range of step 0

2016-10-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: And merged in a6eb6acfe04a. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscrib

[issue28376] rangeiter_new fails when creating a range of step 0

2016-10-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: rangeiter_new() was added in r55167. -- ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue28376] rangeiter_new fails when creating a range of step 0

2016-10-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Raising a DeprecationWarning in 3.6 doesn't hurt. -- ___ Python tracker ___ ___ Python-bugs-list m

[issue28376] rangeiter_new fails when creating a range of step 0

2016-10-07 Thread Oren Milman
Changes by Oren Milman : Added file: http://bugs.python.org/file45000/patchedCPython37TestOutput_ver2.txt ___ Python tracker ___ ___ Python-bu

[issue28376] rangeiter_new fails when creating a range of step 0

2016-10-07 Thread Oren Milman
Changes by Oren Milman : Added file: http://bugs.python.org/file44999/patchedCPython36TestOutput_ver2.txt ___ Python tracker ___ ___ Python-bu

[issue28376] rangeiter_new fails when creating a range of step 0

2016-10-07 Thread Oren Milman
Changes by Oren Milman : Added file: http://bugs.python.org/file44998/patchedCPython35TestOutput_ver2.txt ___ Python tracker ___ ___ Python-bu

[issue28376] rangeiter_new fails when creating a range of step 0

2016-10-07 Thread Oren Milman
Changes by Oren Milman : Added file: http://bugs.python.org/file44997/issue28376_CPython37_ver2.diff ___ Python tracker ___ ___ Python-bugs-li

[issue28376] rangeiter_new fails when creating a range of step 0

2016-10-07 Thread Oren Milman
Changes by Oren Milman : Added file: http://bugs.python.org/file44996/issue28376_CPython36_ver2.diff ___ Python tracker ___ ___ Python-bugs-li

[issue28376] rangeiter_new fails when creating a range of step 0

2016-10-07 Thread Oren Milman
Oren Milman added the comment: The diff files for 3.5 and 3.6 are attached (I only added @test.support.cpython_only, as you suggested). The diff file for 3.7 is also attached. It contains: - removing rangeiter_new - tests to verify one cannot create instances of range_iterator or longr

[issue28376] rangeiter_new fails when creating a range of step 0

2016-10-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Good point Naoki. I think we can remove tp_new method from range_iterator in 3.7. Seems it is never used. The patch LGTM for 3.5-3.6, but the test should be marked as CPython implementation detail (@support.cpython_only). -- ___

[issue28376] rangeiter_new fails when creating a range of step 0

2016-10-06 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +serhiy.storchaka versions: +Python 3.5, Python 3.6 ___ Python tracker ___ ___ Python-bugs-list

[issue28376] rangeiter_new fails when creating a range of step 0

2016-10-06 Thread INADA Naoki
INADA Naoki added the comment: patch is LGTM. But there is one hidden inconsistency: >>> r = range(2**100) >>> type(iter(r)) >>> type(iter(r))(1, 1, 0) Traceback (most recent call last): File "", line 1, in TypeError: cannot create 'longrange_iterator' instances Should we have same tp_new

[issue28376] rangeiter_new fails when creating a range of step 0

2016-10-06 Thread Emanuel Barry
Emanuel Barry added the comment: I'm not able to trigger an assertion error when running the latest trunk in debug mode. I get a "valid" range_iterator object though, and using __reduce__ gives me direct access to `range(0, 0, 0)` (which is completely worthless). Error or not, this should be f