Opened 2 years ago

Closed 11 months ago

Last modified 11 months ago

#30766 closed enhancement (fixed)

Experimental support for Python 3.10 in Sage 9.5

Reported by: Samuel Lelièvre Owned by:
Priority: critical Milestone: sage-9.5
Component: packages: standard Keywords: upgrade, python
Cc: Matthias Köppe, Samuel Lelièvre, François Bissey, Gonzalo Tornaría, Antonio Rojas Merged in:
Authors: Matthias Koeppe, Gonzalo Tornaría Reviewers: Antonio Rojas, Matthias Koeppe
Report Upstream: N/A Work issues:
Branch: df9f1d4 (Commits, GitHub, GitLab) Commit:
Dependencies: #33013, #32930, #33040 Stopgaps:

Status badges

Description (last modified by Matthias Köppe)

This is to support Python 3.10, which was released on 2021-10-04. https://docs.python.org/3.10/whatsnew/changelog.html#changelog

Thanks to the following tickets, Sage is mostly ready for Python 3.10 in addition to 3.9, 3.8, 3.7.

  • needs Cython 0.29.23 (#31445)
  • #31855 Patch/upgrade gmpy2 to add python 3.10 support
  • #31856 Upgrade pyzmq, babel - to fix error: implicit declaration of function 'PyObject_AsWriteBuffer' is invalid in C99 with pyzmq-19.0.2
  • #32815 numpy
  • #32837 cffi: Update to 1.15.0
  • #32852 Update traitlets to 5.1.1 (for python 3.9.8, 3.10)
  • #32671 Update pip to 21.3.1, distlib to 0.3.3
  • #31295 Meta-ticket: Replace imports from deprecated distutils
  • #32930 IPython/Jupyter upgrade for python 3.10 support
  • #33013 Fix tests with Python 3.10

In this ticket, we enable use of system Python 3.10 but issue a warning regarding its experimental status for Sage.

The ticket does not include the upgrade of the python3 SPKG to Python 3.10. Many systems already ship Python 3.10. To test, thanks to https://wiki.sagemath.org/ReleaseTours/sage-9.5#Separate_virtual_environment_for_Python_packages, a full rebuild of the Sage distribution is not necessary - only the Python packages will be built from scratch in a separate venv.

Related:

Change History (115)

comment:1 Changed 2 years ago by Samuel Lelièvre

Cc: Matthias Köppe Samuel Lelièvre added
Component: PLEASE CHANGEpackages: standard
Description: modified (diff)
Keywords: upgrade python added
Type: PLEASE CHANGEtask

comment:2 Changed 2 years ago by Samuel Lelièvre

Dependencies: #30768
Description: modified (diff)

comment:3 Changed 22 months ago by Matthias Köppe

Cc: François Bissey added

comment:4 Changed 20 months ago by Matthias Köppe

Dependencies: #30768#30768, #31445
Description: modified (diff)

comment:5 Changed 20 months ago by Matthias Köppe

Milestone: sage-wishlistsage-9.4

comment:6 Changed 19 months ago by Matthias Köppe

Description: modified (diff)

comment:7 Changed 19 months ago by Matthias Köppe

Branch: u/mkoeppe/support_python_3_10

comment:8 Changed 19 months ago by Matthias Köppe

Commit: 4e4fd585db7743016d6ecc1f80c54b240969d07f
Description: modified (diff)

New commits:

6ca849fbuild/pkgs/cython: Update to 0.29.23
4e4fd58Merge #31445

comment:9 Changed 19 months ago by Matthias Köppe

Description: modified (diff)

comment:10 Changed 19 months ago by Matthias Köppe

Dependencies: #30768, #31445#30768, #31445, #31855

comment:11 Changed 19 months ago by git

Commit: 4e4fd585db7743016d6ecc1f80c54b240969d07f2d7d71503a827e76f2cace350fea6dd03ec4f852

Branch pushed to git repo; I updated commit sha1. New commits:

8cd9ecebuild/pkgs/gmpy2/patches: Add patches from Fedora @python/python3.10
2d7d715Merge #31855

comment:12 Changed 19 months ago by git

Commit: 2d7d71503a827e76f2cace350fea6dd03ec4f8523321a593e3416b37d318df85f9e2f9ec42766773

Branch pushed to git repo; I updated commit sha1. New commits:

3321a59build/pkgs/python3/spkg-configure.m4: Accept system python 3.10.x

comment:13 Changed 19 months ago by Matthias Köppe

Description: modified (diff)

comment:14 Changed 19 months ago by Matthias Köppe

Dependencies: #30768, #31445, #31855#30768, #31445, #31855, #31856
Description: modified (diff)

comment:15 Changed 19 months ago by git

Commit: 3321a593e3416b37d318df85f9e2f9ec4276677365355f936278914e8e36c14c11eec499e382b8f1

Branch pushed to git repo; I updated commit sha1. New commits:

2a7d940build/pkgs/pyzmq: Update to 22.0.3
65355f9Merge #31856

comment:16 Changed 19 months ago by Matthias Köppe

Dependencies: #30768, #31445, #31855, #31856#30768, #31445, #31855, #31856, #31008
Description: modified (diff)

comment:17 Changed 19 months ago by git

Commit: 65355f936278914e8e36c14c11eec499e382b8f1a661b6af08beb316810667a982969b6832196736

Branch pushed to git repo; I updated commit sha1. Last 10 new commits:

f720722build/pkgs/sagelib/src/tox.ini: Add factor nobuildisolation
c451b31src/setup.cfg.m4 (install_requires): Add sage_conf
6700223Merge tag '9.3.rc0' into t/30913/sagelib__add_setup_cfg__install_requires_
04da2c6build/pkgs/ipywidgets: Patch out declaring install-requires of nbformat and jupyterlab-widgets
815c944Merge #30913
b06731cRemove Python 3.6 support from metadata and documentation
57338c1Update numpy to 1.20.2, scipy to 1.6.2, networkx to 2.5.1
ac49be0build/pkgs/numpy: Update to 1.20.3
02f6848build/pkgs/scipy: Update to 1.6.3
a661b6aMerge #31008

comment:18 Changed 19 months ago by Matthias Köppe

Description: modified (diff)

comment:19 Changed 19 months ago by git

Commit: a661b6af08beb316810667a982969b683219673613121d7bd0cf191f61df589f3ff5715083094274

Branch pushed to git repo; I updated commit sha1. New commits:

a64d920build/pkgs/babel: Update to 2.9.1, add upstream_url
13121d7Merge #31856

comment:20 Changed 16 months ago by Matthias Köppe

Description: modified (diff)

comment:21 Changed 16 months ago by Matthias Köppe

Milestone: sage-9.4sage-9.5

comment:22 Changed 16 months ago by Matthias Köppe

Description: modified (diff)

comment:23 Changed 16 months ago by Matthias Köppe

Dependencies: #30768, #31445, #31855, #31856, #31008#30768, #31445, #31855

comment:24 Changed 16 months ago by Matthias Köppe

Dependencies: #30768, #31445, #31855#30768, #31445, #31855, #32105

comment:25 Changed 15 months ago by Matthias Köppe

Dependencies: #30768, #31445, #31855, #32105#32488, #30768, #31445, #31855, #32105

comment:26 Changed 15 months ago by Matthias Köppe

Dependencies: #32488, #30768, #31445, #31855, #32105#32488, #30768, #31855, #32105

comment:27 Changed 15 months ago by git

Commit: 13121d7bd0cf191f61df589f3ff5715083094274731ccf174a7e3fd44aa145b1d03b4af2f2e4cc93

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

bab5de7build/pkgs/python3/spkg-configure.m4: Accept system python 3.10.x
033366cbuild/pkgs/numpy: Update to 1.21.1
c6a3a39build/pkgs/numpy: Update to 1.21.2
d0ca161Merge #32488
eced0deMerge #32372
edc435ere-activate abc warnings
f0cd750Merge #30768
41f7f4ebuild/pkgs/gmpy2: Update to 2.1.0rc1
731ccf1Merge #31855

comment:28 Changed 15 months ago by git

Commit: 731ccf174a7e3fd44aa145b1d03b4af2f2e4cc932749e672aafed52b4c4e83266c96145ae915d397

Branch pushed to git repo; I updated commit sha1. New commits:

2749e67pkgs/sage-setup/setup.cfg: Allow Python 3.10

comment:29 Changed 15 months ago by Matthias Köppe

  [scipy-1.6.3]   ERROR: Package 'scipy' requires a different Python: 3.10.0 not in '<3.10,>=3.7'

comment:30 Changed 15 months ago by Matthias Köppe

  [pplpy-0.8.6]   Copying package files from temporary location /Users/mkoeppe/s/sage/sage-rebasing/local/var/lib/sage/venv-python3.10.0rc1/var/tmp/sage/build/pplpy-0.8.6/inst to /Users/mkoeppe/s/sage/sage-rebasing/local/var/lib/sage/venv-python3.10.0rc1
  [pplpy-0.8.6]   Running post-install script for pplpy-0.8.6.
  [pplpy-0.8.6]   Traceback (most recent call last):
  [pplpy-0.8.6]     File "/Users/mkoeppe/s/sage/sage-rebasing/local/var/lib/sage/venv-python3.10.0rc1/bin/sphinx-build", line 5, in <module>
  [pplpy-0.8.6]       from sphinx.cmd.build import main
  [pplpy-0.8.6]     File "/Users/mkoeppe/s/sage/sage-rebasing/local/var/lib/sage/venv-python3.10.0rc1/lib/python3.10/site-packages/sphinx/cmd/build.py", line 25, in <module>
  [pplpy-0.8.6]       from sphinx.application import Sphinx
  [pplpy-0.8.6]     File "/Users/mkoeppe/s/sage/sage-rebasing/local/var/lib/sage/venv-python3.10.0rc1/lib/python3.10/site-packages/sphinx/application.py", line 31, in <module>
  [pplpy-0.8.6]       from sphinx.config import Config
  [pplpy-0.8.6]     File "/Users/mkoeppe/s/sage/sage-rebasing/local/var/lib/sage/venv-python3.10.0rc1/lib/python3.10/site-packages/sphinx/config.py", line 21, in <module>
  [pplpy-0.8.6]       from sphinx.util import logging
  [pplpy-0.8.6]     File "/Users/mkoeppe/s/sage/sage-rebasing/local/var/lib/sage/venv-python3.10.0rc1/lib/python3.10/site-packages/sphinx/util/__init__.py", line 41, in <module>
  [pplpy-0.8.6]       from sphinx.util.typing import PathMatcher
  [pplpy-0.8.6]     File "/Users/mkoeppe/s/sage/sage-rebasing/local/var/lib/sage/venv-python3.10.0rc1/lib/python3.10/site-packages/sphinx/util/typing.py", line 37, in <module>
  [pplpy-0.8.6]       from types import Union as types_Union
  [pplpy-0.8.6]   ImportError: cannot import name 'Union' from 'types' (/Users/mkoeppe/s/sage/sage-rebasing/local/var/lib/sage/venv-python3.10.0rc1/lib/python3.10/types.py)
  [pplpy-0.8.6]   make[5]: *** [html] Error 1
  [pplpy-0.8.6]   cp: build/html/*: No such file or directory

comment:31 Changed 15 months ago by Matthias Köppe

Dependencies: #32488, #30768, #31855, #32105#32488, #30768, #31855, #32105, #32518

comment:32 in reply to:  29 Changed 15 months ago by Matthias Köppe

Replying to mkoeppe:

  [scipy-1.6.3]   ERROR: Package 'scipy' requires a different Python: 3.10.0 not in '<3.10,>=3.7'

It does not look like a 1.6.4 is in preparation (https://github.com/scipy/scipy/commits/maintenance/1.6.x)... so I guess we'll have to do the update to 1.7.x in #32105

comment:33 Changed 15 months ago by Matthias Köppe

Workaround for the scipy install problem: --ignore-requires-python (new commits in #32492)

comment:34 in reply to:  30 Changed 15 months ago by Matthias Köppe

Replying to mkoeppe:

  [pplpy-0.8.6]       from types import Union as types_Union
  [pplpy-0.8.6]   ImportError: cannot import name 'Union' from 'types' (/Users/mkoeppe/s/sage/sage-rebasing/local/var/lib/sage/venv-python3.10.0rc1/lib/python3.10/types.py)
  [pplpy-0.8.6]   make[5]: *** [html] Error 1
  [pplpy-0.8.6]   cp: build/html/*: No such file or directory

Fixed by the sphinx upgrade in #32518

comment:35 Changed 15 months ago by Matthias Köppe

Dependencies: #32488, #30768, #31855, #32105, #32518#32488, #30768, #31855, #32492, #32518

comment:36 Changed 15 months ago by Matthias Köppe

comment:37 Changed 15 months ago by Matthias Köppe

Dependencies: #32488, #30768, #31855, #32492, #32518#32488, #30768, #31855, #32492, #32518, #32519

comment:38 in reply to:  36 Changed 15 months ago by Matthias Köppe

Replying to mkoeppe:

cvxopt build fails, needs https://github.com/cvxopt/cvxopt/pull/190

That's #32519

comment:39 Changed 15 months ago by Matthias Köppe

Reviewers: https://github.com/mkoeppe/sage/actions/runs/1239984523

comment:40 Changed 15 months ago by Matthias Köppe

Tests (via #30767) run at https://github.com/mkoeppe/sage/actions/runs/1239984523 -- all -minimal builds will use python 3.10.0rc1

comment:41 Changed 15 months ago by Matthias Köppe

Dependencies: #32488, #30768, #31855, #32492, #32518, #32519#32488, #30768, #31855, #32492, #32518, #32519, #32520

comment:42 Changed 15 months ago by Matthias Köppe

distutils deprecation -> #32565:

sage -t --long --random-seed=0 src/sage/plot/plot.py
**********************************************************************
File "src/sage/plot/plot.py", line 513, in sage.plot.plot
Failed example:
    os.system("sage -c \"if 'matplotlib' in sys.modules: sys.exit(1)\"") # long time
Expected:
    0
Got:
    /Users/mkoeppe/s/sage/sage-rebasing/local/var/lib/sage/venv-python3.10.0rc1/lib/python3.10/site-packages/sage/features/__init__.py:55: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
      from distutils.errors import CCompilerError
    0
Last edited 15 months ago by Matthias Köppe (previous) (diff)

comment:43 Changed 15 months ago by Matthias Köppe

Many failures from improved error messages -> #32520

sage -t --long --random-seed=0 src/sage/geometry/polyhedron/base.py
**********************************************************************
File "src/sage/geometry/polyhedron/base.py", line 214, in sage.geometry.polyhedron.base.Polyhedron_base.__init__
Failed example:
    p = Polyhedron_field(parent, Vrep, 'nonsense',  # py3
                         Vrep_minimal=True, Hrep_minimal=True, pref_rep='Vrep')
Expected:
    Traceback (most recent call last):
    ...
    TypeError: _init_Hrepresentation() takes 3 positional arguments but 9 were given
Got:
    <BLANKLINE>
    Traceback (most recent call last):
...
    TypeError: Polyhedron_field._init_Hrepresentation() takes 3 positional arguments but 9 were given
**********************************************************************

comment:44 Changed 15 months ago by Matthias Köppe

Stricter parser:

sage -t --long --random-seed=0 src/sage/schemes/riemann_surfaces/riemann_surface.py
**********************************************************************
File "src/sage/schemes/riemann_surfaces/riemann_surface.py", line 1393, in sage.schemes.riemann_surfaces.riemann_surface.RiemannSurface.make_zw_interpolator
Failed example:
    all(f(*g(i*0.1)).abs() < 1e-13for i in range(10))
Expected:
    True
Got:
    DeprecationWarning: invalid decimal literal
    True

comment:45 Changed 15 months ago by Matthias Köppe

Sage numbers no longer accepted:

sage -t --long --random-seed=0 src/sage/tests/cmdline.py
**********************************************************************
File "src/sage/tests/cmdline.py", line 104, in sage.tests.cmdline.test_executable
Failed example:
    (out, err, ret) = test_executable(["sleep", "1"], timeout=0.1)
Expected:
    Traceback (most recent call last):
    ...
    RuntimeError: timeout in test_executable()
Got:
    <BLANKLINE>
    Traceback (most recent call last):
      File "/Users/mkoeppe/s/sage/sage-rebasing/local/var/lib/sage/venv-python3.10.0rc1/lib/python3.10/site-packages/sage/doctest/forker.py", line 704, in _run
        self.compile_and_execute(example, compiler, test.globs)
      File "/Users/mkoeppe/s/sage/sage-rebasing/local/var/lib/sage/venv-python3.10.0rc1/lib/python3.10/site-packages/sage/doctest/forker.py", line 1098, in compile_and_execute
        exec(compiled, globs)
      File "<doctest sage.tests.cmdline.test_executable[5]>", line 1, in <module>
        (out, err, ret) = test_executable(["sleep", "1"], timeout=RealNumber('0.1'))
      File "/Users/mkoeppe/s/sage/sage-rebasing/local/var/lib/sage/venv-python3.10.0rc1/lib/python3.10/site-packages/sage/tests/cmdline.py", line 769, in test_executable
        rlist = select.select(rfd, [], [], timeout)[0]
    TypeError: timeout must be a float or None
sage -t --long --random-seed=0 src/sage_docbuild/utils.py
**********************************************************************
File "src/sage_docbuild/utils.py", line 91, in sage_docbuild.utils
Failed example:
    build_many(target, range(8), processes=8)
Expected:
    Traceback (most recent call last):
    ...
    ZeroDivisionError: rational division by zero
Got:
    <BLANKLINE>
    Traceback (most recent call last):
      File "/Users/mkoeppe/s/sage/sage-rebasing/local/var/lib/sage/venv-python3.10.0rc1/lib/python3.10/site-packages/sage/doctest/forker.py", line 704, in _run
        self.compile_and_execute(example, compiler, test.globs)
      File "/Users/mkoeppe/s/sage/sage-rebasing/local/var/lib/sage/venv-python3.10.0rc1/lib/python3.10/site-packages/sage/doctest/forker.py", line 1098, in compile_and_execute
        exec(compiled, globs)
      File "<doctest sage_docbuild.utils[6]>", line 1, in <module>
        build_many(target, range(Integer(8)), processes=Integer(8))
      File "/Users/mkoeppe/s/sage/sage-rebasing/local/var/lib/sage/venv-python3.10.0rc1/lib/python3.10/site-packages/sage_docbuild/utils.py", line 289, in build_many
        raise worker_exc.original_exception
    TypeError: 'sage.rings.real_mpfr.RealLiteral' object cannot be interpreted as an integer
Last edited 15 months ago by Matthias Köppe (previous) (diff)

comment:46 Changed 15 months ago by Matthias Köppe

inspect:

sage -t --long --random-seed=0 src/sage/misc/sageinspect.py
**********************************************************************
File "src/sage/misc/sageinspect.py", line 1561, in sage.misc.sageinspect.sage_getargspec
Failed example:
    shell.run_cell('f??')
Expected:
    ...the source code string...
Got:
    ---------------------------------------------------------------------------
    OSError                                   Traceback (most recent call last)

comment:47 Changed 15 months ago by Matthias Köppe

sage -t --long --random-seed=0 src/sage/categories/loop_crystals.py
**********************************************************************
File "src/sage/categories/loop_crystals.py", line 115, in sage.categories.loop_crystals.LoopCrystals.ParentMethods.digraph
Failed example:
    G.latex_options()  # optional - dot2tex
Expected:
    LaTeX options for Digraph on 29 vertices:
    {...'edge_options': <function ... at ...>...}
Got:
    LaTeX options for Digraph on 29 vertices: {}

comment:48 Changed 15 months ago by Matthias Köppe

sage -t --long --random-seed=0 src/sage/cpython/atexit.pyx
**********************************************************************
File "src/sage/cpython/atexit.pyx", line 61, in sage.cpython.atexit
Failed example:
    with restore_atexit(clear=True):
        atexit._run_exitfuncs()  # Should be none registered
        atexit.register(handler, 1, 2, c=3)
        with restore_atexit():
            atexit._run_exitfuncs()  # Run just registered handler
        atexit._run_exitfuncs()  # Handler should be run again
Expected:
    <function handler at 0x...>
    ((1, 2), {'c': 3})
    ((1, 2), {'c': 3})
Got:
    <function handler at 0x357023a30>
    ((1, 2), {'c': 3})

comment:49 Changed 15 months ago by Matthias Köppe

Dependencies: #32488, #30768, #31855, #32492, #32518, #32519, #32520#32488, #30768, #31855, #32492, #32518, #32519, #32520, #32565

comment:50 Changed 15 months ago by git

Commit: 2749e672aafed52b4c4e83266c96145ae915d397ab265626cec055eda65b0f79f215bae8c8119ac3

Branch pushed to git repo; I updated commit sha1. New commits:

ab26562Merge tag '9.5.beta2' into t/30766/support_python_3_10

comment:51 Changed 15 months ago by Matthias Köppe

Dependencies: #32488, #30768, #31855, #32492, #32518, #32519, #32520, #32565#31855, #32519, #32520, #32565

comment:52 Changed 15 months ago by git

Commit: ab265626cec055eda65b0f79f215bae8c8119ac3bc2b01d13eaa6f2a4904732d81b440e9aa1f9201

Branch pushed to git repo; I updated commit sha1. New commits:

964bf64git grep -l 'TypeError: .*() takes' | xargs sed -i.bak 's/TypeError: \(.*\)() takes/TypeError: ...\1() takes/'
247a077git grep -l 'TypeError: .*() got an unexpected' | xargs sed -i.bak 's/TypeError: \(.*\)() got an unexpected/TypeError: ...\1() got an unexpected/'
82d9329git grep -l 'TypeError: .*() missing' | xargs sed -i.bak 's/TypeError: \(.*\)() missing/TypeError: ...\1() missing/'
e80b828git grep -l 'TypeError: float() argument must be.*' | xargs sed -i.bak 's/TypeError: float() argument must be.*/TypeError: float() argument must be a string or a... number.../'
98a1ceegit grep -l 'AttributeError: can.* set attribute.*' | xargs sed -i.bak 's/AttributeError: can.* set attribute.*/AttributeError: can...t set attribute.../'
8511141git grep -l 'SyntaxError: invalid.*' | xargs sed -i.bak 's/SyntaxError: invalid.*/SyntaxError: invalid .../'
65c586bFix 2 more doctests to accept exception messages reworded in python 3.10
288bc84Merge branch 'public/32521' of git://trac.sagemath.org/sage into t/32520/fix_doctests_to_accept_exception_messages_reworded_in_python_3_10
68d07f8Merge tag '9.5.beta2' into t/32520/fix_doctests_to_accept_exception_messages_reworded_in_python_3_10
bc2b01dMerge #32520

comment:53 Changed 15 months ago by git

Commit: bc2b01d13eaa6f2a4904732d81b440e9aa1f9201c73bc9735dc93e981836e626ff865cb98b364740

Branch pushed to git repo; I updated commit sha1. New commits:

20e60f2sage.features.Executable: Remove use of distutils
8c763f4sage.features.CCompilerError: Move global import from distutils.errors into method
30ea064Merge #32565
380b63abuild/pkgs/cvxopt: Update to 1.2.7 for Python 3.10 compatibility
c73bc97Merge #32519

comment:54 Changed 14 months ago by Matthias Köppe

Description: modified (diff)

comment:55 Changed 14 months ago by Matthias Köppe

Priority: majorcritical

comment:56 Changed 13 months ago by Matthias Köppe

Description: modified (diff)

comment:57 Changed 13 months ago by Gonzalo Tornaría

Cc: Gonzalo Tornaría added

comment:58 Changed 13 months ago by Gonzalo Tornaría

I'm testing c73bc97 using system python 3.10 (void linux).

Compilation succeeds. Then running ./sage gives:

/opt/sage/sage-git/local/lib/python3.10/site-packages/prompt_toolkit/application/application.py:882: DeprecationWarning: There is no current event loop
  loop = get_event_loop()
sage: ...

Running ./sage -tp 8 --all gives:

  • lots of crashes apparently related to cysignals; stack trace starts with
    /opt/sage/sage-git/local/lib/python3.10/site-packages/cysignals/signals.cpython-310-x86_64-linux-gnu.so(+0x7e30)[0x7f2c06dbae30]
    /opt/sage/sage-git/local/lib/python3.10/site-packages/cysignals/signals.cpython-310-x86_64-linux-gnu.so(+0x7ee9)[0x7f2c06dbaee9]
    /opt/sage/sage-git/local/lib/python3.10/site-packages/cysignals/signals.cpython-310-x86_64-linux-gnu.so(+0xafd5)[0x7f2c06dbdfd5]
    /usr/lib/libc.so.6(+0x3d000)[0x7f2c07fcb000]
    /opt/sage/sage-git/local/lib/python3.10/site-packages/sage/cpython/atexit.cpython-310-x86_64-linux-gnu.so(+0x5131)[0x7f2c073e1131]
    /opt/sage/sage-git/local/lib/python3.10/site-packages/sage/cpython/atexit.cpython-310-x86_64-linux-gnu.so(+0x5932)[0x7f2c073e1932]
    /usr/lib/libpython3.10.so.1.0(+0xec50e)[0x7f2c0824050e]
    /usr/lib/libpython3.10.so.1.0(_PyEval_EvalFrameDefault+0x47d8)[0x7f2c081bdd68]
    ...
    
  • more deprecation warnings
    /opt/sage/sage-git/local/bin/cysignals-CSI:44: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
    

All I'm doing is, starting with a clean copy of c73bc97

$ ./bootstrap
$ ./configure
$ make build -j12
$ ./sage -tp 8 --all

I have logs, let me know if you need more info.

My goal is packaging sage for void linux, but it's already migrated to python 3.10 so this is a blocker.

comment:59 Changed 13 months ago by Matthias Köppe

Description: modified (diff)

comment:60 Changed 13 months ago by Matthias Köppe

Description: modified (diff)

comment:61 Changed 13 months ago by Matthias Köppe

Description: modified (diff)

comment:62 Changed 13 months ago by Enrique Artal Bartolo

After updating the last cysignals (unreleased 1.11.0, needed for Fedora 35) I put below the failed tests. I get some errors as in previous posts (I needed to restart several times due to many cysignal crashes); by the way make ptestlong produced many such crashes while sage -t -a -p8 worked better.

The prompt_toolkit warning disappears with the 3.0.22 version.

sage -t --random-seed=186690325287508787735378550154836726084 src/sage/functions/log.py  # 3 doctests failed
sage -t --random-seed=186690325287508787735378550154836726084 src/sage/functions/other.py  # 1 doctest failed
sage -t --random-seed=186690325287508787735378550154836726084 src/sage/interfaces/fricas.py  # 110 doctests failed
sage -t --random-seed=186690325287508787735378550154836726084 src/sage/misc/sageinspect.py  # 1 doctest failed
sage -t --random-seed=186690325287508787735378550154836726084 src/sage/schemes/riemann_surfaces/riemann_surface.py  # 1 doctest failed
sage -t --random-seed=186690325287508787735378550154836726084 src/sage/symbolic/integration/external.py  # 13 doctests failed
sage -t --random-seed=186690325287508787735378550154836726084 src/sage/symbolic/integration/integral.py  # 3 doctests failed
sage -t --random-seed=186690325287508787735378550154836726084 src/sage/tests/cmdline.py  # Timed out
sage -t --random-seed=186690325287508787735378550154836726084 src/sage/calculus/calculus.py  # 6 doctests failed
sage -t --random-seed=186690325287508787735378550154836726084 src/sage/calculus/desolvers.py  # 13 doctests failed
sage -t --random-seed=186690325287508787735378550154836726084 src/sage/combinat/posets/posets.py  # 1 doctest failed
sage -t --random-seed=186690325287508787735378550154836726084 src/sage/rings/real_mpfr.pyx  # 1 doctest failed
sage -t --random-seed=186690325287508787735378550154836726084 src/sage/functions/gamma.py  # 4 doctests failed
sage -t --random-seed=186690325287508787735378550154836726084 src/sage/matrix/matrix1.pyx  # 4 doctests failed
sage -t --random-seed=186690325287508787735378550154836726084 src/sage/functions/error.py  # 1 doctest failed
sage -t --random-seed=186690325287508787735378550154836726084 src/sage/plot/colors.py  # 5 doctests failed
sage -t --random-seed=186690325287508787735378550154836726084 src/sage/geometry/hyperbolic_space/hyperbolic_model.py  # 1 doctest failed
sage -t --random-seed=186690325287508787735378550154836726084 src/sage/symbolic/expression_conversions.py  # 16 doctests failed
sage -t --random-seed=186690325287508787735378550154836726084 src/sage/functions/generalized.py  # 1 doctest failed
sage -t --random-seed=186690325287508787735378550154836726084 src/sage/schemes/elliptic_curves/lseries_ell.py  # 2 doctests failed
sage -t --random-seed=186690325287508787735378550154836726084 src/sage/lfunctions/pari.py  # 1 doctest failed
sage -t --random-seed=186690325287508787735378550154836726084 src/sage/structure/unique_representation.py  # 1 doctest failed
sage -t --random-seed=186690325287508787735378550154836726084 src/sage_docbuild/utils.py  # 2 doctests failed
sage -t --random-seed=186690325287508787735378550154836726084 src/sage/libs/giac/__init__.py  # 7 doctests failed
sage -t --random-seed=186690325287508787735378550154836726084 src/sage/lfunctions/lcalc.py  # 2 doctests failed
sage -t --random-seed=186690325287508787735378550154836726084 src/sage/symbolic/callable.py  # 5 doctests failed
sage -t --random-seed=186690325287508787735378550154836726084 src/sage/cpython/atexit.pyx  # 6 doctests failed

comment:63 Changed 13 months ago by Matthias Köppe

Description: modified (diff)

comment:64 in reply to:  58 Changed 12 months ago by Antonio Rojas

Replying to tornaria:

Running ./sage -tp 8 --all gives:

  • lots of crashes apparently related to cysignals; stack trace starts with
    /opt/sage/sage-git/local/lib/python3.10/site-packages/cysignals/signals.cpython-310-x86_64-linux-gnu.so(+0x7e30)[0x7f2c06dbae30]
    /opt/sage/sage-git/local/lib/python3.10/site-packages/cysignals/signals.cpython-310-x86_64-linux-gnu.so(+0x7ee9)[0x7f2c06dbaee9]
    /opt/sage/sage-git/local/lib/python3.10/site-packages/cysignals/signals.cpython-310-x86_64-linux-gnu.so(+0xafd5)[0x7f2c06dbdfd5]
    /usr/lib/libc.so.6(+0x3d000)[0x7f2c07fcb000]
    /opt/sage/sage-git/local/lib/python3.10/site-packages/sage/cpython/atexit.cpython-310-x86_64-linux-gnu.so(+0x5131)[0x7f2c073e1131]
    /opt/sage/sage-git/local/lib/python3.10/site-packages/sage/cpython/atexit.cpython-310-x86_64-linux-gnu.so(+0x5932)[0x7f2c073e1932]
    /usr/lib/libpython3.10.so.1.0(+0xec50e)[0x7f2c0824050e]
    /usr/lib/libpython3.10.so.1.0(_PyEval_EvalFrameDefault+0x47d8)[0x7f2c081bdd68]
    ...
    

Just updated to 3.10 and am also seeing this when running doctests, but not 100% of the times. Any idea where this comes from?

comment:65 Changed 12 months ago by Antonio Rojas

The crash is happening in the __Pyx_INCREF call here

    /* "sage/cpython/atexit.pyx":188
 *         else:
 *             kwargs = {}
 *         exithandlers.append((<object>callback.func,             # <<<<<<<<<<<<<<
 *                                 <object>callback.args,
 *                                 kwargs))
 */
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 188, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)__pyx_v_callback.func));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_callback.func));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_callback.func));

comment:66 Changed 12 months ago by Antonio Rojas

Update: the segfault seems to happen when running tests iff there is another sage-runtests process running. After interrupting the doctests, the sage-runtests process takes a long time to get cleaned up, and if you try to run tests again in the meantime you will get the segfault.

comment:67 Changed 12 months ago by Antonio Rojas

Dependencies: #31855, #32519, #32520, #32565#31855, #32519, #32520, #32565, #33013

After #33013, the only remaining issues in sagelib are

sage -t --long /usr/lib/python3.10/site-packages/sage/tests/cmdline.py  # 3 doctests failed
sage -t --long /usr/lib/python3.10/site-packages/sage/doctest/test.py  # 16 doctests failed

which are caused by the spawned sage-runtests child processes segfaulting as mentioned above, and

sage -t --long /usr/lib/python3.10/site-packages/sage/cpython/atexit.pyx  # 6 doctests failed

which are likely related.

comment:68 Changed 12 months ago by Gonzalo Tornaría

Indeed, running tests in parallel breaks badly but running them not in parallel goes very far.

This is what I got with ./sage -t --all:

----------------------------------------------------------------------
sage -t --random-seed=231622868948624456778064911551695162592 src/sage/tests/cmdline.py  # 5 doctests failed
sage -t --random-seed=231622868948624456778064911551695162592 src/sage/quivers/algebra_elements.pxi  # 1 doctest failed
sage -t --random-seed=231622868948624456778064911551695162592 src/sage/cpython/atexit.pyx  # 6 doctests failed
sage -t --random-seed=231622868948624456778064911551695162592 src/sage/interfaces/sage0.py  # 1 doctest failed
sage -t --random-seed=231622868948624456778064911551695162592 src/sage_docbuild/utils.py  # 2 doctests failed
----------------------------------------------------------------------

Maybe I missed some patch, e.g a few failures are distutils deprecation warnings in .../venv-python3.10/lib/python3.10/site-packages/matplotlib/__init__.py:88.

What I used is beta8 + #30766 + #33013. What did I miss?

Maybe someone can rebase on top of beta8 so we all work on top of a common point?


As for the failure: it seems the atexit module internals have changed in python3.10, a quick look seems to suggest that per-module state was changed to per-thread state; sage.cpython.atexit is probably doing something wrong which manifests when there is more than one thread.

On the positive side, now the structs and some functions are declared in (internal) headers so it might be possible to implement this in a more robust way (formerly everything was in a C file and it seems sage.python.atexit copied a bunch of stuff which now may be incorrect).

What are the chances that sagemath 9.5 can support system python 3.10? I've been working to get sagemath into voidlinux but they won't accept a vendored python.

comment:69 Changed 12 months ago by Matthias Köppe

Summary: Support Python 3.10Experimental support for Python 3.10 in Sage 9.5

I would suggest that we defer full support for Python 3.10 to Sage 9.6 but already accept system Python 3.10 with a warning

comment:70 Changed 12 months ago by git

Commit: c73bc9735dc93e981836e626ff865cb98b364740cb305525af1f872d00bb63387f7c68b88fb70a38

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

e65ae6cbuild/pkgs/python3/spkg-configure.m4: Accept system python 3.10.x
59173d0pkgs/sage-setup/setup.cfg: Allow Python 3.10
c902b7bsrc/setup.cfg.m4: Allow Python 3.10
cb30552build/pkgs/python3/spkg-configure.m4: Warn on system python 3.10.x

comment:71 Changed 12 months ago by Matthias Köppe

Authors: Matthias Koeppe
Reviewers: https://github.com/mkoeppe/sage/actions/runs/1239984523
Status: newneeds_review
Type: taskenhancement

comment:72 Changed 12 months ago by Matthias Köppe

Dependencies: #31855, #32519, #32520, #32565, #33013#33013, #32930

comment:73 Changed 12 months ago by git

Commit: cb305525af1f872d00bb63387f7c68b88fb70a3802aa94c2af2b4c50f85d8b4395807430383fb119

Branch pushed to git repo; I updated commit sha1. Last 10 new commits:

5e144e9build/pkgs/jedi: Update to 0.18.1
6347f98build/pkgs/prompt_toolkit: Update to 3.0.22
28e535dbuild/pkgs/widgetsnbextension: Update to 3.5.2
63078acbuild/pkgs/terminado: Update to 0.12.1
22de5dcbuild/pkgs/notebook: Update to 6.4.6
a0fe18bbuild/pkgs/nbclient: Update to 0.5.4
ef3fc7fbuild/pkgs/jupyter_client: Update to 7.1.0
a593bc9build/pkgs/jupyter_core: Update to 4.9.1
66c16b1build/pkgs/importlib_metadata: Update to 4.8.2
02aa94cMerge #32930

comment:74 Changed 12 months ago by Matthias Köppe

Description: modified (diff)

comment:75 in reply to:  68 Changed 12 months ago by Matthias Köppe

Replying to tornaria:

Maybe someone can rebase [...] so we all work on top of a common point?

Done

comment:76 in reply to:  68 Changed 12 months ago by Matthias Köppe

Replying to tornaria:

As for the failure: it seems the atexit module internals have changed in python3.10, a quick look seems to suggest that per-module state was changed to per-thread state; sage.cpython.atexit is probably doing something wrong which manifests when there is more than one thread.

There is an unreleased change related to atexit mentioned in https://docs.python.org/3.10/whatsnew/changelog.html#core-and-builtins

comment:77 Changed 12 months ago by Matthias Köppe

I've put this change as a patch on #30767. It looks like it fixes the crashes in make ptest

comment:78 Changed 12 months ago by Matthias Köppe

However, I get these failures:

sage -t --random-seed=335595092046712014150830110238612394725 src/sage/cpython/atexit.pyx
**********************************************************************
File "src/sage/cpython/atexit.pyx", line 61, in sage.cpython.atexit
Failed example:
    with restore_atexit(clear=True):
        atexit._run_exitfuncs()  # Should be none registered
        atexit.register(handler, 1, 2, c=3)
        with restore_atexit():
            atexit._run_exitfuncs()  # Run just registered handler
        atexit._run_exitfuncs()  # Handler should be run again
Expected:
    <function handler at 0x...>
    ((1, 2), {'c': 3})
    ((1, 2), {'c': 3})
Got:
    <function handler at 0x1727cc940>
    ((1, 2), {'c': 3})
**********************************************************************
File "src/sage/cpython/atexit.pyx", line 77, in sage.cpython.atexit
Failed example:
    with restore_atexit(clear=False, run=True):
        # original handlers are run when exiting the context
        pass
Expected:
    ((4, 5), {'d': 6})
    ((1, 2), {'c': 3})
Got:
    <BLANKLINE>
**********************************************************************
File "src/sage/cpython/atexit.pyx", line 85, in sage.cpython.atexit
Failed example:
    atexit._run_exitfuncs()
Expected:
    ((4, 5), {'d': 6})
    ((1, 2), {'c': 3})
Got:
    <BLANKLINE>
**********************************************************************
File "src/sage/cpython/atexit.pyx", line 97, in sage.cpython.atexit
Failed example:
    print("Initial exit handlers:\n{}".format(_get_exithandlers()))
Expected:
    Initial exit handlers:
    [(<function handler at 0x...>, (1, 2), {'c': 3}),
     (<function handler at 0x...>, (4, 5), {'d': 6})]
Got:
    Initial exit handlers:
    []
**********************************************************************
File "src/sage/cpython/atexit.pyx", line 104, in sage.cpython.atexit
Failed example:
    print("After restore_atexit:\n{}".format(_get_exithandlers()))
Expected:
    After restore_atexit:
    [(<function handler at 0x...>, (1, 2), {'c': 3}),
     (<function handler at 0x...>, (4, 5), {'d': 6})]
Got:
    After restore_atexit:
    []
**********************************************************************
File "src/sage/cpython/atexit.pyx", line 114, in sage.cpython.atexit
Failed example:
    print("After restore_atexit with clear=True:\n{}".format(
          _get_exithandlers()))
Expected:
    After restore_atexit with clear=True:
    [(<function handler at 0x...>, (1, 2), {'c': 3}),
     (<function handler at 0x...>, (4, 5), {'d': 6})]
Got:
    After restore_atexit with clear=True:
    []
**********************************************************************
1 item had failures:
   6 of  20 in sage.cpython.atexit
    [19 tests, 6 failures, 0.03 s]

comment:79 Changed 12 months ago by Antonio Rojas

Cc: Antonio Rojas added

comment:80 Changed 12 months ago by Antonio Rojas

The python patch also fixes the crashes for me. Besides those six failures in sage.cpython.atexit, I'm also getting

**********************************************************************
File "/usr/lib/python3.10/site-packages/sage/doctest/test.py", line 509, in sage.doctest.test
Failed example:
    os.path.isfile(F)  # long time
Expected:
    False
Got:
    True
**********************************************************************

Looks like atexit integration is totally broken, but it shouldn't affect normal Sage usage.

comment:81 Changed 12 months ago by Matthias Köppe

I think we should just disable all of sage.cpython.atexit on Python 3.10 for Sage 9.5

comment:82 Changed 12 months ago by git

Commit: 02aa94c2af2b4c50f85d8b4395807430383fb119b5c73996062c71a9326aafddaf465f6a56b40fe0

Branch pushed to git repo; I updated commit sha1. New commits:

b5c7399sage.cpython.atexit: Disable for Python >= 3.10.0

comment:83 Changed 12 months ago by Matthias Köppe

This fixes the segfaults for me with (unpatched) Python 3.10 from homebrew.

It looks like doctest timeouts are not correctly reported with this change on Python 3.10

sage -t --random-seed=15134756989416810321066706961638592844 src/sage/manifolds/differentiable/integrated_curve.py
    Error in doctesting framework (no result returned)

But I think this is good enough for Sage 9.5.

comment:85 Changed 12 months ago by Matthias Köppe

Thanks for testing!

comment:86 Changed 12 months ago by Antonio Rojas

The atexit patch is causing many test failures in sage.tests.cmdline and sage.doctest.test for me, with either patched or unpatched python. If you're using patched python (or the upcoming 3.10.2), it makes things notably worse.

What about just disallowing system 3.10.0 and 3.10.1?

comment:87 Changed 12 months ago by Antonio Rojas

Actually it is not just those two modules: doctesting is completely broken with the patch. These are the first few lines of sage -t -l /usr/lib/python3.10/site-packages/sage

too many failed tests, not using stored timings
Running doctests with ID 2021-12-19-10-34-37-4bb8d646.
Using --optional=cvxopt,dochtml,pip,rpy2,sage,sage.geometry.polyhedron,sage.rings.real_double
Doctesting 3480 files.
sage -t --long --random-seed=323685807291696861763886820074125782219 /usr/lib/python3.10/site-packages/sage/all.py
    Error in doctesting framework (no result returned)
**********************************************************************
Tests run before error:
sage: import gc ## line 13 ##
sage: import inspect ## line 14 ##
sage: from sage import * ## line 15 ##
sage: frames = [x for x in gc.get_objects() if inspect.isframe(x)] ## line 16 ##
sage: allowed = [
    'IPython', 'prompt_toolkit', 'jedi',     # sage dependencies
    'threading', 'multiprocessing',  # doctest dependencies
    '__main__', 'sage.doctest',      # doctesting
    'signal', 'enum', 'types'        # may appear in Python 3
] ## line 21 ##
sage: def is_not_allowed(frame):
    module = inspect.getmodule(frame)
    if module is None: return False
    return not any(module.__name__.startswith(name) for name in allowed) ## line 27 ##
sage: [inspect.getmodule(f).__name__ for f in frames if is_not_allowed(f)] ## line 31 ##
[]
sage: type(interacts) ## line 36 ##
<class 'sage.misc.lazy_import.LazyImport'>
sage: interacts ## line 38 ##
<module 'sage.interacts.all' from '/usr/lib/python3.10/site-packages/sage/interacts/all.py'>
sage: sig_on_count() # check sig_on/off pairings (virtual doctest) ## line 40 ##
0
sage: 'log' in sage_globals() ## line 315 ##
True
sage: 'MatrixSpace' in sage_globals() ## line 317 ##
True
sage: 'Permutations' in sage_globals() ## line 319 ##
True
sage: 'TheWholeUniverse' in sage_globals() ## line 321 ##
False
sage: sig_on_count() # check sig_on/off pairings (virtual doctest) ## line 323 ##
0

**********************************************************************
sage -t --long --random-seed=323685807291696861763886820074125782219 /usr/lib/python3.10/site-packages/sage/all_cmdline.py
    Error in doctesting framework (no result returned)
**********************************************************************
Tests run before error:

**********************************************************************
sage -t --long --random-seed=323685807291696861763886820074125782219 /usr/lib/python3.10/site-packages/sage/version.py
    Error in doctesting framework (no result returned)
**********************************************************************
Tests run before error:

**********************************************************************
sage -t --long --random-seed=323685807291696861763886820074125782219 /usr/lib/python3.10/site-packages/sage/env.py
    Error in doctesting framework (no result returned)
**********************************************************************
Tests run before error:

comment:88 Changed 12 months ago by Gonzalo Tornaría

Same here: the atexit patch causes a lot of doctest failures, either when running tests in parallel or serially.

Just removing that last commit makes things way better, I can now run tests in parallel with only

----------------------------------------------------------------------
sage -t --random-seed=184890811937734492121783958395067560107 src/sage/cpython/atexit.pyx  # 6 doctests failed
sage -t --random-seed=184890811937734492121783958395067560107 src/sage_docbuild/utils.py  # 2 doctests failed
sage -t --random-seed=184890811937734492121783958395067560107 src/sage/tests/cmdline.py  # 7 doctests failed
----------------------------------------------------------------------

(I used had trouble all over the place when running tests in parallel, the difference may be due to merging #32930 which I wasn't applying before).

To be precise I'm using beta8 + #30766 (02aa94c) + #33020 (715277c) + #33040 (d865a54).

comment:89 Changed 12 months ago by Enrique Artal Bartolo

Same thing with Fedora 35

comment:90 Changed 12 months ago by git

Commit: b5c73996062c71a9326aafddaf465f6a56b40fe04fd1553ff523688bbfe7b309bb6b9d7f51a2f597

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

4fd1553sage.cpython.atexit: Work around segfaults in Python 3.10.0, 3.10.1

comment:91 Changed 12 months ago by Matthias Köppe

Here's a better version, please test

comment:92 in reply to:  91 Changed 12 months ago by Antonio Rojas

Replying to mkoeppe:

Here's a better version, please test

Running a second sage-runtests instance while there is another one running still segfaults. In particular, all tests that spawn a sage-runtests subprocess in sage.doctest.test segfault. This is with unpatched Python 3.10.1

Last edited 12 months ago by Antonio Rojas (previous) (diff)

comment:93 Changed 12 months ago by Antonio Rojas

Also, I noticed that sage -t -a still segfaults with a patched Python (regardless of whether the atexit patch is applied or not)

comment:94 Changed 12 months ago by Enrique Artal Bartolo

For me only one failed test (system giac 1.7.0.13):

Running doctests with ID 2021-12-19-22-38-22-94239956.
Git branch: t/30766/support_python_3_10
Using --optional=build,dochtml,fedora,pip,sage,sage.geometry.polyhedron,sage.rings.real_double,sage_spkg
Doctesting 1 file.
sage -t --warn-long 41.6 --random-seed=81937132960239439330694293571411830858 src/sage/libs/giac/__init__.py
**********************************************************************
File "src/sage/libs/giac/__init__.py", line 18, in sage.libs.giac
Failed example:
    B = gb_giac(I.gens()) # random
Exception raised:
    Traceback (most recent call last):
      File "/usr/local/sagedev/local/var/lib/sage/venv-python3.9.7/lib/python3.9/site-packages/sage/doctest/forker.py", line 694, in _run
        self.compile_and_execute(example, compiler, test.globs)
      File "/usr/local/sagedev/local/var/lib/sage/venv-python3.9.7/lib/python3.9/site-packages/sage/doctest/forker.py", line 1088, in compile_and_execute
        exec(compiled, globs)
      File "<doctest sage.libs.giac[3]>", line 1, in <module>
        B = gb_giac(I.gens()) # random
      File "/usr/local/sagedev/local/var/lib/sage/venv-python3.9.7/lib/python3.9/site-packages/sage/libs/giac/__init__.py", line 118, in wrapper
        return func(*args, **kwds)
      File "/usr/local/sagedev/local/var/lib/sage/venv-python3.9.7/lib/python3.9/site-packages/sage/libs/giac/__init__.py", line 353, in groebner_basis
        gb_giac = F.gbasis(list(var_names), giac_order)
      File "sage/libs/giac/auto-methods.pxi", line 6442, in sage.libs.giac.giac.GiacMethods_base.gbasis (build/cythonized/sage/libs/giac/giac.cpp:56012)
        return GiacMethods['gbasis'](self,*args)
      File "sage/libs/giac/giac.pyx", line 2102, in sage.libs.giac.giac.GiacFunction.__call__ (build/cythonized/sage/libs/giac/giac.cpp:153070)
        sig_on()
    RuntimeError: Aborted
**********************************************************************
File "src/sage/libs/giac/__init__.py", line 19, in sage.libs.giac
Failed example:
    B
Exception raised:
    Traceback (most recent call last):
      File "/usr/local/sagedev/local/var/lib/sage/venv-python3.9.7/lib/python3.9/site-packages/sage/doctest/forker.py", line 694, in _run
        self.compile_and_execute(example, compiler, test.globs)
      File "/usr/local/sagedev/local/var/lib/sage/venv-python3.9.7/lib/python3.9/site-packages/sage/doctest/forker.py", line 1088, in compile_and_execute
        exec(compiled, globs)
      File "<doctest sage.libs.giac[4]>", line 1, in <module>
        B
    NameError: name 'B' is not defined
**********************************************************************
File "src/sage/libs/giac/__init__.py", line 175, in sage.libs.giac.?
Failed example:
    B=gb_giac(I.gens());B
Exception raised:
    Traceback (most recent call last):
      File "/usr/local/sagedev/local/var/lib/sage/venv-python3.9.7/lib/python3.9/site-packages/sage/doctest/forker.py", line 694, in _run
        self.compile_and_execute(example, compiler, test.globs)
      File "/usr/local/sagedev/local/var/lib/sage/venv-python3.9.7/lib/python3.9/site-packages/sage/doctest/forker.py", line 1088, in compile_and_execute
        exec(compiled, globs)
      File "<doctest sage.libs.giac.?[3]>", line 1, in <module>
        B=gb_giac(I.gens());B
      File "/usr/local/sagedev/local/var/lib/sage/venv-python3.9.7/lib/python3.9/site-packages/sage/libs/giac/__init__.py", line 118, in wrapper
        return func(*args, **kwds)
      File "/usr/local/sagedev/local/var/lib/sage/venv-python3.9.7/lib/python3.9/site-packages/sage/libs/giac/__init__.py", line 353, in groebner_basis
        gb_giac = F.gbasis(list(var_names), giac_order)
      File "sage/libs/giac/auto-methods.pxi", line 6442, in sage.libs.giac.giac.GiacMethods_base.gbasis (build/cythonized/sage/libs/giac/giac.cpp:56012)
        return GiacMethods['gbasis'](self,*args)
      File "sage/libs/giac/giac.pyx", line 2102, in sage.libs.giac.giac.GiacFunction.__call__ (build/cythonized/sage/libs/giac/giac.cpp:153070)
        sig_on()
    RuntimeError: Aborted
**********************************************************************
File "src/sage/libs/giac/__init__.py", line 179, in sage.libs.giac.?
Failed example:
    B.is_groebner()
Exception raised:
    Traceback (most recent call last):
      File "/usr/local/sagedev/local/var/lib/sage/venv-python3.9.7/lib/python3.9/site-packages/sage/doctest/forker.py", line 694, in _run
        self.compile_and_execute(example, compiler, test.globs)
      File "/usr/local/sagedev/local/var/lib/sage/venv-python3.9.7/lib/python3.9/site-packages/sage/doctest/forker.py", line 1088, in compile_and_execute
        exec(compiled, globs)
      File "<doctest sage.libs.giac.?[4]>", line 1, in <module>
        B.is_groebner()
    NameError: name 'B' is not defined
**********************************************************************
File "src/sage/libs/giac/__init__.py", line 186, in sage.libs.giac.?
Failed example:
    B = gb_giac(I.gens(), elim_variables=[P.gen(0), P.gen(2)])
Exception raised:
    Traceback (most recent call last):
      File "/usr/local/sagedev/local/var/lib/sage/venv-python3.9.7/lib/python3.9/site-packages/sage/doctest/forker.py", line 694, in _run
        self.compile_and_execute(example, compiler, test.globs)
      File "/usr/local/sagedev/local/var/lib/sage/venv-python3.9.7/lib/python3.9/site-packages/sage/doctest/forker.py", line 1088, in compile_and_execute
        exec(compiled, globs)
      File "<doctest sage.libs.giac.?[7]>", line 1, in <module>
        B = gb_giac(I.gens(), elim_variables=[P.gen(Integer(0)), P.gen(Integer(2))])
      File "/usr/local/sagedev/local/var/lib/sage/venv-python3.9.7/lib/python3.9/site-packages/sage/libs/giac/__init__.py", line 118, in wrapper
        return func(*args, **kwds)
      File "/usr/local/sagedev/local/var/lib/sage/venv-python3.9.7/lib/python3.9/site-packages/sage/libs/giac/__init__.py", line 356, in groebner_basis
        gb_giac = F.eliminate(list(elim_variables), 'gbasis')
      File "sage/libs/giac/auto-methods.pxi", line 4884, in sage.libs.giac.giac.GiacMethods_base.eliminate (build/cythonized/sage/libs/giac/giac.cpp:45540)
        return GiacMethods['eliminate'](self,*args)
      File "sage/libs/giac/giac.pyx", line 2102, in sage.libs.giac.giac.GiacFunction.__call__ (build/cythonized/sage/libs/giac/giac.cpp:153070)
        sig_on()
    RuntimeError: Aborted
**********************************************************************
File "src/sage/libs/giac/__init__.py", line 189, in sage.libs.giac.?
Failed example:
    B.is_groebner()
Exception raised:
    Traceback (most recent call last):
      File "/usr/local/sagedev/local/var/lib/sage/venv-python3.9.7/lib/python3.9/site-packages/sage/doctest/forker.py", line 694, in _run
        self.compile_and_execute(example, compiler, test.globs)
      File "/usr/local/sagedev/local/var/lib/sage/venv-python3.9.7/lib/python3.9/site-packages/sage/doctest/forker.py", line 1088, in compile_and_execute
        exec(compiled, globs)
      File "<doctest sage.libs.giac.?[8]>", line 1, in <module>
        B.is_groebner()
    NameError: name 'B' is not defined
**********************************************************************
File "src/sage/libs/giac/__init__.py", line 191, in sage.libs.giac.?
Failed example:
    B.ideal() == I.elimination_ideal([P.gen(0), P.gen(2)])
Exception raised:
    Traceback (most recent call last):
      File "/usr/local/sagedev/local/var/lib/sage/venv-python3.9.7/lib/python3.9/site-packages/sage/doctest/forker.py", line 694, in _run
        self.compile_and_execute(example, compiler, test.globs)
      File "/usr/local/sagedev/local/var/lib/sage/venv-python3.9.7/lib/python3.9/site-packages/sage/doctest/forker.py", line 1088, in compile_and_execute
        exec(compiled, globs)
      File "<doctest sage.libs.giac.?[9]>", line 1, in <module>
        B.ideal() == I.elimination_ideal([P.gen(Integer(0)), P.gen(Integer(2))])
    NameError: name 'B' is not defined
**********************************************************************
2 items had failures:
   2 of   6 in sage.libs.giac
   5 of  33 in sage.libs.giac.?
    [56 tests, 7 failures, 0.41 s]
----------------------------------------------------------------------
sage -t --warn-long 41.6 --random-seed=81937132960239439330694293571411830858 src/sage/libs/giac/__init__.py  # 7 doctests failed
----------------------------------------------------------------------
Total time for all tests: 0.4 seconds
    cpu time: 0.3 seconds
    cumulative wall time: 0.4 seconds
Pytest is not installed, skip checking tests that rely on it.

comment:95 Changed 12 months ago by Gonzalo Tornaría

Branch: u/mkoeppe/support_python_3_10u/tornaria/support_python_3_10
Commit: 4fd1553ff523688bbfe7b309bb6b9d7f51a2f597249357dd30c54162e4b9204d6113c70b310a5087

I change the workarounds by an attempt at a "proper" fix.

With this all the doctests in src/sage/cpython/atexit.pyx pass, both with bundled python 3.9.7 and with my system python 3.10.

I'm still to run the whole testsuite; I am still getting failures in src/sage_docbuild/utils.py but I think they are due to the deprecation warnings caused by matplotlib and should go away when I apply #33040 which I forgot to do.

Should #33040 be merged into this ticket as a dependency? Am I the only one having problems caused by old matplotlib?


New commits:

249357dsage.cpython.atexit: fix for python 3.10 (#30766)

comment:96 Changed 12 months ago by Gonzalo Tornaría

Notes on the implementation:

Everything is in the cdef extern from * block where I moved the definition of struct atexit_callback and a new function _atexit_callbacks().

The C implementation for python 3.9 is short and should be equivalent to what was before. The implementation for 3.10 is even shorter since structs are now defined in (internal) python headers.

The argument to _atexit_callbacks() should be the atexit module as in the body of _get_exithandlers(). This is not necessary for python 3.10 but it seemed simpler to have the same declaration for both cases so there are no conditionals outside the cdef extern from * block.

comment:97 Changed 12 months ago by Matthias Köppe

Dependencies: #33013, #32930#33013, #32930, #33040

comment:98 Changed 12 months ago by Matthias Köppe

Looks good to me but it needs to be tested also on Python < 3.10

comment:99 Changed 12 months ago by Matthias Köppe

Authors: Matthias KoeppeMatthias Koeppe, Gonzalo Tornaría

comment:100 in reply to:  98 ; Changed 12 months ago by Gonzalo Tornaría

Replying to mkoeppe:

Looks good to me but it needs to be tested also on Python < 3.10

Absolutely! I did one test by passing --without-system-python3 to configure but more testing would be desirable.

Although I think the changes should really be nil for python < 3.10; would it be useful for review if I split the patch in two parts where the first part just refactors the existing code and the second part adds the new code for python 3.10? With some luck the first part visibly does nothing, and the second part will only add code conditional to python >= 3.10.

comment:101 in reply to:  100 Changed 12 months ago by Matthias Köppe

Replying to tornaria:

would it be useful for review if I split the patch in two parts where the first part just refactors the existing code and the second part adds the new code for python 3.10?

No, it's fine as is

comment:102 Changed 12 months ago by Gonzalo Tornaría

My full clean build with python 3.10 finished with the following doctest failure:

sage -t --random-seed=262548395979960264449538514011341238171 src/sage_docbuild/utils.py
**********************************************************************
File "src/sage_docbuild/utils.py", line 91, in sage_docbuild.utils
Failed example:
    build_many(target, range(8), processes=8)
Expected:
    Traceback (most recent call last):
    ...
    ZeroDivisionError: rational division by zero
Got:
    <BLANKLINE>
    Traceback (most recent call last):
      File "/usr/lib/sage-9.5.beta8/local/var/lib/sage/venv-python3.10/lib/python3.10/site-packages/sage/doctest/forker.py", line 694, in _run
        self.compile_and_execute(example, compiler, test.globs)
      File "/usr/lib/sage-9.5.beta8/local/var/lib/sage/venv-python3.10/lib/python3.10/site-packages/sage/doctest/forker.py", line 1088, in compile_and_execute
        exec(compiled, globs)
      File "<doctest sage_docbuild.utils[6]>", line 1, in <module>
        build_many(target, range(Integer(8)), processes=Integer(8))
      File "/usr/lib/sage-9.5.beta8/local/var/lib/sage/venv-python3.10/lib/python3.10/site-packages/sage_docbuild/utils.py", line 289, in build_many
        raise worker_exc.original_exception
    TypeError: 'sage.rings.real_mpfr.RealLiteral' object cannot be interpreted as an integer
**********************************************************************
File "src/sage_docbuild/utils.py", line 110, in sage_docbuild.utils
Failed example:
    build_many(target, range(8), processes=8)
Expected:
    Traceback (most recent call last):
    ...
    WorkerDiedException: worker for 4 died with non-zero exit code -9
Got:
    <BLANKLINE>
    Traceback (most recent call last):
      File "/usr/lib/sage-9.5.beta8/local/var/lib/sage/venv-python3.10/lib/python3.10/site-packages/sage/doctest/forker.py", line 694, in _run
        self.compile_and_execute(example, compiler, test.globs)
      File "/usr/lib/sage-9.5.beta8/local/var/lib/sage/venv-python3.10/lib/python3.10/site-packages/sage/doctest/forker.py", line 1088, in compile_and_execute
        exec(compiled, globs)
      File "<doctest sage_docbuild.utils[8]>", line 1, in <module>
        build_many(target, range(Integer(8)), processes=Integer(8))
      File "/usr/lib/sage-9.5.beta8/local/var/lib/sage/venv-python3.10/lib/python3.10/site-packages/sage_docbuild/utils.py", line 289, in build_many
        raise worker_exc.original_exception
    TypeError: 'sage.rings.real_mpfr.RealLiteral' object cannot be interpreted as an integer
**********************************************************************
1 item had failures:
   2 of  10 in sage_docbuild.utils
    [9 tests, 2 failures, 1.43 s]

comment:103 Changed 12 months ago by git

Commit: 249357dd30c54162e4b9204d6113c70b310a5087df9f1d4ced4264f65ab704f725f6f5879b012796

Branch pushed to git repo; I updated commit sha1. New commits:

df9f1d4Pass float(0.5) to time.sleep

comment:104 Changed 12 months ago by Gonzalo Tornaría

This seems to be the root cause:

┌────────────────────────────────────────────────────────────────────┐
│ SageMath version 9.5.beta8, Release Date: 2021-12-12               │
│ Using Python 3.10.1. Type "help()" for help.                       │
└────────────────────────────────────────────────────────────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Warning: this is a prerelease version, and it may be unstable.     ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
sage: import time
sage: time.sleep(0.5)
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-2-b448069dbb3c> in <module>
----> 1 time.sleep(RealNumber('0.5'))

TypeError: 'sage.rings.real_mpfr.RealLiteral' object cannot be interpreted as an integer

Now the same thing --without-system-python:

┌────────────────────────────────────────────────────────────────────┐
│ SageMath version 9.5.beta8, Release Date: 2021-12-12               │
│ Using Python 3.9.7. Type "help()" for help.                        │
└────────────────────────────────────────────────────────────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Warning: this is a prerelease version, and it may be unstable.     ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
sage: import time
sage: time.sleep(0.5)
<ipython-input-2-b448069dbb3c>:1: DeprecationWarning: an integer is required (got type sage.rings.real_mpfr.RealLiteral).  Implicit conversion to integers using __int__ is deprecated, and may be removed in a future version of Python.
  time.sleep(RealNumber('0.5'))
Last edited 12 months ago by Gonzalo Tornaría (previous) (diff)

comment:105 Changed 12 months ago by Gonzalo Tornaría

Everything passes now for me using system python 3.10.1 on void linux:

$ ./sage -tp 36 --optional sage,optional,build --all
...
----------------------------------------------------------------------
All tests passed!
----------------------------------------------------------------------
Total time for all tests: 236.9 seconds
    cpu time: 7024.5 seconds
    cumulative wall time: 6565.8 seconds

comment:106 Changed 12 months ago by Matthias Köppe

Reviewers: ..., Matthias Koeppe

comment:107 Changed 12 months ago by Antonio Rojas

Reviewers: ..., Matthias KoeppeAntonio Rojas, Matthias Koeppe
Status: needs_reviewpositive_review

All tests passing here too, thanks!

comment:108 Changed 12 months ago by Matthias Köppe

Thanks!

comment:109 Changed 12 months ago by Matthias Köppe

The dependency #33040 needs review so that we can get this ticket merged.

comment:110 Changed 11 months ago by Volker Braun

Branch: u/tornaria/support_python_3_10df9f1d4ced4264f65ab704f725f6f5879b012796
Resolution: fixed
Status: positive_reviewclosed

comment:111 Changed 11 months ago by Antonio Rojas

Commit: df9f1d4ced4264f65ab704f725f6f5879b012796

Something regressed in 9.5.rc0 which is causing distutils deprecation warnings

File "/usr/lib/python3.10/site-packages/sage/env.py", line 359, in sage.env.sage_include_directories
Failed example:
    sage.env.sage_include_directories()
Expected:
    ['.../include/python...',
    '.../python.../numpy/core/include']
Got:
    doctest:warning
      File "/usr/bin/sage-runtests", line 155, in <module>
        err = DC.run()
      File "/usr/lib/python3.10/site-packages/sage/doctest/control.py", line 1256, in run
        self.run_doctests()
      File "/usr/lib/python3.10/site-packages/sage/doctest/control.py", line 957, in run_doctests
        self.dispatcher.dispatch()
      File "/usr/lib/python3.10/site-packages/sage/doctest/forker.py", line 2004, in dispatch
        self.parallel_dispatch()
      File "/usr/lib/python3.10/site-packages/sage/doctest/forker.py", line 1899, in parallel_dispatch
        w.start()  # This might take some time
      File "/usr/lib/python3.10/site-packages/sage/doctest/forker.py", line 2173, in start
        super(DocTestWorker, self).start()
      File "/usr/lib/python3.10/multiprocessing/process.py", line 121, in start
        self._popen = self._Popen(self)
      File "/usr/lib/python3.10/multiprocessing/context.py", line 224, in _Popen
        return _default_context.get_context().Process._Popen(process_obj)
      File "/usr/lib/python3.10/multiprocessing/context.py", line 277, in _Popen
        return Popen(process_obj)
      File "/usr/lib/python3.10/multiprocessing/popen_fork.py", line 19, in __init__
        self._launch(process_obj)
      File "/usr/lib/python3.10/multiprocessing/popen_fork.py", line 71, in _launch
        code = process_obj._bootstrap(parent_sentinel=child_r)
      File "/usr/lib/python3.10/multiprocessing/process.py", line 315, in _bootstrap
        self.run()
      File "/usr/lib/python3.10/site-packages/sage/doctest/forker.py", line 2145, in run
        task(self.options, self.outtmpfile, msgpipe, self.result_queue)
      File "/usr/lib/python3.10/site-packages/sage/doctest/forker.py", line 2475, in __call__
        doctests, extras = self._run(runner, options, results)
      File "/usr/lib/python3.10/site-packages/sage/doctest/forker.py", line 2527, in _run
        result = runner.run(test)
      File "/usr/lib/python3.10/site-packages/sage/doctest/forker.py", line 861, in run
        return self._run(test, compileflags, out)
      File "/usr/lib/python3.10/site-packages/sage/doctest/forker.py", line 694, in _run
        self.compile_and_execute(example, compiler, test.globs)
      File "/usr/lib/python3.10/site-packages/sage/doctest/forker.py", line 1088, in compile_and_execute
        exec(compiled, globs)
      File "<doctest sage.env.sage_include_directories[1]>", line 1, in <module>
        sage.env.sage_include_directories()
      File "/usr/lib/python3.10/site-packages/sage/env.py", line 375, in sage_include_directories
        import distutils.sysconfig
      File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
      File "<frozen importlib._bootstrap>", line 992, in _find_and_load_unlocked
      File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
      File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
      File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
      File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
      File "<frozen importlib._bootstrap_external>", line 883, in exec_module
      File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
      File "/usr/lib/python3.10/distutils/__init__.py", line 19, in <module>
        warnings.warn(_DEPRECATION_MESSAGE,
      File "/usr/lib/python3.10/warnings.py", line 109, in _showwarnmsg
        sw(msg.message, msg.category, msg.filename, msg.lineno,
    :
    DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
    doctest:warning
      File "/usr/bin/sage-runtests", line 155, in <module>
        err = DC.run()
      File "/usr/lib/python3.10/site-packages/sage/doctest/control.py", line 1256, in run
        self.run_doctests()
      File "/usr/lib/python3.10/site-packages/sage/doctest/control.py", line 957, in run_doctests
        self.dispatcher.dispatch()
      File "/usr/lib/python3.10/site-packages/sage/doctest/forker.py", line 2004, in dispatch
        self.parallel_dispatch()
      File "/usr/lib/python3.10/site-packages/sage/doctest/forker.py", line 1899, in parallel_dispatch
        w.start()  # This might take some time
      File "/usr/lib/python3.10/site-packages/sage/doctest/forker.py", line 2173, in start
        super(DocTestWorker, self).start()
      File "/usr/lib/python3.10/multiprocessing/process.py", line 121, in start
        self._popen = self._Popen(self)
      File "/usr/lib/python3.10/multiprocessing/context.py", line 224, in _Popen
        return _default_context.get_context().Process._Popen(process_obj)
      File "/usr/lib/python3.10/multiprocessing/context.py", line 277, in _Popen
        return Popen(process_obj)
      File "/usr/lib/python3.10/multiprocessing/popen_fork.py", line 19, in __init__
        self._launch(process_obj)
      File "/usr/lib/python3.10/multiprocessing/popen_fork.py", line 71, in _launch
        code = process_obj._bootstrap(parent_sentinel=child_r)
      File "/usr/lib/python3.10/multiprocessing/process.py", line 315, in _bootstrap
        self.run()
      File "/usr/lib/python3.10/site-packages/sage/doctest/forker.py", line 2145, in run
        task(self.options, self.outtmpfile, msgpipe, self.result_queue)
      File "/usr/lib/python3.10/site-packages/sage/doctest/forker.py", line 2475, in __call__
        doctests, extras = self._run(runner, options, results)
      File "/usr/lib/python3.10/site-packages/sage/doctest/forker.py", line 2527, in _run
        result = runner.run(test)
      File "/usr/lib/python3.10/site-packages/sage/doctest/forker.py", line 861, in run
        return self._run(test, compileflags, out)
      File "/usr/lib/python3.10/site-packages/sage/doctest/forker.py", line 694, in _run
        self.compile_and_execute(example, compiler, test.globs)
      File "/usr/lib/python3.10/site-packages/sage/doctest/forker.py", line 1088, in compile_and_execute
        exec(compiled, globs)
      File "<doctest sage.env.sage_include_directories[1]>", line 1, in <module>
        sage.env.sage_include_directories()
      File "/usr/lib/python3.10/site-packages/sage/env.py", line 375, in sage_include_directories
        import distutils.sysconfig
      File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
      File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
      File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
      File "<frozen importlib._bootstrap_external>", line 883, in exec_module
      File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
      File "/usr/lib/python3.10/distutils/sysconfig.py", line 58, in <module>
        warnings.warn(
      File "/usr/lib/python3.10/warnings.py", line 109, in _showwarnmsg
        sw(msg.message, msg.category, msg.filename, msg.lineno,
    :
    DeprecationWarning: The distutils.sysconfig module is deprecated, use sysconfig instead
    ['/usr/lib/python3.10/site-packages',
     '/usr/include/python3.10',
     '/usr/lib/python3.10/site-packages/numpy/core/include']
**********************************************************************

These didn't happen with 9.5.beta9 + this branch.

comment:112 in reply to:  111 Changed 11 months ago by Antonio Rojas

Replying to arojas:

Something regressed in 9.5.rc0 which is causing distutils deprecation warnings

This comes from #32938, in particular form the removal of

from Cython.Build.Dependencies import strip_string_literals as cython_strip_string_literals

from sage.doctest.parsing. That import used to throw a distutils deprecation warning that for some reason was ignored during doctesting, and now that it's gone the warning is printed when doctesting any module that calls distutils.sysconfig.

comment:113 Changed 11 months ago by Andrew

adding internet to --optional= shows that all context=SSLContext() should be replaced with context=ssl.create_default_context()

comment:114 Changed 11 months ago by Gonzalo Tornaría

These three seem to fix all the warnings for me (numpy 1.22 from system via #29665)

--- a/src/sage/all.py	2022-01-09 15:34:29.833828362 -0300
+++ b/src/sage/all.py	2022-01-09 15:39:40.150091390 -0300
@@ -96,6 +96,15 @@
 warnings.filterwarnings('ignore', category=DeprecationWarning,
                         module='pythran')
 
+warnings.filterwarnings('ignore', category=DeprecationWarning,
+			module='numpy', message='.*distutils.*')
+
+warnings.filterwarnings('ignore', category=DeprecationWarning,
+			module='sage.env', message='.*distutils.*')
+
+warnings.filterwarnings('ignore', category=DeprecationWarning,
+			module='sage.features', message='.*distutils.*')
+
 ################ end setup warnings ###############################
 
 

Edit: fixed paths in the patch.

Last edited 11 months ago by Gonzalo Tornaría (previous) (diff)

comment:115 Changed 11 months ago by Gonzalo Tornaría

Please see and review #33135.

Note: See TracTickets for help on using tickets.