sagemath / sage

Main repository of SageMath
https://www.sagemath.org
Other
1.44k stars 480 forks source link

Powering in RLF and CLF broken #24492

Open videlec opened 6 years ago

videlec commented 6 years ago
sage: CLF(2) ^ CLF(3)
Traceback (most recent call last):
<ipython-input-1-a7cb6423ad16> in <module>()
----> 1 CLF(Integer(2)) ** CLF(Integer(3))

/opt/sage/src/sage/rings/real_lazy.pyx in sage.rings.real_lazy.LazyFieldElement.__pow__ (build/cythonized/sage/rings/real_lazy.c:8274)()
    619         if isinstance(left, LazyWrapper) and isinstance(right, LazyWrapper):
    620             try:
--> 621                 return left._new_wrapper((<LazyWrapper>left)._value ** (<LazyWrapper>right)._value)
    622             except TypeError:
    623                 pass

/opt/sage/src/sage/rings/real_lazy.pyx in sage.rings.real_lazy.LazyFieldElement.__getattribute__ (build/cythonized/sage/rings/real_lazy.c:10658)()
    884             return LazyNamedUnop(self._parent, self, name)
    885         else:
--> 886             return FieldElement.__getattribute__(self, name)
    887 
    888     def continued_fraction(self):

/opt/sage/src/sage/structure/element.pyx in sage.structure.element.Element.__getattr__ (build/cythonized/sage/structure/element.c:4443)()
    484             AttributeError: 'LeftZeroSemigroup_with_category.element_class' object has no attribute 'blah_blah'
    485         """
--> 486         return self.getattr_from_category(name)
    487 
    488     cdef getattr_from_category(self, name):

/opt/sage/src/sage/structure/element.pyx in sage.structure.element.Element.getattr_from_category (build/cythonized/sage/structure/element.c:4552)()
    497         else:
    498             cls = P._abstract_element_class
--> 499         return getattr_from_other_class(self, cls, name)
    500 
    501     def __dir__(self):

/opt/sage/src/sage/cpython/getattr.pyx in sage.cpython.getattr.getattr_from_other_class (build/cythonized/sage/cpython/getattr.c:1901)()
    252         dummy_error_message.cls = type(self)
    253         dummy_error_message.name = name
--> 254         raise dummy_attribute_error
    255     attribute = <object>attr
    256     # Check for a descriptor (__get__ in Python)

AttributeError: 'sage.rings.real_lazy.LazyWrapper' object has no attribute '_new_wrapper'

Depends on #24247

Component: basic arithmetic

Issue created by migration from https://trac.sagemath.org/ticket/24492

jdemeyer commented 6 years ago

Dependencies: #24247