Commit 0edaaae3 authored by Mauricio Collares's avatar Mauricio Collares
Browse files

sage: 9.8 -> 10.0

parent 19bf4ba0
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -128,7 +128,7 @@ let

  singular = pkgs.singular.override { inherit flint; };

  maxima = pkgs.maxima-ecl-5_45.override {
  maxima = pkgs.maxima-ecl.override {
    lisp-compiler = pkgs.ecl.override {
      # "echo syntax error | ecl > /dev/full 2>&1" segfaults in
      # ECL. We apply a patch to fix it (write_error.patch), but it
+0 −19
Original line number Diff line number Diff line
diff --git a/src/sage/repl/configuration.py b/src/sage/repl/configuration.py
index 67d7d2accf..18279581e2 100644
--- a/src/sage/repl/configuration.py
+++ b/src/sage/repl/configuration.py
@@ -9,10 +9,11 @@ the IPython simple prompt is being used::
     sage: cmd = 'print([sys.stdin.isatty(), sys.stdout.isatty()])'
     sage: import pexpect
     sage: output = pexpect.run(
-    ....:     'bash -c \'echo "{0}" | sage\''.format(cmd),
+    ....:     'bash -c \'export SAGE_BANNER=no; echo "{0}" | sage\''.format(cmd),
     ....: ).decode('utf-8', 'surrogateescape')
-    sage: 'sage: [False, True]' in output
-    True
+    sage: print(output)
+    sage...[False, True]
+    ...
 """
 
 #*****************************************************************************
+0 −87
Original line number Diff line number Diff line
diff --git a/src/sage/env.py b/src/sage/env.py
index c4953cfa65..47b880f9ad 100644
--- a/src/sage/env.py
+++ b/src/sage/env.py
@@ -244,81 +244,8 @@ os.environ['MPMATH_SAGE'] = '1'
 SAGE_BANNER = var("SAGE_BANNER", "")
 SAGE_IMPORTALL = var("SAGE_IMPORTALL", "yes")
 
-
-def _get_shared_lib_path(*libnames: str) -> Optional[str]:
-    """
-    Return the full path to a shared library file installed in
-    ``$SAGE_LOCAL/lib`` or the directories associated with the
-    Python sysconfig.
-
-    This can also be passed more than one library name (e.g. for cases where
-    some library may have multiple names depending on the platform) in which
-    case the first one found is returned.
-
-    This supports most *NIX variants (in which ``lib<libname>.so`` is found
-    under ``$SAGE_LOCAL/lib``), macOS (same, but with the ``.dylib``
-    extension), and Cygwin (under ``$SAGE_LOCAL/bin/cyg<libname>.dll``,
-    or ``$SAGE_LOCAL/bin/cyg<libname>-*.dll`` for versioned DLLs).
-
-    For distributions like Debian that use a multiarch layout, we also try the
-    multiarch lib paths (i.e. ``/usr/lib/<arch>/``).
-
-    This returns ``None`` if no matching library file could be found.
-
-    EXAMPLES::
-
-        sage: from sage.env import _get_shared_lib_path
-        sage: "gap" in _get_shared_lib_path("gap")
-        True
-        sage: _get_shared_lib_path("an_absurd_lib") is None
-        True
-
-    """
-
-    for libname in libnames:
-        search_directories: List[Path] = []
-        patterns: List[str] = []
-        if sys.platform == 'cygwin':
-            # Later down we take the first matching DLL found, so search
-            # SAGE_LOCAL first so that it takes precedence
-            if SAGE_LOCAL:
-                search_directories.append(Path(SAGE_LOCAL) / 'bin')
-            search_directories.append(Path(sysconfig.get_config_var('BINDIR')))
-            # Note: The following is not very robust, since if there are multible
-            # versions for the same library this just selects one more or less
-            # at arbitrary. However, practically speaking, on Cygwin, there
-            # will only ever be one version
-            patterns = [f'cyg{libname}.dll', f'cyg{libname}-*.dll']
-        else:
-            if sys.platform == 'darwin':
-                ext = 'dylib'
-            else:
-                ext = 'so'
-
-            if SAGE_LOCAL:
-                search_directories.append(Path(SAGE_LOCAL) / 'lib')
-            libdir = sysconfig.get_config_var('LIBDIR')
-            if libdir is not None:
-                libdir = Path(libdir)
-                search_directories.append(libdir)
-
-                multiarchlib = sysconfig.get_config_var('MULTIARCH')
-                if multiarchlib is not None:
-                    search_directories.append(libdir / multiarchlib),
-
-            patterns = [f'lib{libname}.{ext}']
-
-        for directory in search_directories:
-            for pattern in patterns:
-                path = next(directory.glob(pattern), None)
-                if path is not None:
-                    return str(path.resolve())
-
-    # Just return None if no files were found
-    return None
-
 # locate libgap shared object
-GAP_SO = var("GAP_SO", _get_shared_lib_path("gap", ""))
+GAP_SO = var("GAP_SO", '/default')
 
 # post process
 if DOT_SAGE is not None and ' ' in DOT_SAGE:
+0 −19
Original line number Diff line number Diff line
diff --git a/src/sage/doctest/forker.py b/src/sage/doctest/forker.py
index 02e18e67e7..2ebf6eb35f 100644
--- a/src/sage/doctest/forker.py
+++ b/src/sage/doctest/forker.py
@@ -1075,6 +1075,14 @@ class SageDocTestRunner(doctest.DocTestRunner, object):
             sage: set(ex2.predecessors) == set([ex0,ex1])
             True
         """
+
+        # Fix ECL dir race conditions by using a separate dir for each process
+        # (https://trac.sagemath.org/ticket/26968)
+        os.environ['MAXIMA_USERDIR'] = "{}/sage-maxima-{}".format(
+            tempfile.gettempdir(),
+            os.getpid()
+        )
+
         if isinstance(globs, RecordingDict):
             globs.start()
         example.sequence_number = len(self.history)
+0 −58
Original line number Diff line number Diff line
diff --git a/src/sage/misc/persist.pyx b/src/sage/misc/persist.pyx
index 3ac5f1cc2b..cb1f327c19 100644
--- a/src/sage/misc/persist.pyx
+++ b/src/sage/misc/persist.pyx
@@ -157,7 +157,7 @@ def load(*filename, compress=True, verbose=True, **kwargs):
         ....:     _ = f.write(code)
         sage: load(t)
         sage: hello
-        <fortran object>
+        <fortran ...>
     """
     import sage.repl.load
     if len(filename) != 1:
diff --git a/src/sage/plot/complex_plot.pyx b/src/sage/plot/complex_plot.pyx
index 6f0aeab87a..b77c69b2f7 100644
--- a/src/sage/plot/complex_plot.pyx
+++ b/src/sage/plot/complex_plot.pyx
@@ -461,6 +461,8 @@ def complex_to_rgb(z_values, contoured=False, tiled=False,
             rgb[i, j, 2] = b
 
     sig_off()
+    nan_indices = np.isnan(rgb).any(-1)     # Mask for undefined points
+    rgb[nan_indices] = 1                    # Make nan_indices white
     return rgb
 
 
diff --git a/src/sage/plot/histogram.py b/src/sage/plot/histogram.py
index 3bc2b76b58..388c2d1391 100644
--- a/src/sage/plot/histogram.py
+++ b/src/sage/plot/histogram.py
@@ -87,13 +87,8 @@ class Histogram(GraphicPrimitive):
 
         TESTS::
 
-            sage: h = histogram([10,3,5], normed=True)[0]
-            doctest:warning...:
-            DeprecationWarning: the 'normed' option is deprecated. Use 'density' instead.
-            See https://trac.sagemath.org/25260 for details.
+            sage: h = histogram([10,3,5], density=True)[0]
             sage: h.get_minmax_data()
-            doctest:warning ...
-            ...VisibleDeprecationWarning: Passing `normed=True` on non-uniform bins has always been broken, and computes neither the probability density function nor the probability mass function. The result is only correct if the bins are uniform, when density=True will produce the same result anyway. The argument will be removed in a future version of numpy.
             {'xmax': 10.0, 'xmin': 3.0, 'ymax': 0.476190476190..., 'ymin': 0}
         """
         import numpy
diff --git a/src/sage/repl/ipython_extension.py b/src/sage/repl/ipython_extension.py
index 798671aab4..cad6a47ca8 100644
--- a/src/sage/repl/ipython_extension.py
+++ b/src/sage/repl/ipython_extension.py
@@ -405,7 +405,7 @@ class SageMagics(Magics):
             ....: C END FILE FIB1.F
             ....: ''')
             sage: fib
-            <fortran object>
+            <fortran ...>
             sage: from numpy import array
             sage: a = array(range(10), dtype=float)
             sage: fib(a, 10)
Loading