#3970: [with patch, needs review] MaximaElements should not coerce into SR.
----------------------+-----------------------------------------------------
 Reporter:  mhansen   |       Owner:  burcin     
     Type:  defect    |      Status:  new        
 Priority:  minor     |   Milestone:  sage-4.1.3 
Component:  calculus  |    Keywords:             
 Reviewer:            |      Author:  Mike Hansen
   Merged:            |  
----------------------+-----------------------------------------------------

Comment(by awebb):

 I get an error with sage -t -long sage/symbolic/ring.pyx. I am not sure
 that I understand the patch as it seems to apply for both maxima and pari.
 Is this by intention?

 {{{
 sage -t -long "devel/sage-myver/sage/symbolic/ring.pyx"
 **********************************************************************
 File "/home/adamwebb/local/sage/devel/sage-myver/sage/symbolic/ring.pyx",
 line 97:
     sage: SR.coerce(pari(2/5))
 Exception raised:
     Traceback (most recent call last):
       File "/home/adamwebb/local/sage/local/bin/ncadoctest.py", line 1231,
 in run_one_test
         self.run_one_example(test, example, filename, compileflags)
       File "/home/adamwebb/local/sage/local/bin/sagedoctest.py", line 38,
 in run_one_example
         OrigDocTestRunner.run_one_example(self, test, example, filename,
 compileflags)
       File "/home/adamwebb/local/sage/local/bin/ncadoctest.py", line 1172,
 in run_one_example
         compileflags, 1) in test.globs
       File "<doctest __main__.example_7[3]>", line 1, in <module>
         SR.coerce(pari(Integer(2)/Integer(5)))###line 97:
     sage: SR.coerce(pari(2/5))
       File "parent.pyx", line 402, in sage.structure.parent.Parent.coerce
 (sage/structure/parent.c:4859)
       File "parent.pyx", line 429, in sage.structure.parent.Parent.coerce
 (sage/structure/parent.c:4806)
     TypeError: no canonical coercion from Interface to the PARI C library
 to Symbolic Ring
 **********************************************************************
 1 items had failures:
    1 of  12 in __main__.example_7
 ***Test Failed*** 1 failures.
 }}}

 if I put back the Pari stuff:
 {{{
 from sage.libs.pari.gen import PariInstance

 elif isinstance(R, (PariInstance)):
     return True
 }}}
 Then everything works.

 Cheers,
 Adam

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/3970#comment:6>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to