#11575: Update PolyBoRi to release 0.8.0
-------------------------------+--------------------------------------------
   Reporter:  AlexanderDreyer  |          Owner:  AlexanderDreyer               
              
       Type:  enhancement      |         Status:  needs_review                  
              
   Priority:  major            |      Milestone:  sage-4.7.2                    
              
  Component:  packages         |       Keywords:                                
              
Work_issues:                   |       Upstream:  None of the above - read trac 
for reasoning.
   Reviewer:  Martin Albrecht  |         Author:  Alexander Dreyer              
              
     Merged:                   |   Dependencies:  #11574                        
              
-------------------------------+--------------------------------------------

Comment(by AlexanderDreyer):

 Here are the essential changes between the patches:
 {{{
 +--- a/sage/rings/polynomial/pbori.pyx
 ++++ b/sage/rings/polynomial/pbori.pyx

 @@ -1664,16 +1502,24 @@
           if PY_TYPE_CHECK(x, BooleanPolynomial):
               return x
  +        elif PY_TYPE_CHECK(x, BooleSet):
 -+            return (<BooleSet>x)._ring._coerce_(x)
 ++            return (<BooleSet>x)._ring(x)
           elif PY_TYPE_CHECK(x, BooleanMonomial):
 -             return (<BooleanMonomial>x)._ring._coerce_(x)
 +             return (<BooleanMonomial>x)._ring(x)
  -#new_BP_from_PBMonom((<BooleanMonomial>x)._ring,
 (<BooleanMonomial>x)._pbmonom)
 +-        else:
 +-            #return get_cring()._coerce_(x)
  +        elif PY_TYPE_CHECK(ring, BooleanPolynomialRing):
 -+            return (<BooleanPolynomialRing>ring)._coerce_(x)
 -         else:
 --            return get_cring()._coerce_(x)
 +             # It is a wrong use of the notion of "coercion"
 +             # to say that the boolean set is "coerced" into
 +             # a boolean polynomial ring: Boolean sets have
 +             # no parent, and thus there is no coercion map
 +             # from that parent to the ring.
 +             # So, it is just a conversion. [Simon King]
 +-            return get_cring()(x)
  -
  -cdef class MonomialFactory:
 ++            return (<BooleanPolynomialRing>ring)(x)
 ++        else:
  +            raise TypeError, \
  +              "Cannot generate Boolean polynomial from %s ,
 %s%"%(str(type(x)), str(type(ring)))
  +
 @@ -1719,7 +1565,7 @@
  +                   return result.lm()
  +                return result
  +            except:
 -+                raise #TypeError, "Cannot convert to Boolean Monomial
 %s"%(str(type(x)))
 ++                raise TypeError, "Cannot convert to Boolean Monomial
 %s"%(str(type(x)))
  +
  +cdef class VariableConstruct:
       """
 @@ -3019,7 +2865,7 @@
  +            if PY_TYPE_CHECK(arg, BooleanPolynomial):
  +                return arg
  +            elif PY_TYPE_CHECK(arg, BooleSet):
 -+                return (<BooleSet>arg)._ring._coerce_(arg)
 ++                return (<BooleSet>arg)._ring(arg)
  +            elif PY_TYPE_CHECK(arg, BooleanMonomial):
  +                return (<BooleanMonomial>arg)._ring._coerce_(arg)
  +            elif PY_TYPE_CHECK(ring, BooleanPolynomialRing):
 }}}

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