diff options
author | Mauricio Collares <mauricio@collares.org> | 2021-05-20 11:04:28 -0300 |
---|---|---|
committer | Jonathan Ringer <jonringer@users.noreply.github.com> | 2021-05-20 18:29:02 -0700 |
commit | 874d1aba740a8014d4821c3da522f9942111c8b7 (patch) | |
tree | aaea68f2eb8b71adc432fa71428b568a0af0cec1 /pkgs | |
parent | cd9e8e284c7df63e9ebb453aa086c539f5fd4636 (diff) |
sageWithDoc: update sagedoc.py test for sphinx 3.5
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/applications/science/math/sage/patches/sphinx-3.5-code-output.patch | 13 | ||||
-rw-r--r-- | pkgs/applications/science/math/sage/sage-src.nix | 7 |
2 files changed, 20 insertions, 0 deletions
diff --git a/pkgs/applications/science/math/sage/patches/sphinx-3.5-code-output.patch b/pkgs/applications/science/math/sage/patches/sphinx-3.5-code-output.patch new file mode 100644 index 0000000000000..f17897d4c89f6 --- /dev/null +++ b/pkgs/applications/science/math/sage/patches/sphinx-3.5-code-output.patch @@ -0,0 +1,13 @@ +diff --git a/src/sage/misc/sagedoc.py b/src/sage/misc/sagedoc.py +index 6bad826a88..f4d7b8651c 100644 +--- a/src/sage/misc/sagedoc.py ++++ b/src/sage/misc/sagedoc.py +@@ -24,7 +24,7 @@ see :trac:`12849`:: + ....: for line in fobj: + ....: if "#sage.symbolic.expression.Expression.numerical_approx" in line: + ....: print(line) +- <code class="sig-name descname">numerical_approx</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">prec</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">digits</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">algorithm</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span>... ++ <code class="sig-name descname"><span class="pre">numerical_approx</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">prec</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">digits</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">algorithm</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span>... + + Check that sphinx is not imported at Sage start-up:: + diff --git a/pkgs/applications/science/math/sage/sage-src.nix b/pkgs/applications/science/math/sage/sage-src.nix index 3051f5d5e50fc..57234c660a5a8 100644 --- a/pkgs/applications/science/math/sage/sage-src.nix +++ b/pkgs/applications/science/math/sage/sage-src.nix @@ -79,6 +79,13 @@ stdenv.mkDerivation rec { # ignore a deprecation warning for usage of `cmp` in the attrs library in the doctests ./patches/ignore-cmp-deprecation.patch + # sphinx 3.5 pretty-prints code slightly differently than sphinx + # 3.1--3.3. a similar patch is available at the sphinx 4 ticket + # (https://trac.sagemath.org/ticket/31696), but sphinx 3.5 uses + # <code> tags while sphinx 4 uses <span> tags so we cannot just + # import the patch from trac. + ./patches/sphinx-3.5-code-output.patch + # remove use of matplotlib function deprecated in 3.4 # https://trac.sagemath.org/ticket/31827 (fetchSageDiff { |