Skip to content

py3 + OS X: symbolic/expression.pyx #28489

@jhpalmieri

Description

@jhpalmieri

On OS X, I get intermittent failures with symbolic/expression.pyx:

sage -t src/sage/symbolic/expression.pyx
**********************************************************************
File "src/sage/symbolic/expression.pyx", line 7122, in sage.symbolic.expression.Expression.gcd
Failed example:
    gcd(alg + alg*x, x^2 - 1)
Exception raised:
    Traceback (most recent call last):
      File "/Users/jpalmier/Desktop/Sage/git/sage/local/lib/python3.7/site-packages/sage/arith/misc.py", line 1771, in gcd
        return m(b, **kwargs)
      File "sage/symbolic/expression.pyx", line 7169, in sage.symbolic.expression.Expression.gcd (build/cythonized/sage/symbolic/expression.cpp:40616)
        cdef GEx x = g_gcd(self._gobj, r._gobj)
      File "sage/structure/element.pyx", line 1236, in sage.structure.element.Element.__add__ (build/cythonized/sage/structure/element.c:10816)
        return coercion_model.bin_op(left, right, add)
      File "sage/structure/coerce.pyx", line 1207, in sage.structure.coerce.CoercionModel.bin_op (build/cythonized/sage/structure/coerce.c:10898)
        raise bin_op_exception(op, x, y)
    TypeError: unsupported operand parent(s) for +: 'Algebraic Real Field' and 'Number Field in I with defining polynomial x^2 + 1 with I = 1*I'

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
      File "/Users/jpalmier/Desktop/Sage/git/sage/local/lib/python3.7/site-packages/sage/doctest/forker.py", line 681, in _run
        self.compile_and_execute(example, compiler, test.globs)
      File "/Users/jpalmier/Desktop/Sage/git/sage/local/lib/python3.7/site-packages/sage/doctest/forker.py", line 1123, in compile_and_execute
        exec(compiled, globs)
      File "<doctest sage.symbolic.expression.Expression.gcd[13]>", line 1, in <module>
        gcd(alg + alg*x, x**Integer(2) - Integer(1))
      File "/Users/jpalmier/Desktop/Sage/git/sage/local/lib/python3.7/site-packages/sage/arith/misc.py", line 1773, in gcd
        return m(py_scalar_to_element(b), **kwargs)
      File "sage/symbolic/expression.pyx", line 7169, in sage.symbolic.expression.Expression.gcd (build/cythonized/sage/symbolic/expression.cpp:40616)
        cdef GEx x = g_gcd(self._gobj, r._gobj)
      File "sage/structure/element.pyx", line 1236, in sage.structure.element.Element.__add__ (build/cythonized/sage/structure/element.c:10816)
        return coercion_model.bin_op(left, right, add)
      File "sage/structure/coerce.pyx", line 1207, in sage.structure.coerce.CoercionModel.bin_op (build/cythonized/sage/structure/coerce.c:10898)
        raise bin_op_exception(op, x, y)
    TypeError: unsupported operand parent(s) for +: 'Algebraic Real Field' and 'Number Field in I with defining polynomial x^2 + 1 with I = 1*I'
**********************************************************************
File "src/sage/symbolic/expression.pyx", line 7124, in sage.symbolic.expression.Expression.gcd
Failed example:
    gcd(alg - alg*x, x^2 - 1)
Exception raised:
    Traceback (most recent call last):
      File "/Users/jpalmier/Desktop/Sage/git/sage/local/lib/python3.7/site-packages/sage/arith/misc.py", line 1771, in gcd
        return m(b, **kwargs)
      File "sage/symbolic/expression.pyx", line 7169, in sage.symbolic.expression.Expression.gcd (build/cythonized/sage/symbolic/expression.cpp:40616)
        cdef GEx x = g_gcd(self._gobj, r._gobj)
      File "sage/structure/element.pyx", line 1236, in sage.structure.element.Element.__add__ (build/cythonized/sage/structure/element.c:10816)
        return coercion_model.bin_op(left, right, add)
      File "sage/structure/coerce.pyx", line 1207, in sage.structure.coerce.CoercionModel.bin_op (build/cythonized/sage/structure/coerce.c:10898)
        raise bin_op_exception(op, x, y)
    TypeError: unsupported operand parent(s) for +: 'Algebraic Real Field' and 'Number Field in I with defining polynomial x^2 + 1 with I = 1*I'

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
      File "/Users/jpalmier/Desktop/Sage/git/sage/local/lib/python3.7/site-packages/sage/doctest/forker.py", line 681, in _run
        self.compile_and_execute(example, compiler, test.globs)
      File "/Users/jpalmier/Desktop/Sage/git/sage/local/lib/python3.7/site-packages/sage/doctest/forker.py", line 1123, in compile_and_execute
        exec(compiled, globs)
      File "<doctest sage.symbolic.expression.Expression.gcd[14]>", line 1, in <module>
        gcd(alg - alg*x, x**Integer(2) - Integer(1))
      File "/Users/jpalmier/Desktop/Sage/git/sage/local/lib/python3.7/site-packages/sage/arith/misc.py", line 1773, in gcd
        return m(py_scalar_to_element(b), **kwargs)
      File "sage/symbolic/expression.pyx", line 7169, in sage.symbolic.expression.Expression.gcd (build/cythonized/sage/symbolic/expression.cpp:40616)
        cdef GEx x = g_gcd(self._gobj, r._gobj)
      File "sage/structure/element.pyx", line 1236, in sage.structure.element.Element.__add__ (build/cythonized/sage/structure/element.c:10816)
        return coercion_model.bin_op(left, right, add)
      File "sage/structure/coerce.pyx", line 1207, in sage.structure.coerce.CoercionModel.bin_op (build/cythonized/sage/structure/coerce.c:10898)
        raise bin_op_exception(op, x, y)
    TypeError: unsupported operand parent(s) for +: 'Algebraic Real Field' and 'Number Field in I with defining polynomial x^2 + 1 with I = 1*I'
**********************************************************************
1 item had failures:
   2 of  29 in sage.symbolic.expression.Expression.gcd
    [2848 tests, 2 failures, 24.89 s]
----------------------------------------------------------------------
sage -t src/sage/symbolic/expression.pyx  # 2 doctests failed
----------------------------------------------------------------------

I get these about a third of the time.

Upstream: Reported upstream. No feedback yet.

CC: @vbraun

Component: python3

Keywords: random_fail

Author: Frédéric Chapoton

Branch: fbffb36

Reviewer: Volker Braun

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions