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: get rid of some filter in classical geometries #24984
Comments
Branch: u/chapoton/24984 |
Commit: |
New commits:
|
comment:2
This should also be fixed:
Dima, could you please take care of that ? |
comment:3
Code like
can better be written as
|
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:5
ok, done |
Reviewer: Jeroen Demeyer |
comment:6
positive review if tests pass |
comment:7
Replying to @jdemeyer:
Sorry, how is this equivalent? The |
comment:8
the assignement will protest if the list has not the correct expected length, here 1 try (a,) = (4,5) |
comment:9
By the way, what's wrong with |
comment:10
problem in py3, filter is an iterator, and you cannot ask for V[0] |
comment:11
by the way, did you manage to get a python3-sage up and running ? |
comment:12
Replying to @fchapoton:
and where does one ask for V[0]? I'd rather apply
No, I'm not python3ised yet, sorry :-) |
comment:13
Replying to @fchapoton:
Right, this makes sense, thanks. |
comment:14
after the branch here, one does not longer ask for V[0]. Before, one did In principle, vanilla-sage 8.2.b8 should build and start with python3. Instructions:
Give it a try of you can. |
comment:15
this does not look like a right change
This is why I'd rather retain all the filters, you know... |
comment:16
well, I did a mistake, please correct it, and let us try to spend only a short time on the ticket, please.. |
comment:17
Would you mind if I try installing sage@py3 and provide a branch I don't have to wrap my poor brain around unnecessarily? Sorry, I am badly jetlagged and still somewhere between Japanese time an GMT... |
comment:18
This ticket has no urgency, and I like the branch as it is. Please take a rest, a nap, or a good night sleep. We will look at that later. EDIT: I have double-checked my changes after |
comment:19
before working on this, we ought to remedy the root cause of most doctest failures there, namely the fact that libgap is broken. Indeed:
It's really baffling kind of errors message... I was able to build sage@py3 capable of doctesting, following comment 14, with added #24343 and #24922. |
comment:20
Well, there are maybe thousands of issues remaining, some small and some big. Unicode problems are a large part of that. If we could fix the 3 tiny problems here quickly, I would prefer. Bot is morally green. |
Dependencies: #24990 |
comment:21
I believe we should first be able to test that these fixes actually work on py3, too, hence the dependence. Once libgap works, this should be a breeze to fix everything py3-related here. Moreover I actually like the code using filters, as it is using iterators (on py3) rather than explicit lists, which might lead to various performance gains. |
comment:22
I do not believe we should wait for any other ticket. Please consider seriously the awful amount of remaining work to get sage fully py3-compatible, and accept to let it go. I promise I will not try to remove filter everywhere else. |
comment:23
I am sorry, but indiscriminate replacing of iterators with eager iterable data structures is code vandalism, as it potentially degrades performance, and does more harm than good. Once the ability to properly test the code arrives, it becomes very easy. |
comment:25
I'll leave you to it. |
Changed reviewer from Jeroen Demeyer to none |
comment:28
Replying to @dimpase:
It's not "code vandalism". Currently the changes Frédéric has made here is just replacing some code with the exact equivalent (on Python 2) code that also works on Python 3. If you believe these algorithms can be improved by the use of iterators you're welcome to take a stab at it, but as currently written that is not the case. I can certainly see a couple small opportunities here, but it is not a priority as there is no regression here--the higher priority right now is getting Python 3 working. |
Reviewer: Erik Bray |
Changed branch from u/chapoton/24984 to |
Depends on #24460
CC: @dimpase
Component: python3
Author: Frédéric Chapoton
Branch/Commit:
227760d
Reviewer: Erik Bray
Issue created by migration from https://trac.sagemath.org/ticket/24984
The text was updated successfully, but these errors were encountered: