Opened 6 years ago
Closed 6 years ago
#17321 closed defect (fixed)
doctest fixed Pynac RuntimeErrors
Reported by:  vbraun  Owned by:  

Priority:  major  Milestone:  sage6.8 
Component:  symbolics  Keywords:  
Cc:  burcin  Merged in:  
Authors:  Ralf Stephan  Reviewers:  Jeroen Demeyer 
Report Upstream:  N/A  Work issues:  
Branch:  420af54 (Commits, GitHub, GitLab)  Commit:  420af54c87bd9519a21656b94428d3cb9e2bad43 
Dependencies:  #18362  Stopgaps: 
Description (last modified by )
Series times variable raises the following exception:
sage: ex = sin(x).series(x==0, 3) * x sage: str(ex)  RuntimeError Traceback (most recent call last) <ipythoninput5c277618b0823> in <module>() > 1 str(ex) /mnt/disk/home/release/Sage/local/lib/python2.7/sitepackages/sage/structure/sage_object.so in sage.structure.sage_object.SageObject.__repr__ (build/cythonized/sage/structure/sage_object.c:1962)() /mnt/disk/home/release/Sage/local/lib/python2.7/sitepackages/sage/symbolic/expression.so in sage.symbolic.expression.Expression._repr_ (build/cythonized/sage/symbolic/expression.cpp:4749)() /mnt/disk/home/release/Sage/local/lib/python2.7/sitepackages/sage/symbolic/ring.so in sage.symbolic.ring.SymbolicRing._repr_element_ (build/cythonized/sage/symbolic/ring.cpp:8462)() RuntimeError: comparing typeid's
https://github.com/pynac/pynac/issues/22 https://github.com/pynac/pynac/issues/32 https://github.com/pynac/pynac/issues/33
Change History (14)
comment:1 followup: ↓ 2 Changed 6 years ago by
comment:2 in reply to: ↑ 1 Changed 6 years ago by
 Description modified (diff)
 Milestone changed from sage6.4 to sage6.7
 Report Upstream changed from N/A to Reported upstream. Developers acknowledge bug.
Also, from comment 16 of #12967:
sage: cmp(SR(oo), sqrt(2)) RuntimeError: comparing typeid's
comment:3 Changed 6 years ago by
 Dependencies set to pynac0.3.7
 Report Upstream changed from Reported upstream. Developers acknowledge bug. to Fixed upstream, in a later stable release.
With the latest commit in Pynac we now have:
sage: ex = sin(x).series(x==0, 3) * x sage: str(ex) 'x*(1*x + Order(x^3))' sage: cmp(SR(oo), sqrt(2)) 1 sage: bool(SR(oo) < sqrt(2)) False sage: bool(SR(oo) > sqrt(2)) False
This means there is no longer a runtime error, there is however still code missing in Pynac and Sage to correctly handle these requests (see #12967 and the discussion in #18393).
comment:4 Changed 6 years ago by
 Dependencies changed from pynac0.3.7 to #18362, #12967
 Description modified (diff)
 Report Upstream changed from Fixed upstream, in a later stable release. to N/A
comment:5 Changed 6 years ago by
 Milestone changed from sage6.7 to sage6.8
 Summary changed from Pynac RuntimeError: comparing typeid's to doctest fixed Pynac RuntimeErrors
The last of the cases given in the comments is now fixed in #18877, so this ticket should doctest all related ones.
comment:6 Changed 6 years ago by
 Dependencies changed from #18362, #12967 to #18362
comment:7 Changed 6 years ago by
Wrong, the cmp
problem still remains...
sage: cmp(SR(oo), sqrt(2)) 1 sage: cmp(SR(oo), sqrt(2)) 1 sage: cmp(sqrt(2), SR(oo)) 1 sage: cmp(sqrt(2), SR(oo)) 1
but this is clearly #16397 so this ticket should doctest the bool
fixes.
comment:8 Changed 6 years ago by
 Branch set to u/rws/doctest_fixed_pynac_runtimeerrors
comment:9 Changed 6 years ago by
 Commit set to 522bf961b6fc9fb06b236d62568f133128fdf7f8
 Status changed from new to needs_review
New commits:
522bf96  17321: doctest fixed Pynac RuntimeErrors

comment:10 Changed 6 years ago by
 Status changed from needs_review to needs_work
Please remove all those bool
s. You can just write assert(x > y)
or assert(not x > y)
.
comment:11 Changed 6 years ago by
 Commit changed from 522bf961b6fc9fb06b236d62568f133128fdf7f8 to 420af54c87bd9519a21656b94428d3cb9e2bad43
Branch pushed to git repo; I updated commit sha1. New commits:
420af54  17321: replace bool with assert in doctests

comment:12 Changed 6 years ago by
 Status changed from needs_work to needs_review
comment:13 Changed 6 years ago by
 Reviewers set to Jeroen Demeyer
 Status changed from needs_review to positive_review
comment:14 Changed 6 years ago by
 Branch changed from u/rws/doctest_fixed_pynac_runtimeerrors to 420af54c87bd9519a21656b94428d3cb9e2bad43
 Resolution set to fixed
 Status changed from positive_review to closed
I get the same(?) error in the current #7660.