#5596: [with patch, needs work] refactor coercion to catch fewer exceptions
------------------------+---------------------------------------------------
   Reporter:  robertwb  |       Owner:  robertwb       
       Type:  defect    |      Status:  needs_work     
   Priority:  major     |   Milestone:  sage-4.2       
  Component:  coercion  |    Keywords:                 
Work_issues:            |      Author:  Robert Bradshaw
   Reviewer:            |      Merged:                 
------------------------+---------------------------------------------------
Changes (by newvalueoldvalue):

  * status:  positive_review => needs_work
  * author:  => Robert Bradshaw


Comment:

 I get the following failures against 4.1.2:

 {{{
 sage -t  "devel/sage-main/sage/modules/fg_pid/fgp_module.py"
 **********************************************************************
 File "/scratch/mhansen/release/4.2/alpha0/sage-4.2.alpha0/devel/sage-
 main/sage/modules/fg_pid/fgp_module.py", line 1280:
     sage: A._hom_from_smith(Sequence([B.0]), B)
 Exception raised:
     Traceback (most recent call last):
       File
 "/scratch/mhansen/release/4.2/alpha0/sage-4.2.alpha0/local/bin/ncadoctest.py",
 line 1231, in run_one_test
         self.run_one_example(test, example, filename, compileflags)
       File
 "/scratch/mhansen/release/4.2/alpha0/sage-4.2.alpha0/local/bin/sagedoctest.py",
 line 38, in run_one_example
         OrigDocTestRunner.run_one_example(self, test, example, filename,
 compileflags)
       File
 "/scratch/mhansen/release/4.2/alpha0/sage-4.2.alpha0/local/bin/ncadoctest.py",
 line 1172, in run_one_example
         compileflags, 1) in test.globs
       File "<doctest __main__.example_33[7]>", line 1, in <module>
         A._hom_from_smith(Sequence([B.gen(0)]), B)###line 1280:
     sage: A._hom_from_smith(Sequence([B.0]), B)
       File "sage_object.pyx", line 101, in
 sage.structure.sage_object.SageObject.__repr__
 (sage/structure/sage_object.c:1416)
       File
 "/scratch/mhansen/release/4.2/alpha0/sage-4.2.alpha0/local/lib/python
 /site-packages/sage/modules/fg_pid/fgp_morphism.py", line 131, in _repr_
         list(self.im_gens()))
       File
 "/scratch/mhansen/release/4.2/alpha0/sage-4.2.alpha0/local/lib/python
 /site-packages/sage/modules/fg_pid/fgp_morphism.py", line 149, in im_gens
         self.__im_gens = tuple([self(x) for x in self.domain().gens()])
       File "<doctest __main__.example_32[2]>", line 3, in gens
     NameError: global name 'tuple' is not defined
 **********************************************************************
 1 items had failures:
    1 of   8 in __main__.example_33
 ***Test Failed*** 1 failures.
 For whitespace errors, see the file
 /home/mhansen/.sage//tmp/.doctest_fgp_module.py
          [7.6 s]
 exit code: 1024


 sage -t -long "devel/sage-main/sage/calculus/wester.py"
 **********************************************************************
 File "/scratch/mhansen/release/4.2/alpha0/sage-4.2.alpha0/devel/sage-
 main/sage/calculus/wester.py", line 122:
     sage: bool(f == g)
 Exception raised:
     Traceback (most recent call last):
       File
 "/scratch/mhansen/release/4.2/alpha0/sage-4.2.alpha0/local/bin/ncadoctest.py",
 line 1231, in run_one_test
         self.run_one_example(test, example, filename, compileflags)
       File
 "/scratch/mhansen/release/4.2/alpha0/sage-4.2.alpha0/local/bin/sagedoctest.py",
 line 38, in run_one_example
         OrigDocTestRunner.run_one_example(self, test, example, filename,
 compileflags)
       File
 "/scratch/mhansen/release/4.2/alpha0/sage-4.2.alpha0/local/bin/ncadoctest.py",
 line 1172, in run_one_example
         compileflags, 1) in test.globs
       File "<doctest __main__.example_0[36]>", line 1, in <module>
         bool(f == g)###line 122:
     sage: bool(f == g)
       File "expression.pyx", line 1340, in
 sage.symbolic.expression.Expression.__nonzero__
 (sage/symbolic/expression.cpp:7786)
       File "expression.pyx", line 1483, in
 sage.symbolic.expression.Expression.test_relation
 (sage/symbolic/expression.cpp:9153)
       File "expression.pyx", line 2807, in
 sage.symbolic.expression.Expression.substitute
 (sage/symbolic/expression.cpp:13840)
       File "element.pyx", line 1177, in
 sage.structure.element.RingElement.__mul__ (sage/structure/element.c:9945)
       File "coerce.pyx", line 707, in
 sage.structure.coerce.CoercionModel_cache_maps.bin_op
 (sage/structure/coerce.c:6096)
       File "coerce.pyx", line 1160, in
 sage.structure.coerce.CoercionModel_cache_maps.get_action
 (sage/structure/coerce.c:10589)
       File "coerce.pyx", line 1283, in
 sage.structure.coerce.CoercionModel_cache_maps.discover_action
 (sage/structure/coerce.c:11682)
       File "parent.pyx", line 1203, in
 sage.structure.parent.Parent.get_action (sage/structure/parent.c:10828)
       File "parent_old.pyx", line 478, in
 sage.structure.parent_old.Parent._get_action_
 (sage/structure/parent_old.c:5974)
       File "parent_old.pyx", line 198, in
 sage.structure.parent_old.Parent.get_action_c
 (sage/structure/parent_old.c:2757)
       File "parent_old.pyx", line 210, in
 sage.structure.parent_old.Parent.get_action_impl
 (sage/structure/parent_old.c:3068)
       File "parent_old.pyx", line 214, in
 sage.structure.parent_old.Parent.get_action_c_impl
 (sage/structure/parent_old.c:3118)
       File "parent.pyx", line 1306, in
 sage.structure.parent.Parent.discover_action
 (sage/structure/parent.c:12094)
       File "coerce_actions.pyx", line 92, in
 sage.structure.coerce_actions.ModuleAction.__init__
 (sage/structure/coerce_actions.c:3415)
       File
 "/scratch/mhansen/release/4.2/alpha0/sage-4.2.alpha0/local/lib/python
 /site-packages/sage/categories/pushout.py", line 692, in pushout
         return all(Z)
       File
 "/scratch/mhansen/release/4.2/alpha0/sage-4.2.alpha0/local/lib/python
 /site-packages/sage/categories/pushout.py", line 64, in __call__
         R = c(R)
       File
 "/scratch/mhansen/release/4.2/alpha0/sage-4.2.alpha0/local/lib/python
 /site-packages/sage/categories/pushout.py", line 406, in __call__
         return R.completion(self.p, self.prec, self.extras)
       File
 "/scratch/mhansen/release/4.2/alpha0/sage-4.2.alpha0/local/lib/python
 /site-packages/sage/rings/number_field/number_field.py", line 1074, in
 completion
         return QQ.completion(p, prec, extras).algebraic_closure()
       File "ring.pyx", line 1752, in
 sage.rings.ring.Field.algebraic_closure (sage/rings/ring.c:9235)
     NotImplementedError: Algebraic closures of general fields not
 implemented.
 **********************************************************************
 1 items had failures:
    1 of 194 in __main__.example_0
 ***Test Failed*** 1 failures.
 For whitespace errors, see the file
 /home/mhansen/.sage//tmp/.doctest_wester.py
          [5.3 s]
 exit code: 1024
 }}}

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/5596#comment:13>
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