Date: Sunday, October 25, 2020 @ 09:53:58 Author: arojas Revision: 732268
Update to 9.2 Modified: sagemath-doc/trunk/PKGBUILD Deleted: sagemath-doc/trunk/sagemath-doc-sphinx-3.1.patch sagemath-doc/trunk/sagemath-doc-sphinx-3.patch sagemath-doc/trunk/sagemath-ecl-20.4.patch sagemath-doc/trunk/sagemath-matplotlib-3.2.patch -------------------------------+ PKGBUILD | 25 --- sagemath-doc-sphinx-3.1.patch | 18 -- sagemath-doc-sphinx-3.patch | 254 ------------------------------------ sagemath-ecl-20.4.patch | 275 ---------------------------------------- sagemath-matplotlib-3.2.patch | 62 --------- 5 files changed, 5 insertions(+), 629 deletions(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2020-10-25 09:53:23 UTC (rev 732267) +++ PKGBUILD 2020-10-25 09:53:58 UTC (rev 732268) @@ -1,8 +1,8 @@ # Maintainer: Antonio Rojas <aro...@archlinux.org> pkgname=sagemath-doc -pkgver=9.1 -pkgrel=2 +pkgver=9.2 +pkgrel=1 pkgdesc="HTML documentation for SageMath" arch=(any) url="http://www.sagemath.org" @@ -10,17 +10,9 @@ depends=(gap-doc python-pplpy) makedepends=(sagemath python-pyzmq python-docutils python-jupyter_client python-pkgconfig cython python-ipywidgets thebe) source=(sagemath-$pkgver.tar.gz::"https://github.com/sagemath/sage/archive/$pkgver.tar.gz" - docbuild_main.patch - sagemath-ecl-20.4.patch - sagemath-matplotlib-3.2.patch - sagemath-doc-sphinx-3.patch - sagemath-doc-sphinx-3.1.patch) -sha256sums=('07f3da5ca3e48f92c5a55b690408a3c87642689c28675a1f25b55a0f48ce5023' - 'ea5e17bb7a7cb36a22e5e3872fcc2585852bc971c4b139b0b2cd69a36c1b009b' - 'c50b6bd6ee6e00fc15ec267ac3187e234e5564f6c346c74d7ddaa5dc5f1fcd22' - '979777363001cca87f73128dd4db5f372fc9e4f1079805a20af01df47797468f' - '5576d2702a12b6c65e40bf1bdefe9a7f595e6c57fc6ff003903ce0f21643f64b' - 'eb5257d86dce1b3b7a8dd22e765efe59327b76524da7a7cf227163bc800b0ac8') + docbuild_main.patch) +sha256sums=('edc89776461247cf74a16473851378e70a2de867309978ca2346ef6f93af0f90' + 'ea5e17bb7a7cb36a22e5e3872fcc2585852bc971c4b139b0b2cd69a36c1b009b') options=(!strip) prepare() { @@ -31,13 +23,6 @@ # use sage_setup imports from sagemath source, but use system sage ones (which include compiled modules) mkdir -p local-python ln -sr src/sage_setup local-python -# Fix segfaults with ecl 20.4 https://trac.sagemath.org/ticket/22191 - patch -p1 -i ../sagemath-ecl-20.4.patch -# Fix warnings with matplotlib 3.2 - patch -p1 -i ../sagemath-matplotlib-3.2.patch -# Fix build with sphinx 3.1 - patch -p1 -i ../sagemath-doc-sphinx-3.patch - patch -p1 -i ../sagemath-doc-sphinx-3.1.patch SAGE_ROOT="$PWD" PATH="$PWD/build/bin:$PATH" src/doc/bootstrap } Deleted: sagemath-doc-sphinx-3.1.patch =================================================================== --- sagemath-doc-sphinx-3.1.patch 2020-10-25 09:53:23 UTC (rev 732267) +++ sagemath-doc-sphinx-3.1.patch 2020-10-25 09:53:58 UTC (rev 732268) @@ -1,18 +0,0 @@ -diff --git a/src/sage_setup/docbuild/ext/multidocs.py b/src/sage_setup/docbuild/ext/multidocs.py -index 37eddae1c9..130aa7c835 100644 ---- a/src/sage_setup/docbuild/ext/multidocs.py -+++ b/src/sage_setup/docbuild/ext/multidocs.py -@@ -92,9 +92,9 @@ def merge_environment(app, env): - env.domaindata['citation']['citations'].update(newcite) - # merge the py:module indexes - newmodules = {} -- for ind,(modpath,v1,v2,v3,v4) in ( -- six.iteritems(docenv.domaindata['py']['modules'])): -- newmodules[ind] = (fixpath(modpath),v1,v2,v3,v4) -+ from sphinx.domains.python import ModuleEntry -+ for ind,mod in six.iteritems(docenv.domaindata['py']['modules']): -+ newmodules[ind] = ModuleEntry(fixpath(mod.docname), mod.node_id, mod.synopsis, mod.platform, mod.deprecated) - env.domaindata['py']['modules'].update(newmodules) - - logger.info(", %s modules"%(len(newmodules))) - logger.info('... done (%s todos, %s index, %s citations, %s modules)'%( Deleted: sagemath-doc-sphinx-3.patch =================================================================== --- sagemath-doc-sphinx-3.patch 2020-10-25 09:53:23 UTC (rev 732267) +++ sagemath-doc-sphinx-3.patch 2020-10-25 09:53:58 UTC (rev 732268) @@ -1,254 +0,0 @@ -diff --git a/src/doc/en/thematic_tutorials/structures_in_coding_theory.rst b/src/doc/en/thematic_tutorials/structures_in_coding_theory.rst -index 13f1a83a2b..4726bce061 100644 ---- a/src/doc/en/thematic_tutorials/structures_in_coding_theory.rst -+++ b/src/doc/en/thematic_tutorials/structures_in_coding_theory.rst -@@ -721,8 +721,6 @@ derive from the one that follows. - - .. CODE-BLOCK:: python - -- :class:`sage.coding.repetition_code.BinaryRepetitionCode <sage.coding.repetition_code.BinaryRepetitionCode>` -- #the line above creates a link to the class in the html documentation of coding theory library - from sage.coding.repetition_code import BinaryRepetitionCode - - ``encoders_catalog.py`` (continued): -diff --git a/src/sage/combinat/permutation.py b/src/sage/combinat/permutation.py -index a68d6734f8..ae644cf28a 100644 ---- a/src/sage/combinat/permutation.py -+++ b/src/sage/combinat/permutation.py -@@ -415,9 +415,6 @@ class Permutation(CombinatorialElement): - [] - sage: Permutation( [[], []] ) - [] -- -- .. automethod:: Permutation.left_action_product -- .. automethod:: Permutation.right_action_product - """ - @staticmethod - def __classcall_private__(cls, l, check_input = True): -diff --git a/src/sage/docs/conf.py b/src/sage/docs/conf.py -index 10664c67f5..768729fb3c 100644 ---- a/src/sage/docs/conf.py -+++ b/src/sage/docs/conf.py -@@ -8,6 +8,7 @@ from docutils import nodes - from docutils.transforms import Transform - from sphinx.ext.doctest import blankline_re - from sphinx import highlighting -+import sphinx.ext.intersphinx as intersphinx - from IPython.lib.lexers import IPythonConsoleLexer, IPyLexer - - # If your extensions are in another directory, add it here. -@@ -173,13 +174,8 @@ todo_include_todos = True - - # Cross-links to other project's online documentation. - python_version = sys.version_info.major --intersphinx_mapping = { -- 'python': ('https://docs.python.org/', -- os.path.join(SAGE_DOC_SRC, "common", -- "python{}.inv".format(python_version))), -- 'pplpy': (PPLPY_DOCS, None)} - --def set_intersphinx_mappings(app): -+def set_intersphinx_mappings(app, config): - """ - Add precompiled inventory (the objects.inv) - """ -@@ -190,7 +186,11 @@ def set_intersphinx_mappings(app): - app.config.intersphinx_mapping = {} - return - -- app.config.intersphinx_mapping = intersphinx_mapping -+ app.config.intersphinx_mapping = { -+ 'python': ('https://docs.python.org/', -+ os.path.join(SAGE_DOC_SRC, "common", -+ "python{}.inv".format(python_version))), -+ 'pplpy': (PPLPY_DOCS, None)} - - # Add master intersphinx mapping - dst = os.path.join(invpath, 'objects.inv') -@@ -205,6 +205,7 @@ def set_intersphinx_mappings(app): - dst = os.path.join(invpath, directory, 'objects.inv') - app.config.intersphinx_mapping[src] = dst - -+ intersphinx.normalize_intersphinx_mapping(app, config) - - # By default document are not master. - multidocs_is_master = True -@@ -673,7 +674,7 @@ def call_intersphinx(app, env, node, contnode): - """ - debug_inf(app, "???? Trying intersphinx for %s" % node['reftarget']) - builder = app.builder -- res = sphinx.ext.intersphinx.missing_reference( -+ res = intersphinx.missing_reference( - app, env, node, contnode) - if res: - # Replace absolute links to $SAGE_DOC by relative links: this -@@ -856,11 +857,10 @@ def setup(app): - if app.srcdir.startswith(SAGE_DOC_SRC): - app.add_config_value('intersphinx_mapping', {}, False) - app.add_config_value('intersphinx_cache_limit', 5, False) -+ app.connect('config-inited', set_intersphinx_mappings) -+ app.connect('builder-inited', intersphinx.load_mappings) - # We do *not* fully initialize intersphinx since we call it by hand - # in find_sage_dangling_links. - # app.connect('missing-reference', missing_reference) - app.connect('missing-reference', find_sage_dangling_links) -- import sphinx.ext.intersphinx -- app.connect('builder-inited', set_intersphinx_mappings) -- app.connect('builder-inited', sphinx.ext.intersphinx.load_mappings) - app.connect('builder-inited', nitpick_patch_config) -diff --git a/src/sage_setup/docbuild/__init__.py b/src/sage_setup/docbuild/__init__.py -index 128117b960..5aad13c8c5 100644 ---- a/src/sage_setup/docbuild/__init__.py -+++ b/src/sage_setup/docbuild/__init__.py -@@ -817,9 +817,13 @@ class ReferenceSubBuilder(DocBuilder): - - env_pickle = os.path.join(self._doctrees_dir(), 'environment.pickle') - try: -- env = BuildEnvironment.frompickle(env_pickle, FakeApp(self.dir)) -- logger.debug("Opened Sphinx environment: %s", env_pickle) -- return env -+ with open(env_pickle, 'rb') as f: -+ import pickle -+ env = pickle.load(f) -+ env.app = FakeApp(self.dir) -+ env.config.values = env.app.config.values -+ logger.debug("Opened Sphinx environment: %s", env_pickle) -+ return env - except IOError as err: - logger.debug("Failed to open Sphinx environment: %s", err) - -diff --git a/src/sage_setup/docbuild/ext/multidocs.py b/src/sage_setup/docbuild/ext/multidocs.py -index 71a08cd937..ffed722d33 100644 ---- a/src/sage_setup/docbuild/ext/multidocs.py -+++ b/src/sage_setup/docbuild/ext/multidocs.py -@@ -52,27 +52,29 @@ def merge_environment(app, env): - docenv = get_env(app, curdoc) - if docenv is not None: - fixpath = lambda path: os.path.join(curdoc, path) -+ todos = docenv.domaindata['todo'].get('todos', dict()) -+ citations = docenv.domaindata['citation'].get('citations', dict()) -+ indexentries = docenv.domaindata['index'].get('entries', dict()) - logger.info(" %s todos, %s index, %s citations"%( -- len(docenv.todo_all_todos), -- len(docenv.indexentries), -- len(docenv.domaindata["std"]["citations"]) -+ sum(len(t) for t in todos.values()), -+ len(indexentries), -+ len(citations) - ), nonl=1) - - # merge titles - for t in docenv.titles: - env.titles[fixpath(t)] = docenv.titles[t] - # merge the todo links -- for dct in docenv.todo_all_todos: -- dct['docname'] = fixpath(dct['docname']) -- env.todo_all_todos += docenv.todo_all_todos -+ for dct in todos: -+ env.domaindata['todo']['todos'][fixpath(dct)] = todos[dct] - # merge the html index links - newindex = {} -- for ind in docenv.indexentries: -+ for ind in indexentries: - if ind.startswith('sage/'): -- newindex[fixpath(ind)] = docenv.indexentries[ind] -+ newindex[fixpath(ind)] = indexentries[ind] - else: -- newindex[ind] = docenv.indexentries[ind] -- env.indexentries.update(newindex) -+ newindex[ind] = indexentries[ind] -+ env.domaindata['index']['entries'].update(newindex) - # merge the all_docs links, needed by the js index - newalldoc = {} - for ind in docenv.all_docs: -@@ -86,24 +88,23 @@ def merge_environment(app, env): - env.metadata[ind] = md - # merge the citations - newcite = {} -- citations = docenv.domaindata["std"]["citations"] -- for ind, (path, tag, lineno) in six.iteritems(docenv.domaindata["std"]["citations"]): -+ for ind, (path, tag, lineno) in six.iteritems(citations): - # TODO: Warn on conflicts - newcite[ind] = (fixpath(path), tag, lineno) -- env.domaindata["std"]["citations"].update(newcite) -+ env.domaindata['citation']['citations'].update(newcite) - # merge the py:module indexes - newmodules = {} -- for ind,(modpath,v1,v2,v3) in ( -+ for ind,(modpath,v1,v2,v3,v4) in ( - six.iteritems(docenv.domaindata['py']['modules'])): -- newmodules[ind] = (fixpath(modpath),v1,v2,v3) -+ newmodules[ind] = (fixpath(modpath),v1,v2,v3,v4) - env.domaindata['py']['modules'].update(newmodules) - logger.info(", %s modules"%(len(newmodules))) - logger.info('... done (%s todos, %s index, %s citations, %s modules)'%( -- len(env.todo_all_todos), -- len(env.indexentries), -- len(env.domaindata["std"]["citations"]), -+ sum(len(t) for t in env.domaindata['todo']['todos'].values()), -+ len(env.domaindata['index']['entries']), -+ len(env.domaindata['citation']['citations']), - len(env.domaindata['py']['modules']))) -- write_citations(app, env.domaindata["std"]["citations"]) -+ write_citations(app, env.domaindata['citation']['citations']) - - - def get_env(app, curdoc): -@@ -253,7 +254,7 @@ def fetch_citation(app, env): - with open(filename, 'rb') as f: - cache = cPickle.load(f) - logger.info("done (%s citations)."%len(cache)) -- cite = env.domaindata["std"]["citations"] -+ cite = env.domaindata['citation'].get('citations', dict()) - for ind, (path, tag, lineno) in six.iteritems(cache): - if ind not in cite: # don't override local citation - cite[ind] = (os.path.join("..", path), tag, lineno) -diff --git a/src/sage_setup/docbuild/ext/sage_autodoc.py b/src/sage_setup/docbuild/ext/sage_autodoc.py -index bba274fe35..179fc25d0e 100644 ---- a/src/sage_setup/docbuild/ext/sage_autodoc.py -+++ b/src/sage_setup/docbuild/ext/sage_autodoc.py -@@ -35,14 +35,15 @@ import sys - from docutils.statemachine import ViewList - - import sphinx --from sphinx.ext.autodoc.importer import mock, import_object, get_object_members -+from sphinx.ext.autodoc import mock -+from sphinx.ext.autodoc.importer import import_object, get_object_members, get_module_members - from sphinx.locale import _, __ - from sphinx.pycode import ModuleAnalyzer - from sphinx.errors import PycodeError - from sphinx.util import logging - from sphinx.util import rpartition, force_decode - from sphinx.util.docstrings import prepare_docstring --from sphinx.util.inspect import isdescriptor, safe_getmembers, \ -+from sphinx.util.inspect import isdescriptor, \ - safe_getattr, object_description, is_builtin_class_method, \ - isenumattribute, isclassmethod, isstaticmethod, getdoc - -@@ -536,7 +537,7 @@ class Documenter(object): - - # add content from docstrings - if not no_docstring: -- encoding = self.analyzer and self.analyzer.encoding -+ encoding = self.analyzer and self.analyzer._encoding - docstrings = self.get_doc(encoding) - if not docstrings: - # append at least a dummy docstring, so that the event -@@ -882,7 +883,7 @@ class ModuleDocumenter(Documenter): - if not hasattr(self.object, '__all__'): - # for implicit module members, check __module__ to avoid - # documenting imported objects -- return True, safe_getmembers(self.object) -+ return True, get_module_members(self.object) - else: - memberlist = self.object.__all__ - # Sometimes __all__ is broken... -@@ -893,7 +894,7 @@ class ModuleDocumenter(Documenter): - '(in module %s) -- ignoring __all__' % - (memberlist, self.fullname)) - # fall back to all members -- return True, safe_getmembers(self.object) -+ return True, get_module_members(self.object) - else: - memberlist = self.options.members or [] - ret = [] Deleted: sagemath-ecl-20.4.patch =================================================================== --- sagemath-ecl-20.4.patch 2020-10-25 09:53:23 UTC (rev 732267) +++ sagemath-ecl-20.4.patch 2020-10-25 09:53:58 UTC (rev 732268) @@ -1,275 +0,0 @@ -diff --git a/src/sage/interfaces/interface.py b/src/sage/interfaces/interface.py -index 616c13d..430ba80 100644 ---- a/src/sage/interfaces/interface.py -+++ b/src/sage/interfaces/interface.py -@@ -589,9 +589,9 @@ class Interface(WithEqualityById, ParentWithBase): - EXAMPLES:: - - sage: maxima.quad_qags(x, x, 0, 1, epsrel=1e-4) -- [0.5,0.55511151231257...e-14,21,0] -+ [0.5,5.5511151231257...e-15,21,0] - sage: maxima.function_call('quad_qags', [x, x, 0, 1], {'epsrel':'1e-4'}) -- [0.5,0.55511151231257...e-14,21,0] -+ [0.5,5.5511151231257...e-15,21,0] - """ - args, kwds = self._convert_args_kwds(args, kwds) - self._check_valid_function_name(function) -diff --git a/src/sage/interfaces/maxima.py b/src/sage/interfaces/maxima.py -index 9ab456e..3e8f4a6 100644 ---- a/src/sage/interfaces/maxima.py -+++ b/src/sage/interfaces/maxima.py -@@ -128,9 +128,9 @@ http://maxima.sourceforge.net/docs/intromax/intromax.html. - - sage: a = maxima('(1 + sqrt(2))^5') - sage: float(a) -- 82.01219330881975 -+ 82.0121933088197... - sage: a.numer() -- 82.01219330881975 -+ 82.0121933088197... - - :: - -diff --git a/src/sage/interfaces/maxima_abstract.py b/src/sage/interfaces/maxima_abstract.py -index 86fbe75..ed3055d 100644 ---- a/src/sage/interfaces/maxima_abstract.py -+++ b/src/sage/interfaces/maxima_abstract.py -@@ -1518,7 +1518,7 @@ class MaximaAbstractElement(ExtraTabCompletion, InterfaceElement): - EXAMPLES:: - - sage: maxima('exp(-sqrt(x))').nintegral('x',0,1) -- (0.5284822353142306, 0.41633141378838...e-10, 231, 0) -+ (0.5284822353142306, 4.1633141378838...e-11, 231, 0) - - Note that GP also does numerical integration, and can do so to very - high precision very quickly:: -diff --git a/src/sage/interfaces/tests.py b/src/sage/interfaces/tests.py -index fc77f12..a6847a9 100644 ---- a/src/sage/interfaces/tests.py -+++ b/src/sage/interfaces/tests.py -@@ -31,8 +31,8 @@ Test that write errors to stderr are handled gracefully by GAP - ....: except IOError: - ....: f = open('/dev/null', 'w') - sage: kwds = dict(shell=True, stdout=f, stderr=f) -- sage: subprocess.call("echo syntax error | ecl", **kwds) -- 0 -+ sage: subprocess.call("echo syntax error | ecl", **kwds) in (0, 255) -+ True - sage: subprocess.call("echo syntax error | gap", **kwds) in (0, 1) - True - sage: subprocess.call("echo syntax error | gp", **kwds) -diff --git a/src/sage/libs/ecl.pxd b/src/sage/libs/ecl.pxd -index 4dd273f..f0b30de 100644 ---- a/src/sage/libs/ecl.pxd -+++ b/src/sage/libs/ecl.pxd -@@ -39,7 +39,6 @@ cdef extern from "ecl/ecl.h": - ECL_OPT_TRAP_SIGINT, - ECL_OPT_TRAP_SIGILL, - ECL_OPT_TRAP_SIGBUS, -- ECL_OPT_TRAP_SIGCHLD, - ECL_OPT_TRAP_SIGPIPE, - ECL_OPT_TRAP_INTERRUPT_SIGNAL, - ECL_OPT_SIGNAL_HANDLING_THREAD, -@@ -53,7 +52,6 @@ cdef extern from "ecl/ecl.h": - ECL_OPT_LISP_STACK_SAFETY_AREA, - ECL_OPT_C_STACK_SIZE, - ECL_OPT_C_STACK_SAFETY_AREA, -- ECL_OPT_SIGALTSTACK_SIZE, - ECL_OPT_HEAP_SIZE, - ECL_OPT_HEAP_SAFETY_AREA, - ECL_OPT_THREAD_INTERRUPT_SIGNAL, -diff --git a/src/sage/libs/ecl.pyx b/src/sage/libs/ecl.pyx -index e408866..fa24ac0 100644 ---- a/src/sage/libs/ecl.pyx -+++ b/src/sage/libs/ecl.pyx -@@ -15,7 +15,7 @@ Library interface to Embeddable Common Lisp (ECL) - #adapted to work with pure Python types. - - from libc.stdlib cimport abort --from libc.signal cimport SIGINT, SIGBUS, SIGSEGV, SIGCHLD -+from libc.signal cimport SIGINT, SIGBUS, SIGFPE, SIGSEGV - from libc.signal cimport raise_ as signal_raise - from posix.signal cimport sigaction, sigaction_t - cimport cysignals.signals -@@ -47,9 +47,14 @@ cdef extern from "eclsig.h": - void ecl_sig_off() - cdef sigaction_t ecl_sigint_handler - cdef sigaction_t ecl_sigbus_handler -+ cdef sigaction_t ecl_sigfpe_handler - cdef sigaction_t ecl_sigsegv_handler - cdef mpz_t ecl_mpz_from_bignum(cl_object obj) - cdef cl_object ecl_bignum_from_mpz(mpz_t num) -+ cdef int fegetexcept() -+ cdef int feenableexcept(int) -+ cdef int fedisableexcept(int) -+ cdef int ecl_feflags - - cdef cl_object string_to_object(char * s): - return ecl_read_from_cstring(s) -@@ -139,7 +143,6 @@ def test_ecl_options(): - ECL_OPT_TRAP_SIGINT = 1 - ECL_OPT_TRAP_SIGILL = 1 - ECL_OPT_TRAP_SIGBUS = 1 -- ECL_OPT_TRAP_SIGCHLD = 0 - ECL_OPT_TRAP_SIGPIPE = 1 - ECL_OPT_TRAP_INTERRUPT_SIGNAL = 1 - ECL_OPT_SIGNAL_HANDLING_THREAD = 0 -@@ -153,7 +156,6 @@ def test_ecl_options(): - ECL_OPT_LISP_STACK_SAFETY_AREA = ... - ECL_OPT_C_STACK_SIZE = ... - ECL_OPT_C_STACK_SAFETY_AREA = ... -- ECL_OPT_SIGALTSTACK_SIZE = 1 - ECL_OPT_HEAP_SIZE = ... - ECL_OPT_HEAP_SAFETY_AREA = ... - ECL_OPT_THREAD_INTERRUPT_SIGNAL = ... -@@ -171,8 +173,6 @@ def test_ecl_options(): - ecl_get_option(ECL_OPT_TRAP_SIGILL))) - print('ECL_OPT_TRAP_SIGBUS = {0}'.format( - ecl_get_option(ECL_OPT_TRAP_SIGBUS))) -- print('ECL_OPT_TRAP_SIGCHLD = {0}'.format( -- ecl_get_option(ECL_OPT_TRAP_SIGCHLD))) - print('ECL_OPT_TRAP_SIGPIPE = {0}'.format( - ecl_get_option(ECL_OPT_TRAP_SIGPIPE))) - print('ECL_OPT_TRAP_INTERRUPT_SIGNAL = {0}'.format( -@@ -199,8 +199,6 @@ def test_ecl_options(): - ecl_get_option(ECL_OPT_C_STACK_SIZE))) - print('ECL_OPT_C_STACK_SAFETY_AREA = {0}'.format( - ecl_get_option(ECL_OPT_C_STACK_SAFETY_AREA))) -- print('ECL_OPT_SIGALTSTACK_SIZE = {0}'.format( -- ecl_get_option(ECL_OPT_SIGALTSTACK_SIZE))) - print('ECL_OPT_HEAP_SIZE = {0}'.format( - ecl_get_option(ECL_OPT_HEAP_SIZE))) - print('ECL_OPT_HEAP_SAFETY_AREA = {0}'.format( -@@ -238,14 +243,12 @@ def init_ecl(): - global ecl_has_booted - cdef char *argv[1] - cdef sigaction_t sage_action[32] -+ cdef int sage_fpes - cdef int i - - if ecl_has_booted: - raise RuntimeError("ECL is already initialized") - -- # we need it to stop handling SIGCHLD -- ecl_set_option(ECL_OPT_TRAP_SIGCHLD, 0); -- - #we keep our own GMP memory functions. ECL should not claim them - ecl_set_option(ECL_OPT_SET_GMP_MEMORY_FUNCTIONS,0); - -@@ -257,6 +263,8 @@ def init_ecl(): - for i in range(1,32): - sigaction(i, NULL, &sage_action[i]) - -+ sage_fpes = fegetexcept() -+ - #initialize ECL - ecl_set_option(ECL_OPT_SIGNAL_HANDLING_THREAD, 0) - cl_boot(1, argv) -@@ -264,14 +272,12 @@ def init_ecl(): - #save signal handler from ECL - sigaction(SIGINT, NULL, &ecl_sigint_handler) - sigaction(SIGBUS, NULL, &ecl_sigbus_handler) -+ sigaction(SIGFPE, NULL, &ecl_sigfpe_handler) - sigaction(SIGSEGV, NULL, &ecl_sigsegv_handler) - -+ #save ECL's floating point exception flags -+ ecl_feflags = fegetexcept() -+ -- #verify that no SIGCHLD handler was installed -- cdef sigaction_t sig_test -- sigaction(SIGCHLD, NULL, &sig_test) -- assert sage_action[SIGCHLD].sa_handler == NULL # Sage does not set SIGCHLD handler -- assert sig_test.sa_handler == NULL # And ECL bootup did not set one -- - #and put the Sage signal handlers back - for i in range(1,32): - sigaction(i, &sage_action[i], NULL) -@@ -276,6 +288,9 @@ def init_ecl(): - for i in range(1,32): - sigaction(i, &sage_action[i], NULL) - -+ fedisableexcept(ecl_feflags) -+ feenableexcept(sage_fpes) -+ - #initialise list of objects and bind to global variable - # *SAGE-LIST-OF-OBJECTS* to make it rooted in the reachable tree for the GC - list_of_objects=cl_cons(Cnil,cl_cons(Cnil,Cnil)) -@@ -319,7 +334,6 @@ def init_ecl(): - (values nil (princ-to-string cnd))))) - """)) - safe_funcall_clobj=cl_eval(string_to_object(b"(symbol-function 'sage-safe-funcall)")) -- - ecl_has_booted = 1 - - cdef cl_object ecl_safe_eval(cl_object form) except NULL: -diff --git a/src/sage/libs/eclsig.h b/src/sage/libs/eclsig.h -index f9f2690..a7e1f40 100644 ---- a/src/sage/libs/eclsig.h -+++ b/src/sage/libs/eclsig.h -@@ -9,24 +9,66 @@ - - - #include <signal.h> -+ -+/* Rummage around to determine how ECL was configured */ -+#define ECL_AVOID_FPE_H /* Prevent some local includes */ -+#include <ecl/config-internal.h> -+ -+#ifdef HAVE_FENV_H -+#include <fenv.h> -+#ifndef FE_ALL_EXCEPT -+#define FE_ALL_EXCEPT FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW | FE_INVALID -+#endif -+#else -+#ifndef FE_ALL_EXCEPT -+#define FE_ALL_EXCEPT 0 -+#endif -+#define feclearexcept(flags) do {} while (0) -+#endif -+ -+#ifndef HAVE_FEENABLEEXCEPT -+/* These are GNU extensions */ -+#define fegetexcept() 0 -+#define feenablexcept(flags) do {} while (0) -+#define fdisableexcept(flags) do {} while (0) -+#endif -+ - static struct sigaction ecl_sigint_handler; - static struct sigaction ecl_sigbus_handler; -+static struct sigaction ecl_sigfpe_handler; - static struct sigaction ecl_sigsegv_handler; - static struct sigaction sage_sigint_handler; - static struct sigaction sage_sigbus_handler; -+static struct sigaction sage_sigfpe_handler; - static struct sigaction sage_sigsegv_handler; -+static int ecl_feflags; -+static int sage_feflags; - - static inline void set_ecl_signal_handler(void) - { - sigaction(SIGINT, &ecl_sigint_handler, &sage_sigint_handler); - sigaction(SIGBUS, &ecl_sigbus_handler, &sage_sigbus_handler); -+ sigaction(SIGFPE, &ecl_sigfpe_handler, &sage_sigfpe_handler); - sigaction(SIGSEGV, &ecl_sigsegv_handler, &sage_sigsegv_handler); -+ -+ /* first clear pending floating point exceptions, if any */ -+ feclearexcept(FE_ALL_EXCEPT); -+ -+ /* sage_feflags should be 0; we don't set them otherwise */ -+ sage_feflags = fedisableexcept(FE_ALL_EXCEPT); -+ feenableexcept(ecl_feflags); - } - - static inline void unset_ecl_signal_handler(void) - { -+ /* clear pending exceptions and restore previous exception mask */ -+ feclearexcept(FE_ALL_EXCEPT); -+ ecl_feflags = fedisableexcept(FE_ALL_EXCEPT); -+ feenableexcept(sage_feflags); -+ - sigaction(SIGINT, &sage_sigint_handler, NULL); - sigaction(SIGBUS, &sage_sigbus_handler, NULL); -+ sigaction(SIGFPE, &sage_sigfpe_handler, NULL); - sigaction(SIGSEGV, &sage_sigsegv_handler, NULL); - } - Deleted: sagemath-matplotlib-3.2.patch =================================================================== --- sagemath-matplotlib-3.2.patch 2020-10-25 09:53:23 UTC (rev 732267) +++ sagemath-matplotlib-3.2.patch 2020-10-25 09:53:58 UTC (rev 732268) @@ -1,62 +0,0 @@ -diff --git a/src/sage/plot/contour_plot.py b/src/sage/plot/contour_plot.py -index a7533fa3d9..12a2b1f670 100644 ---- a/src/sage/plot/contour_plot.py -+++ b/src/sage/plot/contour_plot.py -@@ -223,7 +223,7 @@ class ContourPlot(GraphicPrimitive): - cb.add_lines(CS) - - --@suboptions('colorbar', orientation='vertical', format=None, spacing=None) -+@suboptions('colorbar', orientation='vertical', format=None, spacing='uniform') - @suboptions('label', fontsize=9, colors='blue', inline=None, inline_spacing=3, - fmt="%1.2f") - @options(plot_points=100, fill=True, contours=None, linewidths=None, -diff --git a/src/sage/plot/colors.py b/src/sage/plot/colors.py -index 1860b6c948..af6fc7ec64 100644 ---- a/src/sage/plot/colors.py -+++ b/src/sage/plot/colors.py -@@ -20,7 +20,7 @@ comprises the "official" W3C CSS3_ / SVG_ colors. - For a list of color maps in Sage, evaluate:: - - sage: sorted(colormaps) -- [u'Accent', u'Accent_r', u'Blues', u'Blues_r', u'BrBG', u'BrBG_r', ...] -+ [u'Accent', u'Blues', u'BrBG', ...] - - These are imported from matplotlib's cm_ module. - -@@ -1374,7 +1374,7 @@ def get_cmap(cmap): - and color names. For a list of map names, evaluate:: - - sage: sorted(colormaps) -- [u'Accent', u'Accent_r', u'Blues', u'Blues_r', ...] -+ [u'Accent', u'Blues', ...] - - See :func:`rgbcolor` for valid list/tuple element formats. - -@@ -1468,7 +1468,7 @@ class Colormaps(collections.MutableMapping): - For a list of map names, evaluate:: - - sage: sorted(colormaps) -- [u'Accent', u'Accent_r', u'Blues', u'Blues_r', ...] -+ [u'Accent', u'Blues', ...] - """ - def __init__(self): - """ -@@ -1495,7 +1495,7 @@ class Colormaps(collections.MutableMapping): - sage: len(maps.maps) - 0 - sage: maps.load_maps() -- sage: len(maps.maps)>130 -+ sage: len(maps.maps)>65 - True - """ - global cm -@@ -1539,7 +1539,7 @@ class Colormaps(collections.MutableMapping): - - sage: from sage.plot.colors import Colormaps - sage: maps = Colormaps() -- sage: len(maps)>130 -+ sage: len(maps)>65 - True - """ - self.load_maps()