sage: 9.5 -> 9.6

+30 -144
-46
pkgs/applications/science/math/sage/patches/Only-test-external-software-when-all-of-sage-is.patch
··· 1 - diff --git a/src/sage/doctest/control.py b/src/sage/doctest/control.py 2 - index 01f32fb8e4..4d83dc7b47 100644 3 - --- a/src/sage/doctest/control.py 4 - +++ b/src/sage/doctest/control.py 5 - @@ -1253,6 +1253,7 @@ class DocTestController(SageObject): 6 - 7 - self.log("Using --optional=" + self._optional_tags_string()) 8 - available_software._allow_external = self.options.optional is True or 'external' in self.options.optional 9 - + available_software._autodetect_safe = self.options.optional is True or 'sage' in self.options.optional 10 - self.log("Features to be detected: " + ','.join(available_software.detectable())) 11 - self.add_files() 12 - self.expand_files_into_sources() 13 - diff --git a/src/sage/doctest/external.py b/src/sage/doctest/external.py 14 - index 84dae19ea5..badc61466e 100644 15 - --- a/src/sage/doctest/external.py 16 - +++ b/src/sage/doctest/external.py 17 - @@ -409,6 +409,7 @@ class AvailableSoftware(object): 18 - [] 19 - """ 20 - self._allow_external = True 21 - + self._autodetect_safe = True 22 - # For multiprocessing of doctests, the data self._seen should be 23 - # shared among subprocesses. Thus we use Array class from the 24 - # multiprocessing module. 25 - @@ -430,6 +431,8 @@ class AvailableSoftware(object): 26 - sage: 'internet' in available_software # random, optional - internet 27 - True 28 - """ 29 - + if not self._autodetect_safe: 30 - + return False 31 - try: 32 - idx = self._indices[item] 33 - except KeyError: 34 - diff --git a/src/sage/features/sagemath.py b/src/sage/features/sagemath.py 35 - index 433338766d..233623b14a 100644 36 - --- a/src/sage/features/sagemath.py 37 - +++ b/src/sage/features/sagemath.py 38 - @@ -12,7 +12,7 @@ class sagemath_doc_html(StaticFile): 39 - 40 - EXAMPLES:: 41 - 42 - - sage: from sage.features.sagemath import sagemath_doc_html 43 - + sage: from sage.features.sagemath import sagemath_doc_html # optional - sagemath_doc_html 44 - sage: sagemath_doc_html().is_present() # optional - sagemath_doc_html 45 - FeatureTestResult('sagemath_doc_html', True) 46 - """
+1 -1
pkgs/applications/science/math/sage/patches/configurationpy-error-verbose.patch
··· 13 13 - True 14 14 + sage: print(output) 15 15 + sage...[False, True] 16 - + sage...Exiting Sage ... 16 + + ... 17 17 """ 18 18 19 19 #*****************************************************************************
+2 -2
pkgs/applications/science/math/sage/patches/docutils-0.18.1-deprecation.patch
··· 1 1 diff --git a/src/sage/misc/sagedoc.py b/src/sage/misc/sagedoc.py 2 - index 4c56aea078..e51a77ae8a 100644 2 + index 08c4225b87..3a9bbe4ed0 100644 3 3 --- a/src/sage/misc/sagedoc.py 4 4 +++ b/src/sage/misc/sagedoc.py 5 5 @@ -1402,6 +1402,8 @@ class _sage_doc: 6 6 sage: identity_matrix.__doc__ in browse_sage_doc(identity_matrix, 'rst') 7 7 True 8 - sage: browse_sage_doc(identity_matrix, 'html', False) # optional - sphinx 8 + sage: browse_sage_doc(identity_matrix, 'html', False) # optional - sphinx sagemath_doc_html 9 9 + ... 10 10 + FutureWarning: The configuration setting "embed_images" will be removed in Docutils 1.2. Use "image_loading: link". 11 11 '...div...File:...Type:...Definition:...identity_matrix...'
+10 -7
pkgs/applications/science/math/sage/patches/sphinx-docbuild-subprocesses.patch
··· 1 1 diff --git a/src/sage_docbuild/__init__.py b/src/sage_docbuild/__init__.py 2 - index 8a5c1a19d2..21fd192642 100644 2 + index b12d56a3c9..df9d949ed1 100644 3 3 --- a/src/sage_docbuild/__init__.py 4 4 +++ b/src/sage_docbuild/__init__.py 5 - @@ -89,27 +89,6 @@ def builder_helper(type): 5 + @@ -88,30 +88,6 @@ def builder_helper(type): 6 6 """ 7 - Returns a function which builds the documentation for 7 + Return a function which builds the documentation for 8 8 output type ``type``. 9 9 - 10 10 - TESTS: ··· 19 19 - ....: raise BaseException("abort pool operation") 20 20 - sage: original_runsphinx, sage_docbuild.sphinxbuild.runsphinx = sage_docbuild.sphinxbuild.runsphinx, raiseBaseException 21 21 - 22 + - sage: from sage.misc.temporary_file import tmp_dir 23 + - sage: os.environ['SAGE_DOC'] = tmp_dir() 24 + - sage: sage.env.var('SAGE_DOC') # random 22 25 - sage: from sage_docbuild import builder_helper, build_ref_doc 23 26 - sage: from sage_docbuild import _build_many as build_many 24 27 - sage: helper = builder_helper("html") 25 - - sage: try: 28 + - sage: try: # optional - sagemath_doc_html 26 29 - ....: build_many(build_ref_doc, [("docname", "en", "html", {})]) 27 30 - ....: except Exception as E: 28 31 - ....: "Non-exception during docbuild: abort pool operation" in str(E) ··· 30 33 """ 31 34 def f(self, *args, **kwds): 32 35 output_dir = self._output_dir(type) 33 - @@ -131,10 +110,9 @@ def builder_helper(type): 36 + @@ -139,10 +115,9 @@ def builder_helper(type): 34 37 logger.debug(build_command) 35 38 36 39 # Run Sphinx with Sage's special logger ··· 44 47 if ABORT_ON_ERROR: 45 48 raise 46 49 diff --git a/src/sage_docbuild/sphinxbuild.py b/src/sage_docbuild/sphinxbuild.py 47 - index d917c3e9d4..551cc8028a 100644 50 + index a39c99ffe9..73be823684 100644 48 51 --- a/src/sage_docbuild/sphinxbuild.py 49 52 +++ b/src/sage_docbuild/sphinxbuild.py 50 - @@ -327,3 +327,8 @@ def runsphinx(): 53 + @@ -330,3 +330,8 @@ def runsphinx(): 51 54 sys.stderr = saved_stderr 52 55 sys.stdout.flush() 53 56 sys.stderr.flush()
+1 -1
pkgs/applications/science/math/sage/sage-env.nix
··· 186 186 export SAGE_EXTCODE='${sagelib.src}/src/sage/ext_data' 187 187 188 188 # for find_library 189 - export DYLD_LIBRARY_PATH="${lib.makeLibraryPath [stdenv.cc.libc singular]}''${DYLD_LIBRARY_PATH:+:}$DYLD_LIBRARY_PATH" 189 + export DYLD_LIBRARY_PATH="${lib.makeLibraryPath [stdenv.cc.libc singular giac]}''${DYLD_LIBRARY_PATH:+:}$DYLD_LIBRARY_PATH" 190 190 ''; 191 191 } // { # equivalent of `passthru`, which `writeTextFile` doesn't support 192 192 lib = sagelib;
+5 -84
pkgs/applications/science/math/sage/sage-src.nix
··· 58 58 ); 59 59 in 60 60 stdenv.mkDerivation rec { 61 - version = "9.5"; 61 + version = "9.6"; 62 62 pname = "sage-src"; 63 63 64 64 src = fetchFromGitHub { 65 65 owner = "sagemath"; 66 66 repo = "sage"; 67 67 rev = version; 68 - sha256 = "sha256-uOsLpsGpcIGs8Xr82X82MElnTB2E908gytyNJ8WVD5w="; 68 + sha256 = "sha256-QY8Yga3hD1WhSCtA2/PVry8hHlMmC31J8jCBFtWgIU0="; 69 69 }; 70 70 71 71 # Patches needed because of particularities of nix or the way this is packaged. 72 72 # The goal is to upstream all of them and get rid of this list. 73 73 nixPatches = [ 74 - # Since https://trac.sagemath.org/ticket/32174, some external features are 75 - # marked as "safe" and get auto-detected, in which case the corresponding 76 - # optional tests are executed. We disable auto-detection of safe features if 77 - # we are doctesting with an "--optional" argument which does not include 78 - # "sage", because tests from autodetected features expect context provided 79 - # by running basic sage tests. This is necessary to test sagemath_doc_html 80 - # separately. See https://trac.sagemath.org/ticket/26110 for a related 81 - # upstream discussion (from the time when Sage still had optional py2/py3 82 - # tags). 83 - ./patches/Only-test-external-software-when-all-of-sage-is.patch 84 - 85 74 # Fixes a potential race condition which can lead to transient doctest failures. 86 75 ./patches/fix-ecl-race.patch 87 76 ··· 120 109 # https://trac.sagemath.org/ticket/32959 121 110 ./patches/linbox-1.7-upgrade.patch 122 111 123 - # https://trac.sagemath.org/ticket/33170 124 - (fetchSageDiff { 125 - base = "9.6.beta5"; 126 - name = "ipython-8.1-update.patch"; 127 - rev = "4d2b53f1541375861310af3a7f7109c1c2ed475d"; 128 - sha256 = "sha256-ELda/VBzsQH7NdFas69fQ35QPUoJCeLx/gxT1j7qGR8="; 129 - }) 130 - 131 - # https://trac.sagemath.org/ticket/32968 132 - (fetchSageDiff { 133 - base = "9.5"; 134 - name = "sphinx-4.3-update.patch"; 135 - rev = "fc84f82f52b6f05f512cb359ec7c100f93cf8841"; 136 - sha256 = "sha256-bBbfdcnw/9LUOlY8rHJRbFJEdMXK4shosqTNaobTS1Q="; 137 - }) 138 - 139 - # https://trac.sagemath.org/ticket/33189 140 - (fetchSageDiff { 141 - base = "9.5"; 142 - name = "arb-2.22-update.patch"; 143 - rev = "53532ddd4e2dc92469c1590ebf0c40f8f69bf579"; 144 - sha256 = "sha256-6SoSBvIlqvNwZV3jTB6uPdUtaWIOeNmddi2poK/WvGs="; 145 - }) 146 - 147 - # TODO: This will not be necessary when Sphinx 4.4.1 is released, 148 - # since some warnings introduced in 4.4.0 will be disabled by then 149 - # (https://github.com/sphinx-doc/sphinx/pull/10126). 150 - # https://trac.sagemath.org/ticket/33272 151 - (fetchSageDiff { 152 - base = "9.5"; 153 - name = "sphinx-4.4-warnings.patch"; 154 - rev = "97d7958bed441cf2ccc714d88f83d3a8426bc085"; 155 - sha256 = "sha256-y1STE0oxswnijGCsBw8eHWWqpmT1XMznIfA0vvX9pFA="; 156 - }) 157 - 158 112 # adapted from https://trac.sagemath.org/ticket/23712#comment:22 159 113 ./patches/tachyon-renamed-focallength.patch 160 114 161 - # https://trac.sagemath.org/ticket/33336 162 - (fetchSageDiff { 163 - base = "9.6.beta2"; 164 - name = "scipy-1.8-update.patch"; 165 - rev = "9c8235e44ffb509efa8a3ca6cdb55154e2b5066d"; 166 - sha256 = "sha256-bfc4ljNOxVnhlmxIuNbjbKl4vJXYq2tlF3Z8bbC8PWw="; 167 - }) 168 - 169 - # https://trac.sagemath.org/ticket/33495 170 - (fetchSageDiff { 171 - base = "9.6.beta5"; 172 - name = "networkx-2.7-update.patch"; 173 - rev = "8452003846a7303100847d8d0ed642fc642c11d6"; 174 - sha256 = "sha256-A/XMouPlc2sjFp30L+56fBGJXydS2EtzfPOV98FCDqI="; 175 - }) 176 - 177 - # https://trac.sagemath.org/ticket/33226 178 - (fetchSageDiff { 179 - base = "9.6.beta0"; 180 - name = "giac-1.7.0-45-update.patch"; 181 - rev = "33ea2adf01e9e2ce9f1e33779f0b1ac0d9d1989c"; 182 - sha256 = "sha256-DOyxahf3+IaYdkgmAReNDCorRzMgO8+yiVrJ5TW1km0="; 183 - }) 184 - 185 - # https://trac.sagemath.org/ticket/33398 186 - (fetchSageDiff { 187 - base = "9.6.beta4"; 188 - name = "sympy-1.10-update.patch"; 189 - rev = "6b7c3a28656180e42163dc10f7b4a571b93e5f27"; 190 - sha256 = "sha256-fnUyM2yjHkCykKRfzQQ4glcUYmCS/fYzDzmCf0nuebk="; 191 - # The patch contains a whitespace change to a file that didn't exist in Sage 9.5. 192 - excludes = [ "build/*" "src/sage/manifolds/vector_bundle_fiber_element.py" ]; 193 - }) 194 - 195 115 # docutils 0.18.1 now triggers Sphinx warnings. tolerate them for 196 - # now, because patching Sphinx is not feasible. 197 - # https://github.com/sphinx-doc/sphinx/issues/9777#issuecomment-1104481271 116 + # now, because patching Sphinx is not feasible. remove when Sphinx 117 + # 5.0 hits nixpkgs. 118 + # https://github.com/sphinx-doc/sphinx/pull/10372 198 119 ./patches/docutils-0.18.1-deprecation.patch 199 120 ]; 200 121
+5 -1
pkgs/applications/science/math/sage/sagedoc.nix
··· 89 89 90 90 doCheck = true; 91 91 checkPhase = '' 92 - ${sage-with-env}/bin/sage -t --optional=sagemath_doc_html --all 92 + # sagemath_doc_html tests assume sage tests are being run, so we 93 + # compromise: we run standard tests, but only on files containing 94 + # relevant tests. as of Sage 9.6, there are only 4 such files. 95 + grep -PRl "#.*optional.*sagemath_doc_html" ${src}/src/sage{,_docbuild} | \ 96 + xargs ${sage-with-env}/bin/sage -t --optional=sage,sagemath_doc_html 93 97 ''; 94 98 }
+6 -2
pkgs/applications/science/math/sage/sagelib.nix
··· 67 67 , pillow 68 68 , ipykernel 69 69 , networkx 70 - , sphinx # TODO: this is in setup.cfg, bug should we override it? 70 + , ptyprocess 71 + , lrcalc-python 72 + , sphinx # TODO: this is in setup.cfg, should we override it? 71 73 }: 72 74 73 75 assert (!blas.isILP64) && (!lapack.isILP64); ··· 157 159 networkx 158 160 jupyter-client 159 161 ipywidgets 162 + ptyprocess 163 + lrcalc-python 160 164 sphinx 161 165 ]; 162 166 ··· 188 192 # Sage tests already catch any relevant API breakage. 189 193 # according to the discussion at https://trac.sagemath.org/ticket/33520, 190 194 # upper bounds will be less noisy starting from Sage 9.6. 191 - sed -i 's/==2.1.0rc1/>=2.1.1/' ../gmpy2/install-requires.txt 195 + sed -i 's/==0.5.1/>=0.5.1/' ../ptyprocess/install-requires.txt 192 196 sed -i 's/, <[^, ]*//' ../*/install-requires.txt 193 197 194 198 for infile in src/*.m4; do