Opened 13 months ago
Closed 5 months ago
#30174 closed defect (fixed)
Trivial coercion Modules(QQ)(FiniteRankFreeModule(QQ, 3)) fails
Reported by:  mkoeppe  Owned by:  

Priority:  major  Milestone:  sage9.3 
Component:  categories  Keywords:  
Cc:  egourgoulhon, tscrim, ghmjungmath  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 13 months ago by
comment:2 Changed 12 months ago by
 Milestone changed from sage9.2 to sage9.3
comment:3 Changed 6 months ago by
 Milestone changed from sage9.3 to sage9.4
Setting new milestone based on a cursory review of ticket status, priority, and last modification date.
comment:4 Changed 6 months ago by
 Branch set to u/ghmjungmath/trivial_coercion_modules_qq__finiterankfreemodule_qq__3___fails
comment:5 Changed 6 months ago by
 Commit set to 1a4962d3f44daf64643b11553f6cbd05663e5bd2
 Status changed from new to 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 6 months ago by
 Commit changed from 1a4962d3f44daf64643b11553f6cbd05663e5bd2 to 50ab4e32e7a9b20b89cd6fbee6ae56888f61c85a
Branch pushed to git repo; I updated commit sha1. New commits:
50ab4e3  Trac #30174: add test to validate fix

comment:7 Changed 6 months ago by
 Reviewers set to Travis Scrimshaw
LGTM once there is a green patchbot. Don't forget to add the author name.
comment:8 Changed 6 months ago by
Patchbot is green.
comment:9 Changed 6 months ago by
 Milestone changed from sage9.4 to sage9.3
 Status changed from needs_review to positive_review
comment:10 Changed 5 months ago by
 Branch changed from u/ghmjungmath/trivial_coercion_modules_qq__finiterankfreemodule_qq__3___fails to 50ab4e32e7a9b20b89cd6fbee6ae56888f61c85a
 Resolution set to fixed
 Status changed from positive_review to closed
Note: See
TracTickets for help on using
tickets.
tscrim, #30094 comment 4: