msg282258 - (view) |
Author: Marco Buttu (marco.buttu) * |
Date: 2016-12-02 22:28 |
With Python 3.7.0a0 and sphinx-build 1.4.9, this was the result before applying the patch: Doctest summary =============== 80 tests 8 failures in tests 0 failures in setup code 0 failures in cleanup code build finished with problems, 139 warnings. After applaying the patch there are 0 failures in 84 tests. All the doctests also pass with Python 3.6 and 3.5. I skipped three tests (doctest: +SKIP) because their output is random (iterating over dictionary keys). |
|
|
msg282292 - (view) |
Author: Brett Cannon (brett.cannon) *  |
Date: 2016-12-03 18:58 |
For the iteration of dictionary keys, can you pass the keys through sorted() to have a deterministic order? |
|
|
msg282297 - (view) |
Author: Marco Buttu (marco.buttu) * |
Date: 2016-12-03 19:40 |
I usually keep the code examples focused, because I think extra code added just in order to have more tests can get the example less clear. But of course, there is an important downside :/ So, if your policy and goal is to have a better coverage of the code examples, here is another patch that uses sorted(). Thank you very much for your time :-) |
|
|
msg282311 - (view) |
Author: Terry J. Reedy (terry.reedy) *  |
Date: 2016-12-03 23:26 |
Marco, thank you for adding more energy to improving the docs. #27200 is the master issue for fixing failing doc doctests. The goal is to be able to have a buildbot run 'make doctest' or the Windows equivalent and expect success. For this issue, I mildly agree with Brett. Adding sorted is something a user might do. But I am curious what policy Zack followed for the other 9 patches. |
|
|
msg282312 - (view) |
Author: Terry J. Reedy (terry.reedy) *  |
Date: 2016-12-03 23:27 |
For some reason, not obvious to me, these patches cannot be reviewed on Rietveld. |
|
|
msg282315 - (view) |
Author: Zachary Ware (zach.ware) *  |
Date: 2016-12-04 05:30 |
Indeed, thank you Marco for continuing this work! The patches that I committed [1] were mostly done by Jelle Zijlstra. There were not many tests that had dict ordering issues; but it looks like we used sorted() rather than list() in a few places. I think using sorted() here is fine as well (though for the third one, I'd recommend turning the list comprehension into a generator expression argument to sorted, rather than sticking sorted() in the middle of the listcomp). As far as why these patches are not compatible with Rietveld, they appear to have been generated by `diff` between two discrete files rather than by `hg diff` or `git diff`, and Reitveld can't find the files as named to be able to apply the patch. [1] Viewable in aggregate here: https://hg.python.org/cpython/rev/769355e031:d0302d8ecbc1 |
|
|
msg282325 - (view) |
Author: Marco Buttu (marco.buttu) * |
Date: 2016-12-04 09:23 |
Here is a 3rd patch. I used a generator expression argument to ``sorted()``, as recommend by Zachary. Thank you very much for all your suggestions |
|
|
msg282653 - (view) |
Author: Marco Buttu (marco.buttu) * |
Date: 2016-12-07 18:49 |
I attached a patch in issue 27200 that makes all doctests pass, so I close here. |
|
|