#4278: [with patch, needs work] Old parent's don't correctly handle coerce maps
from Python's native types.
----------------------+-----------------------------------------------------
 Reporter:  mhansen   |        Owner:  robertwb
     Type:  defect    |       Status:  new     
 Priority:  major     |    Milestone:  sage-3.2
Component:  coercion  |   Resolution:          
 Keywords:            |  
----------------------+-----------------------------------------------------
Changes (by mabshoff):

  * summary:  [with patch, positive review] Old parent's don't correctly
              handle coerce maps from Python's native types.
              => [with patch, needs work] Old parent's don't
              correctly handle coerce maps from Python's
              native types.

Comment:

 I am seeing failures of the following kind:
 {{{
 sage -t  devel/sage/sage/structure/factorization.py
 **********************************************************************
 File "/scratch/mabshoff/release-
 cycle/sage-3.2.alpha0/tmp/factorization.py", line 114:
     sage: F = ModularSymbols(11,4).factorization()
 Exception raised:
     Traceback (most recent call last):
       File "/scratch/mabshoff/release-
 cycle/sage-3.2.alpha0/local/lib/python2.5/doctest.py", line 1228, in __run
         compileflags, 1) in test.globs
       File "<doctest __main__.example_0[35]>", line 1, in <module>
         F = ModularSymbols(Integer(11),Integer(4)).factorization()###line
 114:
     sage: F = ModularSymbols(11,4).factorization()
       File "/scratch/mabshoff/release-
 cycle/sage-3.2.alpha0/local/lib/python2.5/site-
 packages/sage/modular/modsym/ambient.py", line 1120, in factorization
         cond = 1 if chi is None   else   chi.conductor()
       File "/scratch/mabshoff/release-
 cycle/sage-3.2.alpha0/local/lib/python2.5/site-
 packages/sage/modular/dirichlet.py", line 476, in conductor
         if self.modulus() == 1 or self.is_trivial():
       File "/scratch/mabshoff/release-
 cycle/sage-3.2.alpha0/local/lib/python2.5/site-
 packages/sage/modular/dirichlet.py", line 899, in is_trivial
         z = self.element() == 0
       File "free_module_element.pyx", line 737, in
 sage.modules.free_module_element.FreeModuleElement.__richcmp__
 (sage/modules/free_module_element.c:5884)
       File "element.pyx", line 498, in
 sage.structure.element.Element._richcmp (sage/structure/element.c:4392)
         _left, _right = coercion_model.canonical_coercion(left, right)
       File "coerce.pyx", line 737, in
 sage.structure.coerce.CoercionModel_cache_maps.canonical_coercion
 (sage/structure/coerce.c:5743)
         coercions = self.coercion_maps(xp, yp)
       File "coerce.pyx", line 876, in
 sage.structure.coerce.CoercionModel_cache_maps.coercion_maps
 (sage/structure/coerce.c:6842)
         homs = self.discover_coercion(R, S)
       File "coerce.pyx", line 1011, in
 sage.structure.coerce.CoercionModel_cache_maps.discover_coercion
 (sage/structure/coerce.c:8090)
         mor = (<Parent>R).coerce_map_from(S)
       File "parent.pyx", line 923, in
 sage.structure.parent.Parent.coerce_map_from
 (sage/structure/parent.c:7576)
         mor = self.discover_coerce_map_from(S)
       File "parent.pyx", line 967, in
 sage.structure.parent.Parent.discover_coerce_map_from
 (sage/structure/parent.c:7860)
         cdef map.Map mor = self._coerce_map_from_(S)
       File "parent_old.pyx", line 584, in
 sage.structure.parent_old.Parent._coerce_map_from_
 (sage/structure/parent_old.c:5989)
         return self.coerce_map_from_c(S)
       File "parent_old.pyx", line 147, in
 sage.structure.parent_old.Parent.coerce_map_from_c
 (sage/structure/parent_old.c:1653)
         mor = mor*sage_type_mor
       File "map.pyx", line 162, in sage.categories.map.Map.__mul__
 (sage/categories/map.c:3177)
     AttributeError: 'NoneType' object has no attribute 'domain'
 **********************************************************************
 }}}

 A more complete list once doctesting finishes.

 Cheers,

 Michael

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/4278#comment:4>
Sage <http://sagemath.org/>
Sage - Open Source Mathematical Software: Building the Car Instead of 
Reinventing the Wheel
--~--~---------~--~----~------------~-------~--~----~
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