Opened 10 years ago
Closed 10 years ago
#12041 closed defect (fixed)
Replace __getslice__ with functionality in __getitem__ in several files
Reported by: | aapitzsch | Owned by: | GeorgSWeber |
---|---|---|---|
Priority: | major | Milestone: | sage-4.8 |
Component: | build | Keywords: | |
Cc: | kini | Merged in: | sage-4.8.alpha3 |
Authors: | André Apitzsch | Reviewers: | François Bissey |
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description
__getslice__
has been deprecated for a long time in Python. This patch adds equivalent functionality to __getitem__
, which is where the functionality should be.
Attachments (1)
Change History (10)
Changed 10 years ago by
comment:1 Changed 10 years ago by
- Status changed from new to needs_review
comment:2 Changed 10 years ago by
comment:3 Changed 10 years ago by
- Cc kini added
comment:4 Changed 10 years ago by
Could you do these files as well:
warning: sage/modules/free_module_element.pyx:1:0: __getslice__, __setslice__, and __delslice__ are not supported by Python 3, use __getitem__, __setitem__, and __delitem__ instead warning: sage/modules/free_module_element.pyx:1:0: __getslice__, __setslice__, and __delslice__ are not supported by Python 3, use __getitem__, __setitem__, and __delitem__ instead warning: sage/rings/polynomial/polydict.pyx:1:0: __getslice__, __setslice__, and __delslice__ are not supported by Python 3, use __getitem__, __setitem__, and __delitem__ instead warning: sage/rings/polynomial/polynomial_gf2x.pyx:1:0: __getslice__, __setslice__, and __delslice__ are not supported by Python 3, use __getitem__, __setitem__, and __delitem__ instead warning: sage/rings/polynomial/polynomial_zmod_flint.pyx:1:0: __getslice__, __setslice__, and __delslice__ are not supported by Python 3, use __getitem__, __setitem__, and __delitem__ instead warning: sage/rings/polynomial/polynomial_element.pyx:1:0: __getslice__, __setslice__, and __delslice__ are not supported by Python 3, use __getitem__, __setitem__, and __delitem__ instead warning: sage/rings/polynomial/polynomial_zz_pex.pyx:1:0: __getslice__, __setslice__, and __delslice__ are not supported by Python 3, use __getitem__, __setitem__, and __delitem__ instead warning: sage/rings/polynomial/polynomial_modn_dense_ntl.pyx:1:0: __getslice__, __setslice__, and __delslice__ are not supported by Python 3, use __getitem__, __setitem__, and __delitem__ instead warning: sage/rings/polynomial/polynomial_modn_dense_ntl.pyx:1:0: __getslice__, __setslice__, and __delslice__ are not supported by Python 3, use __getitem__, __setitem__, and __delitem__ instead warning: sage/rings/polynomial/polynomial_modn_dense_ntl.pyx:1:0: __getslice__, __setslice__, and __delslice__ are not supported by Python 3, use __getitem__, __setitem__, and __delitem__ instead warning: sage/structure/parent.pyx:1:0: __getslice__, __setslice__, and __delslice__ are not supported by Python 3, use __getitem__, __setitem__, and __delitem__ instead
comment:5 Changed 10 years ago by
If it's okay I will do this later in another ticket. So it should be easier to review.
BTW. these files don't contain any __*slice__
function
sage/rings/polynomial/polynomial_gf2x.pyx sage/rings/polynomial/polynomial_zmod_flint.pyx sage/rings/polynomial/polynomial_zz_pex.pyx
comment:6 Changed 10 years ago by
I would be OK with that. I confess I didn't manually check all the files. I think it is because they include the following file:polynomial_template.pxi which does have "slice".
comment:7 Changed 10 years ago by
- Status changed from needs_review to positive_review
The title of the ticket is replace getslice in several files, not "all files" so I am inclined to give this a positive review in that any work on this is good. But more work will be needed in this area.
comment:8 Changed 10 years ago by
- Reviewers set to François Bissey
comment:9 Changed 10 years ago by
- Merged in set to sage-4.8.alpha3
- Resolution set to fixed
- Status changed from positive_review to closed
I have been waiting for this for a long time. I would have done it myself but I don't have the know-how. I'll check you have done everything. I actually thought some of these bits were dead code.