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
Replace __getslice__ with functionality in __getitem__ in several files (part 2) #12093
Comments
This comment has been minimized.
This comment has been minimized.
comment:1
Attachment: trac_12093.patch.gz Currently there is one failing test in
Suggestions to solve this problem are welcome. |
comment:2
What are in both case the types of "H" and say "H[1]"? I am actually not to worried here, I don't think the individual elements of H have ever been of type sage.structure.sequence.Sequence_generic I am suspecting that's just a type for the slice. In this context a list is probably just as valid. We should check what the test is supposed to "test", but it may just a test that slicing is working. Just looked at the file before posting, what is the actual output of the test? |
comment:3
In both cases the same types.
Output of the test without patch:
with patch:
|
comment:4
Seems like a fairly reasonable output to me does the doctest complains about formatting? If it is just that, I would just add a patch to take into account the new format. I may be able to test this a little bit later. |
Apply after trac_12093.patch |
comment:5
Attachment: trac_12093_2.patch.gz With the additional patch attachment: trac_12093_2.patch all tests passed. |
comment:6
That's interesting but you re-introduce some *slice. Do you know why/where they are needed? |
comment:7
list is a subclass of Sequence_generic hence Sequence_generic inherit |
comment:9
Replying to @a-andre:
An unfortunate fact but you are correct. At least the code for it is minimal and will be easily removable when needed. Could you please add a comment documenting what you said just before {{{getslice}} in the code? That would be very helpful for future reference. |
Attachment: trac_12093_comment.patch.gz Apply after trac_12093_2.patch |
comment:10
Replying to @kiwifb:
Done. |
comment:12
Where are we in the review? Does it all need a review, or do I need to check something at the end? (It's the last week of classes, so I'm kind of busy with end-of-semester things right now...) |
This comment has been minimized.
This comment has been minimized.
comment:13
I guess I am happy with the code and I already asked for extra stuff but it needs to be tested. I don't think it needs testing across a variety of platforms it either works or fails. André has already done some basic testing himself it needs crosschecking. |
Reviewer: François Bissey |
comment:14
I am giving this a positive review. I am happy with the code as it is and it does everything that is possible at the current time for these instances of *slice. |
comment:16
This should be rebased against #9958 + #9138 + #11900 (all included in sage-5.0.prealpha1) |
Work Issues: rebase |
based on sage-5.0.prealpha1 |
comment:17
Attachment: trac_12093.rebased.patch.gz I attached a rebased version and additionally changed the raise syntax preparing for Python 3 (see PEP 3109). Hope that's okay. |
This comment has been minimized.
This comment has been minimized.
Changed work issues from rebase to none |
comment:18
Apply trac_12093.rebased.patch (for the patchbot) |
Changed reviewer from François Bissey to François Bissey, David Loeffler |
comment:19
Looks good to me, and the patchbot seems happy too. Positive review. |
Merged: sage-5.0.beta9 |
__getslice__
has been deprecated for a long time in Python. This patch adds equivalent functionality to__getitem__
, which is where the functionality should be.See #12041 comment:4.
Apply:
CC: @kiwifb @jasongrout
Component: build
Author: André Apitzsch
Reviewer: François Bissey, David Loeffler
Merged: sage-5.0.beta9
Issue created by migration from https://trac.sagemath.org/ticket/12093
The text was updated successfully, but these errors were encountered: