Opened 2 years ago
Closed 22 months ago
#30174 closed defect (fixed)
Trivial coercion Modules(QQ)(FiniteRankFreeModule(QQ, 3)) fails
Reported by:  Matthias Köppe  Owned by:  

Priority:  major  Milestone:  sage9.3 
Component:  categories  Keywords:  
Cc:  Eric Gourgoulhon, Travis Scrimshaw, Michael Jung  Merged in:  
Authors:  Michael Jung  Reviewers:  Travis Scrimshaw 
Report Upstream:  N/A  Work issues:  
Branch:  50ab4e3 (Commits, GitHub, GitLab)  Commit:  50ab4e32e7a9b20b89cd6fbee6ae56888f61c85a 
Dependencies:  Stopgaps: 
Description
(from #30094)
sage: Q3 = FiniteRankFreeModule(QQ, 3) sage: Q3 in Modules(QQ) True sage: Modules(QQ)(Q3) TypeError: 'FiniteRankFreeModule_with_category' object has no attribute 'vector_space' unable to coerce x (=3dimensional vector space over the Rational Field) into Category of vector spaces over Rational Field
Compare with:
sage: Modules(QQ)(QQ^3) Vector space of dimension 3 over Rational Field
Change History (10)
comment:1 Changed 2 years ago by
comment:2 Changed 2 years ago by
Milestone:  sage9.2 → sage9.3 

comment:3 Changed 22 months ago by
Milestone:  sage9.3 → sage9.4 

Setting new milestone based on a cursory review of ticket status, priority, and last modification date.
comment:4 Changed 22 months ago by
Branch:  → u/ghmjungmath/trivial_coercion_modules_qq__finiterankfreemodule_qq__3___fails 

comment:5 Changed 22 months ago by
Commit:  → 1a4962d3f44daf64643b11553f6cbd05663e5bd2 

Status:  new → needs_review 
That should solve it. __call__
is not supposed to be overwritten for children classes of Category
.
New commits:
1a4962d  Trac #30174: __call__ > _call_

comment:6 Changed 22 months ago by
Commit:  1a4962d3f44daf64643b11553f6cbd05663e5bd2 → 50ab4e32e7a9b20b89cd6fbee6ae56888f61c85a 

Branch pushed to git repo; I updated commit sha1. New commits:
50ab4e3  Trac #30174: add test to validate fix

comment:7 Changed 22 months ago by
Authors:  → Michael Jung 

Reviewers:  → Travis Scrimshaw 
LGTM once there is a green patchbot. Don't forget to add the author name.
comment:9 Changed 22 months ago by
Milestone:  sage9.4 → sage9.3 

Status:  needs_review → positive_review 
comment:10 Changed 22 months ago by
Branch:  u/ghmjungmath/trivial_coercion_modules_qq__finiterankfreemodule_qq__3___fails → 50ab4e32e7a9b20b89cd6fbee6ae56888f61c85a 

Resolution:  → fixed 
Status:  positive_review → closed 
Note: See
TracTickets for help on using
tickets.
tscrim, #30094 comment 4: