Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flaky doctests #35196

Open
3 tasks
tobiasdiez opened this issue Feb 25, 2023 · 4 comments
Open
3 tasks

Flaky doctests #35196

tobiasdiez opened this issue Feb 25, 2023 · 4 comments

Comments

@tobiasdiez
Copy link
Contributor

tobiasdiez commented Feb 25, 2023

Some doctests fail from time to time (but usually not):

File "doc/ca/intro/index.rst", line 492, in doc.ca.intro.index
Failed example:
    solve([x + y == 6, x - y == 4], x, y)
Exception raised:
    Traceback (most recent call last):
      File "/__w/sage/sage/src/sage/doctest/forker.py", line 695, in _run
        self.compile_and_execute(example, compiler, test.globs)
      File "/__w/sage/sage/src/sage/doctest/forker.py", line 1093, in compile_and_execute
        exec(compiled, globs)
      File "<doctest doc.ca.intro.index[1]>", line 1, in <module>
        solve([x + y == Integer(6), x - y == Integer(4)], x, y)
      File "/__w/sage/sage/src/sage/symbolic/relation.py", line 1137, in solve
        m = maxima(f)
      File "sage/misc/lazy_import.pyx", line 404, in sage.misc.lazy_import.LazyImport.__call__
        return self.get_object()(*args, **kwds)
      File "sage/misc/lazy_import.pyx", line 225, in sage.misc.lazy_import.LazyImport.get_object
        return self._get_object()
      File "sage/misc/lazy_import.pyx", line 261, in sage.misc.lazy_import.LazyImport._get_object
        self._object = getattr(__import__(self._module, {}, {}, [self._name]), self._name)
      File "/__w/sage/sage/src/sage/interfaces/maxima_lib.py", line 119, in <module>
        ecl_eval("(set-pathnames)")
      File "sage/libs/ecl.pyx", line 1350, in sage.libs.ecl.ecl_eval
        cpdef EclObject ecl_eval(str s):
      File "sage/libs/ecl.pyx", line 1373, in sage.libs.ecl.ecl_eval
        o=ecl_safe_eval(python_to_ecl(s, True))
      File "sage/libs/ecl.pyx", line 321, in sage.libs.ecl.ecl_safe_eval
        raise RuntimeError("ECL says: {}".format(message))
    RuntimeError: ECL says: Could not create directory "/github/home/.sage/maxima"
    C library error: "File exists"
File "sage/rings/polynomial/polynomial_quotient_ring_element.py", line 719, in sage.rings.polynomial.polynomial_quotient_ring_element.PolynomialQuotientRingElement.minpoly
Failed example:
    L.<v> = K.extension(randrange(2,20))
Exception raised:
    Traceback (most recent call last):
      File "/__w/sage/sage/src/sage/doctest/forker.py", line 695, in _run
        self.compile_and_execute(example, compiler, test.globs)
      File "/__w/sage/sage/src/sage/doctest/forker.py", line 1093, in compile_and_execute
        exec(compiled, globs)
      File "<doctest sage.rings.polynomial.polynomial_quotient_ring_element.PolynomialQuotientRingElement.minpoly[11]>", line 1, in <module>
        L = K.extension(randrange(Integer(2),Integer(20)), names=('v',)); (v,) = L._first_ngens(1)
      File "sage/rings/finite_rings/finite_field_base.pyx", line 1541, in sage.rings.finite_rings.finite_field_base.FiniteField.extension
        E = GF((self.characteristic(), self.degree() * modulus), name=name, **kwds)
      File "sage/structure/factory.pyx", line 371, in sage.structure.factory.UniqueFactory.__call__
        return self.get_object(version, key, kwds)
      File "sage/structure/factory.pyx", line 415, in sage.structure.factory.UniqueFactory.get_object
        obj = self.create_object(version, key, **extra_args)
      File "/__w/sage/sage/src/sage/rings/finite_rings/finite_field_constructor.py", line 754, in create_object
        raise ValueError("finite field modulus must be irreducible but it is not")
    ValueError: finite field modulus must be irreducible but it is not
File "sage/schemes/elliptic_curves/ell_field.py", line 1345, in sage.schemes.elliptic_curves.ell_field.EllipticCurve_field.isogenies_prime_degree
Failed example:
    E.isogenies_prime_degree(max_l=3)
Exception raised:
    Traceback (most recent call last):
      File "sage/structure/category_object.pyx", line 839, in sage.structure.category_object.CategoryObject.getattr_from_category
        return self.__cached_methods[name]
    KeyError: 'point_homset'

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
      File "/__w/sage/sage/src/sage/schemes/projective/projective_subscheme.py", line 122, in point
        return self._point(self.point_homset(), v, check=check)
      File "/__w/sage/sage/src/sage/schemes/elliptic_curves/ell_point.py", line 256, in __init__
        point_homset = curve.point_homset()
      File "sage/structure/category_object.pyx", line 833, in sage.structure.category_object.CategoryObject.__getattr__
        return self.getattr_from_category(name)
      File "sage/structure/category_object.pyx", line 848, in sage.structure.category_object.CategoryObject.getattr_from_category
        attr = getattr_from_other_class(self, cls, name)
      File "sage/cpython/getattr.pyx", line 356, in sage.cpython.getattr.getattr_from_other_class
        raise AttributeError(dummy_error_message)
    AttributeError: 'sage.rings.polynomial.polynomial_zz_pex.Polynomial_ZZ_pEX' object has no attribute '__custom_name'
@ashutosh887
Copy link

I would like to work on this @tobiasdiez

@tobiasdiez
Copy link
Contributor Author

Nice! The first issue has already a PR, but the last two ones are still up for grabs.

@ashutosh887
Copy link

Which two ones @tobiasdiez Sir?
Please let me know. Thanks

@tobiasdiez
Copy link
Contributor Author

The last two errors/failing tests in the above list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants