|
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request. |
Sorry, something went wrong.
There was a problem hiding this comment.
We do need to add a NEWS blurb and a versionchanged entry to the docs.
Sorry, something went wrong.
|
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request. |
Sorry, something went wrong.
|
We're getting some test failures: ======================================================================
[3683](https://github.com/python/cpython/actions/runs/4006251040/jobs/6877559173#step:7:3684)
ERROR: test_sequence_del_slice (test.test_capi.test_misc.CAPITest.test_sequence_del_slice)
[3684](https://github.com/python/cpython/actions/runs/4006251040/jobs/6877559173#step:7:3685)
----------------------------------------------------------------------
[3685](https://github.com/python/cpython/actions/runs/4006251040/jobs/6877559173#step:7:3686)
Traceback (most recent call last):
[3686](https://github.com/python/cpython/actions/runs/4006251040/jobs/6877559173#step:7:3687)
File "/Users/runner/work/cpython/cpython/Lib/test/test_capi/test_misc.py", line 459, in test_sequence_del_slice
[3687](https://github.com/python/cpython/actions/runs/4006251040/jobs/6877559173#step:7:3688)
_testcapi.sequence_del_slice(mapping, 1, 3)
[3688](https://github.com/python/cpython/actions/runs/4006251040/jobs/6877559173#step:7:3689)
KeyError: slice(1, 3, None)
[3689](https://github.com/python/cpython/actions/runs/4006251040/jobs/6877559173#step:7:3690)
[3690](https://github.com/python/cpython/actions/runs/4006251040/jobs/6877559173#step:7:3691)
======================================================================
[3691](https://github.com/python/cpython/actions/runs/4006251040/jobs/6877559173#step:7:3692)
FAIL: test_sequence_set_slice (test.test_capi.test_misc.CAPITest.test_sequence_set_slice)
[3692](https://github.com/python/cpython/actions/runs/4006251040/jobs/6877559173#step:7:3693)
----------------------------------------------------------------------
[3693](https://github.com/python/cpython/actions/runs/4006251040/jobs/6877559173#step:7:3694)
Traceback (most recent call last):
[3694](https://github.com/python/cpython/actions/runs/4006251040/jobs/6877559173#step:7:3695)
File "/Users/runner/work/cpython/cpython/Lib/test/test_capi/test_misc.py", line 419, in test_sequence_set_slice
[3695](https://github.com/python/cpython/actions/runs/4006251040/jobs/6877559173#step:7:3696)
with self.assertRaises(TypeError):
[3696](https://github.com/python/cpython/actions/runs/4006251040/jobs/6877559173#step:7:3697)
AssertionError: TypeError not raised
[3697](https://github.com/python/cpython/actions/runs/4006251040/jobs/6877559173#step:7:3698)
|
Sorry, something went wrong.
|
It looks like the following test needs to be removed or changed as the expected behaviour would now be a KeyError as slice objects would now be valid as keys. cpython/Lib/test/test_capi/test_misc.py Lines 457 to 460 in b652d40 The following test can probably be modified to reflect the fact that mapping[1:3] = 'xy' would be valid and that mapping == {1: 'a', 2: 'b', 3: 'c', slice(1, 3, None): 'xy'}
is true afterwards: cpython/Lib/test/test_capi/test_misc.py Lines 418 to 421 in b652d40 |
Sorry, something went wrong.
|
Please correct me if I am wrong, but it looks like test_doctest() is failing because cpython/Lib/test/test_doctest.py Line 710 in 3eb12df @iritkatriel Apologies, but it looks like you were the last to modify this line. Does this sound about right to you? EDIT: I think I've figured it out (below)! |
Sorry, something went wrong.
|
I think I understand now why test_doctests() is failing. On my system, if I clone main, build it normally (non-debug), and compute len(tests) (see previous comment), I get 843. Now, if I clone your branch, build it normally (non-debug), I get 844 instead. The extra entry to tests is <DocTest builtins.slice.__hash__ from builtins:None (no examples)>, which isn't an element of tests on main. Now, running the tests (on your branch) with non-debug mode succeeds on my system. Once we build with --with-pydebug, however, this adds an additional entry to tests, namely, <DocTest builtins.set.test_c_api from builtins:None (no examples)> (whether on your branch or main), making the number on your branch 845, which makes cpython/Lib/test/test_doctest.py Line 710 in 3eb12df fail. So, I think what needs to be done now is for you to modify that line in test_doctest.py, say, to >>> 830 < len(tests) < 850
I have verified that test_doctests() passes after this change (both on non-debug and debug builds). For reference: >>> import builtins, doctest
>>> tests = doctest.DocTestFinder().find(builtins)
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.