Opened 4 years ago
Closed 4 years ago
#27268 closed defect (fixed)
py3: fix FriCAS interface
Reported by: | mantepse | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | sage-8.7 |
Component: | python3 | Keywords: | FriCAS |
Cc: | chapoton | Merged in: | |
Authors: | Martin Rubey | Reviewers: | Travis Scrimshaw |
Report Upstream: | N/A | Work issues: | |
Branch: | 9a6ec3d (Commits, GitHub, GitLab) | Commit: | 9a6ec3d8d28e6e1a345255652ad6fa935517cbda |
Dependencies: | #25899 | Stopgaps: |
Description (last modified by )
In python3, dict.items
cannot be indexed. The processing of rootOf
expression assumed this, so the design pattern must be changed.
Change History (12)
comment:1 Changed 4 years ago by
Branch: | → u/mantepse/py3__fix_fricas_interface |
---|
comment:2 Changed 4 years ago by
Authors: | → Martin Rubey |
---|---|
Cc: | chapoton added |
Commit: | → ec661060ac599f6b1c839f7bcf97efa4f772895a |
Component: | PLEASE CHANGE → python3 |
Dependencies: | → #25899 |
Description: | modified (diff) |
Status: | new → needs_review |
Type: | PLEASE CHANGE → defect |
comment:3 Changed 4 years ago by
comment:4 follow-up: 5 Changed 4 years ago by
comment:5 Changed 4 years ago by
Replying to mantepse:
... thank you for notifying me! ...
You can query Trac for all tickets whose summary contains "fricas":
comment:6 Changed 4 years ago by
Keywords: | FriCAS added |
---|
comment:7 Changed 4 years ago by
Commit: | ec661060ac599f6b1c839f7bcf97efa4f772895a → 9a6ec3d8d28e6e1a345255652ad6fa935517cbda |
---|
Branch pushed to git repo; I updated commit sha1. New commits:
9a6ec3d | Merge branch 'develop' of git://trac.sagemath.org/sage into t/27268/py3__fix_fricas_interface
|
comment:8 follow-up: 9 Changed 4 years ago by
Reviewers: | → Travis Scrimshaw |
---|---|
Status: | needs_review → positive_review |
Actually, the problem is this line: (var, poly) = rootOf.items()[i]
. The result of items()
is a view, which does not support indexing (in a way, think of it like an iterator). However, since your changes work and the code looks cleaner, positive review.
comment:9 Changed 4 years ago by
Replying to tscrim:
Actually, the problem is this line:
(var, poly) = rootOf.items()[i]
.
Yes, the error message and trace did show that.
The result of
items()
is a view, which does not support indexing (in a way, think of it like an iterator). However, since your changes work and the code looks cleaner, positive review.
General question: should I modify the ticket description once I know the root of the problem? The downside is that the history how the bugfix developed is sometimes not as easy to understand anymore.
comment:10 Changed 4 years ago by
Yes, in this case it probably is better to modify it so that people have an easier time seeing the issue (rather than reading the comments).
comment:11 Changed 4 years ago by
Description: | modified (diff) |
---|
comment:12 Changed 4 years ago by
Branch: | u/mantepse/py3__fix_fricas_interface → 9a6ec3d8d28e6e1a345255652ad6fa935517cbda |
---|---|
Resolution: | → fixed |
Status: | positive_review → closed |
New commits:
fix treatment of rootOf expressions for python3