Opened 3 years ago
Last modified 3 months ago
#12482 new defect
isinstance failure on lazy imported class
Reported by: | nthiery | Owned by: | jason |
---|---|---|---|
Priority: | major | Milestone: | sage-6.4 |
Component: | misc | Keywords: | Cernay2012 |
Cc: | rishi, jason, rlm, rbradshaw | Merged in: | |
Authors: | Reviewers: | ||
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description (last modified by nthiery)
isinstance may fail on a lazy imported class, which can cause hard to track history-dependent failures (just been hit: #12483)::
sage: lazy_import('sage.rings.rational_field', 'RationalField') sage: isinstance(QQ, RationalField) False sage: isinstance(QQ, RationalField) True
Would there be a way to ensure that isinstance triggers the importing of the class *before* its use?
Change History (6)
comment:1 Changed 3 years ago by nthiery
- Description modified (diff)
comment:2 Changed 3 years ago by nthiery
- Keywords Cernay2012 added
comment:3 Changed 16 months ago by jdemeyer
- Milestone changed from sage-5.11 to sage-5.12
comment:4 Changed 10 months ago by vbraun_spam
- Milestone changed from sage-6.1 to sage-6.2
comment:5 Changed 7 months ago by vbraun_spam
- Milestone changed from sage-6.2 to sage-6.3
comment:6 Changed 3 months ago by vbraun_spam
- Milestone changed from sage-6.3 to sage-6.4
Note: See
TracTickets for help on using
tickets.