New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
py3: replace <type by <... (in pyx files of rings folder) #24228
Comments
Commit: |
New commits:
|
Branch: u/chapoton/24228 |
This comment has been minimized.
This comment has been minimized.
comment:3
LGTM if green patchbot. |
Reviewer: Travis Scrimshaw |
comment:4
Thanks |
comment:5
Personally I'm -1 on changing this en mass, purely from the perspective of documentation quality. If these were all pure tests that aren't shown in the documentation that would be one thing, but when it comes to usage examples I don't like it. It would be nicer to just display one or the other (probably |
comment:6
I'm working on an update to the output checker to be flexible about this. Would you consider putting these tickets on hold instead? |
comment:8
Please see #24258 |
comment:9
I think it would cause more problems/confusion for the user to unexpectedly get something different than when they ran the test (assuming they understand From a quick look, a number of the tests probably could be better implemented to not create the output difference (i.e. explicitly test against the type or not have output). So we might also want to spend some effort on that rather than relying on workarounds. |
comment:10
Replying to @tscrim:
This is the problem with using doctests everywhere. From a documentation standpoint looking at the repr is more interesting. It depends, to me, if the test is in an "EXAMPLES" block or a "TESTS" block. In the former case I think it should be more interesting for reading purposes. Casual readers of the docs don't necessarily know what |
comment:11
We are in agreement that they are not pretty, but I think it is much better to show the differences between Python2 and Python3 doctests. Actually, perhaps the best solution would be the output flag suggested on #24261 along with writing better doctests in the cases we can. Thoughts? |
comment:12
It's better in cases that actually matter--this is just a trivial formatting difference that does not impact the validity of the relevant tests (one can invent a pathological case where it matters, such as replacing the builtin |
comment:13
Also, the point of #24261 is specifically for those relatively rare cases where there is an expected non-trivial difference in behavior between Python 2 and 3. Using it for this case would mean hundreds of examples like
See? It's silly when you look at it that way. |
comment:14
I see a bunch of these got merged anyways since I didn't change the status on them. I'd really prefer to undo that. |
comment:15
For the record, I will not actively oppose (up to suggesting changing the appropriate doctests to remove the compatibility issue), but I will not be reviewing those tickets either. |
comment:16
I still don't understand your opposition here. It feels like a bikeshed. We're just talking about making a few documentation examples work more easily testable. |
comment:17
Whatever you do, please beware of conflicts with #24350. I already had several merge conflicts because of changing |
comment:18
Replying to @embray:
How I see your proposal is that we should hide much more of the difference between Python2/3 by making the framework itself more complicated (and thus more prone to bugs). So IMO it is far from bikeshedding. But like I said, I am not opposing your proposal, but instead choosing not to support it. Really, we should have very minimal tests that honestly need to include a check that has the output type/class there. Some better (and more robust) checks would be to do |
comment:19
It's really not complicated... |
comment:21
Let us close this one as invalid for the time being, please. This will only become a serious issue when we can start to run the tests in python3. |
comment:22
Erik, could you please close this one ? |
Changed branch from u/chapoton/24228 to none |
Changed commit from |
part of #16085
CC: @embray
Component: python3
Author: Frédéric Chapoton
Reviewer: Travis Scrimshaw
Issue created by migration from https://trac.sagemath.org/ticket/24228
The text was updated successfully, but these errors were encountered: