The package rpms/sagemath.git has added or updated architecture specific content in its spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s): https://src.fedoraproject.org/cgit/rpms/sagemath.git/commit/?id=042a67aa713d....
Change: +ExclusiveArch: aarch64 %{ix86} x86_64 ppc sparcv9
Thanks.
Full change: ============
commit 042a67aa713de52630839f9158d7e3d41ea39b0f Author: Jerry James loganjerry@gmail.com Date: Fri Feb 28 14:51:18 2020 -0700
Do not build for 32-bit ARM, which is unable to unpack the source RPM without running out of memory.
diff --git a/sagemath.spec b/sagemath.spec index d456da1..236cea4 100644 --- a/sagemath.spec +++ b/sagemath.spec @@ -100,8 +100,10 @@ URL: http://www.sagemath.org Source0: http://files.sagemath.org/src/sage-%%7Bversion%7D.tar.gz Source1: https://github.com/JohnCremona/ecdata/archive/%%7Bcremona_ver%7D/cremona-%%7... Source2: gprc.expect -# Follow maxima's ExclusiveArch -ExclusiveArch: aarch64 %{arm} %{ix86} x86_64 ppc sparcv9 +# Follow maxima's ExclusiveArch, except exclude 32-bit ARM. The source RPM is +# now about 2GB in size. The 32-bit ARM builders run out of memory trying to +# create the SRPM and also trying to unpack the SRPM before starting a build. +ExclusiveArch: aarch64 %{ix86} x86_64 ppc sparcv9
# Fix stray escapes in python strings Patch0: %{name}-escape.patch @@ -1808,6 +1810,8 @@ rm -fr %{SAGE_LOCAL}/var/lib/sage/installed/database_cremona_ellcurve-%{cremona_ - New -jupyter subpackage - Add suitesparse BR - Drop pathlib2 BR (bz 1797116) +- Do not build for 32-bit ARM, which is unable to unpack the source RPM without + running out of memory
* Thu Jan 30 2020 Fedora Release Engineering releng@fedoraproject.org - 8.9-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
commit 2fac77555255bfb0106c7ba353f5ed63187c5f29 Author: Jerry James loganjerry@gmail.com Date: Fri Feb 28 09:38:49 2020 -0700
Version 9.0 (bz 1756780, 1770880).
Also: - Drop upstreamed -ecm and -primecount patches. - Add -escape patch. - The old notebook (sagenb) is no longer shipped, so drop the -sagenb and -sagenb-python3 patches, the -notebook subpackage, and some BRs. - New -jupyter subpackage. - Add suitesparse BR. - Drop pathlib2 BR (bz 1797116).
diff --git a/sagemath-ecm.patch b/sagemath-ecm.patch deleted file mode 100644 index 3857cbe..0000000 --- a/sagemath-ecm.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff -up src/sage/interfaces/ecm.py.orig src/sage/interfaces/ecm.py ---- src/sage/interfaces/ecm.py.orig 2019-06-26 14:41:04.000000000 -0600 -+++ src/sage/interfaces/ecm.py 2019-09-04 09:29:09.529723744 -0600 -@@ -39,7 +39,7 @@ from __future__ import print_function - - from six import iteritems, PY2 - --import os -+import subprocess - import re - - from sage.structure.sage_object import SageObject -@@ -256,7 +256,7 @@ class ECM(SageObject): - """ - print("Enter numbers to run ECM on them.") - print("Press control-C to exit.") -- os.system(self._cmd) -+ subprocess.call(self._cmd) - - # Recommended settings from - # http://www.mersennewiki.org/index.php/Elliptic_Curve_Method diff --git a/sagemath-env.patch b/sagemath-env.patch index b798986..035b659 100644 --- a/sagemath-env.patch +++ b/sagemath-env.patch @@ -1,6 +1,6 @@ diff -up src/sage/env.py.orig src/sage/env.py ---- src/sage/env.py.orig 2019-10-03 16:59:18.202495553 -0300 -+++ src/sage/env.py 2019-10-03 17:00:31.167931299 -0300 +--- src/sage/env.py.orig 2020-02-27 16:09:10.913012356 -0700 ++++ src/sage/env.py 2020-02-27 16:16:34.080052271 -0700 @@ -151,11 +151,11 @@ var('SAGE_DATE', version.date) var('SAGE_VERSION_BANNER', version.banner)
@@ -27,11 +27,15 @@ diff -up src/sage/env.py.orig src/sage/env.py var('CONWAY_POLYNOMIALS_DATA_DIR', join(SAGE_SHARE, 'conway_polynomials')) var('GRAPHS_DATA_DIR', join(SAGE_SHARE, 'graphs')) var('ELLCURVE_DATA_DIR', join(SAGE_SHARE, 'ellcurves')) -@@ -181,11 +181,11 @@ var('CREMONA_MINI_DATA_DIR', joi +@@ -179,13 +179,13 @@ var('THEBE_DIR', joi + var('COMBINATORIAL_DESIGN_DATA_DIR', join(SAGE_SHARE, 'combinatorial_designs')) + var('CREMONA_MINI_DATA_DIR', join(SAGE_SHARE, 'cremona')) var('CREMONA_LARGE_DATA_DIR', join(SAGE_SHARE, 'cremona')) - var('JMOL_DIR', join(SAGE_SHARE, 'jmol')) - var('JSMOL_DIR', join(SAGE_SHARE, 'jsmol')) +-var('JMOL_DIR', join(SAGE_SHARE, 'jmol')) +-var('JSMOL_DIR', join(SAGE_SHARE, 'jsmol')) -var('MATHJAX_DIR', join(SAGE_SHARE, 'mathjax')) ++var('JMOL_DIR', join('/usr', 'share', 'java', 'jmol')) ++var('JSMOL_DIR', join('/usr', 'share', 'javascript', 'jsmol')) +var('MATHJAX_DIR', join('/usr', 'share', 'javascript', 'mathjax')) var('MTXLIB', join(SAGE_SHARE, 'meataxe')) var('THREEJS_DIR', join(SAGE_SHARE, 'threejs')) diff --git a/sagemath-escape.patch b/sagemath-escape.patch new file mode 100644 index 0000000..8c73a7a --- /dev/null +++ b/sagemath-escape.patch @@ -0,0 +1,3536 @@ +diff -up build/pkgs/ipython/src/IPython/core/completer.py.orig build/pkgs/ipython/src/IPython/core/completer.py +--- build/pkgs/ipython/src/IPython/core/completer.py.orig 2018-07-28 18:24:17.000000000 -0600 ++++ build/pkgs/ipython/src/IPython/core/completer.py 2020-02-26 11:30:50.639306162 -0700 +@@ -771,7 +771,7 @@ class IPCompleter(Completer): + return matches + + def _default_arguments_from_docstring(self, doc): +- """Parse the first line of docstring for call signature. ++ r"""Parse the first line of docstring for call signature. + + Docstring should be of the form 'min(iterable[, key=func])\n'. + It can also parse cython docstring of the form +@@ -939,7 +939,7 @@ class IPCompleter(Completer): + $ + ''' + regexps = self.__dict_key_regexps = { +- False: re.compile(dict_key_re_fmt % ''' ++ False: re.compile(dict_key_re_fmt % r''' + # identifiers separated by . + (?!\d)\w+ + (?:.(?!\d)\w+)* +diff -up build/pkgs/ipython/src/IPython/core/inputtransformer.py.orig build/pkgs/ipython/src/IPython/core/inputtransformer.py +--- build/pkgs/ipython/src/IPython/core/inputtransformer.py.orig 2018-07-28 18:24:17.000000000 -0600 ++++ build/pkgs/ipython/src/IPython/core/inputtransformer.py 2020-02-26 11:25:31.587048803 -0700 +@@ -178,7 +178,7 @@ class assemble_python_lines(TokenInputTr + + @CoroutineInputTransformer.wrap + def assemble_logical_lines(): +- """Join lines following explicit line continuations ()""" ++ r"""Join lines following explicit line continuations ()""" + line = '' + while True: + line = (yield line) +@@ -362,7 +362,7 @@ def cellmagic(end_on_blank_line=False): + reset (sent None). + """ + tpl = 'get_ipython().run_cell_magic(%r, %r, %r)' +- cellmagic_help_re = re.compile('%%\w+?') ++ cellmagic_help_re = re.compile(r'%%\w+?') + line = '' + while True: + line = (yield line) +diff -up build/pkgs/ipython/src/IPython/core/magics/config.py.orig build/pkgs/ipython/src/IPython/core/magics/config.py +--- build/pkgs/ipython/src/IPython/core/magics/config.py.orig 2018-07-28 18:24:17.000000000 -0600 ++++ build/pkgs/ipython/src/IPython/core/magics/config.py 2020-02-26 11:00:14.674896818 -0700 +@@ -26,7 +26,7 @@ from logging import error + # Magic implementation classes + #----------------------------------------------------------------------------- + +-reg = re.compile('^\w+.\w+$') ++reg = re.compile(r'^\w+.\w+$') + @magics_class + class ConfigMagics(Magics): + +diff -up build/pkgs/ipython/src/IPython/core/splitinput.py.orig build/pkgs/ipython/src/IPython/core/splitinput.py +--- build/pkgs/ipython/src/IPython/core/splitinput.py.orig 2018-07-28 18:24:17.000000000 -0600 ++++ build/pkgs/ipython/src/IPython/core/splitinput.py 2020-02-26 10:58:24.452965715 -0700 +@@ -41,7 +41,7 @@ from IPython.utils.encoding import get_s + # ! and !! trigger if they are first char(s) *or* follow an indent + # ? triggers as first or last char. + +-line_split = re.compile(""" ++line_split = re.compile(r""" + ^(\s*) # any leading space + ([,;/%]|!!?|???)? # escape character or characters + \s*(%{0,2}[\w.*]*) # function/method, possibly with leading % +diff -up build/pkgs/ipython/src/IPython/utils/text.py.orig build/pkgs/ipython/src/IPython/utils/text.py +--- build/pkgs/ipython/src/IPython/utils/text.py.orig 2018-07-28 18:24:17.000000000 -0600 ++++ build/pkgs/ipython/src/IPython/utils/text.py 2020-02-26 11:02:58.842051890 -0700 +@@ -594,7 +594,7 @@ class DollarFormatter(FullEvalFormatter) + In [4]: f.format('$a or {b}', a=1, b=2) + Out[4]: u'1 or 2' + """ +- _dollar_pattern = re.compile("(.*?)$($?[\w.]+)") ++ _dollar_pattern = re.compile(r"(.*?)$($?[\w.]+)") + def parse(self, fmt_string): + for literal_txt, field_name, format_spec, conversion \ + in Formatter.parse(self, fmt_string): +diff -up build/pkgs/ipython/src/IPython/utils/_tokenize_py3.py.orig build/pkgs/ipython/src/IPython/utils/_tokenize_py3.py +--- build/pkgs/ipython/src/IPython/utils/_tokenize_py3.py.orig 2018-07-28 18:24:17.000000000 -0600 ++++ build/pkgs/ipython/src/IPython/utils/_tokenize_py3.py 2020-02-26 11:04:04.592962168 -0700 +@@ -47,7 +47,7 @@ from token import * + from codecs import lookup, BOM_UTF8 + import collections + from io import TextIOWrapper +-cookie_re = re.compile("coding[:=]\s*([-\w.]+)") ++cookie_re = re.compile(r"coding[:=]\s*([-\w.]+)") + + import token + __all__ = token.__all__ + ["COMMENT", "tokenize", "detect_encoding", +diff -up src/sage/algebras/letterplace/free_algebra_element_letterplace.pyx.orig src/sage/algebras/letterplace/free_algebra_element_letterplace.pyx +--- src/sage/algebras/letterplace/free_algebra_element_letterplace.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/algebras/letterplace/free_algebra_element_letterplace.pyx 2020-02-27 12:06:28.748195247 -0700 +@@ -228,7 +228,7 @@ cdef class FreeAlgebraElement_letterplac + return '0' + + def _latex_(self): +- """ ++ r""" + TESTS:: + + sage: K.<z> = GF(25) +diff -up src/sage/algebras/letterplace/free_algebra_letterplace.pyx.orig src/sage/algebras/letterplace/free_algebra_letterplace.pyx +--- src/sage/algebras/letterplace/free_algebra_letterplace.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/algebras/letterplace/free_algebra_letterplace.pyx 2020-02-27 12:07:22.658260237 -0700 +@@ -605,7 +605,7 @@ cdef class FreeAlgebra_letterplace(Algeb + + # Auxiliar methods + cdef str exponents_to_latex(self, E): +- """ ++ r""" + This auxiliary method is used for the representation of elements of this free algebra as a latex string. + + EXAMPLES:: +diff -up src/sage/algebras/lie_algebras/lie_algebra_element.pyx.orig src/sage/algebras/lie_algebras/lie_algebra_element.pyx +--- src/sage/algebras/lie_algebras/lie_algebra_element.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/algebras/lie_algebras/lie_algebra_element.pyx 2020-02-27 12:05:08.435588192 -0700 +@@ -1014,7 +1014,7 @@ cdef class UntwistedAffineLieAlgebraElem + + (E_{-\alpha_{1}}) \otimes t^{1} + 3 c + -2 d + """ + from sage.misc.latex import latex +- ret = ' + '.join('({}) \otimes t^{{{}}}'.format(latex(g), t) ++ ret = ' + '.join(r'({}) \otimes t^{{{}}}'.format(latex(g), t) + for t,g in self._t_dict.iteritems()) + if self._c_coeff != 0: + if ret: +diff -up src/sage/arith/multi_modular.pyx.orig src/sage/arith/multi_modular.pyx +--- src/sage/arith/multi_modular.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/arith/multi_modular.pyx 2020-02-27 13:55:34.962395106 -0700 +@@ -678,7 +678,7 @@ cdef class MultiModularBasis_base(object + return z + + def precomputation_list(self): +- """ ++ r""" + Return a list of the precomputed coefficients + `\prod_j=1^{i-1} m_j^{-1} (mod m_i)` + where `m_i` are the prime moduli. +diff -up src/sage/calculus/transforms/dwt.pyx.orig src/sage/calculus/transforms/dwt.pyx +--- src/sage/calculus/transforms/dwt.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/calculus/transforms/dwt.pyx 2020-02-27 11:58:48.129134391 -0700 +@@ -24,7 +24,7 @@ AUTHOR: + import sage.plot.all + + def WaveletTransform(n, wavelet_type, wavelet_k): +- """ ++ r""" + This function initializes an GSLDoubleArray of length n which + can perform a discrete wavelet transform. + +diff -up src/sage/coding/binary_code.pyx.orig src/sage/coding/binary_code.pyx +--- src/sage/coding/binary_code.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/coding/binary_code.pyx 2020-02-27 09:13:10.902461428 -0700 +@@ -517,7 +517,7 @@ cdef codeword permute_word_by_wp(WordPer + return image + + def test_expand_to_ortho_basis(B=None): +- """ ++ r""" + This function is written in pure C for speed, and is tested from this + function. + +diff -up src/sage/coding/codecan/codecan.pyx.orig src/sage/coding/codecan/codecan.pyx +--- src/sage/coding/codecan/codecan.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/coding/codecan/codecan.pyx 2020-02-27 09:11:00.997860689 -0700 +@@ -369,7 +369,7 @@ cdef class InnerGroup: + return self.transporter + + def __repr__(self): +- """ ++ r""" + EXAMPLES:: + + sage: from sage.coding.codecan.codecan import InnerGroup +@@ -378,7 +378,7 @@ cdef class InnerGroup: + frobenius power = 1 and partition = 0 -> 0 1 -> 1 2 -> 2 3 -> 3 4 -> 4 5 -> 5 + 6 -> 6 7 -> 7 8 -> 8 9 -> 9 + """ +- return "Subgroup of (GL(k,q) times \GF{q}^n ) rtimes Aut(\GF{q}) " + \ ++ return r"Subgroup of (GL(k,q) times \GF{q}^n ) rtimes Aut(\GF{q}) " + \ + "with rank = %s, frobenius power = %s and partition =%s" % (self.rank, + self.frob_pow, OP_string(self.row_partition)) + +@@ -741,7 +741,7 @@ cdef class PartitionRefinementLinearCode + return self._inner_group_stabilizer_order + + cdef _init_point_hyperplane_incidence(self): +- """ ++ r""" + Compute a set of codewords `W` of `C` (generated by self) which is compatible + with the group action, i.e. if we start with some other code `(g,\pi)C` + the result should be `(g,\pi)W`. +diff -up src/sage/combinat/crystals/letters.pyx.orig src/sage/combinat/crystals/letters.pyx +--- src/sage/combinat/crystals/letters.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/combinat/crystals/letters.pyx 2020-02-27 13:38:25.079626805 -0700 +@@ -510,7 +510,7 @@ cdef class Letter(Element): + return False + + cdef class EmptyLetter(Element): +- """ ++ r""" + The affine letter `\emptyset` thought of as a classical crystal letter + in classical type `B_n` and `C_n`. + +@@ -558,7 +558,7 @@ cdef class EmptyLetter(Element): + return 'E' + + def _latex_(self): +- """ ++ r""" + Return a latex representation of ``self``. + + EXAMPLES:: +@@ -2493,7 +2493,7 @@ cdef class BKKLetter(Letter): + return ret + + class CrystalOfBKKLetters(ClassicalCrystalOfLetters): +- """ ++ r""" + Crystal of letters for Benkart-Kang-Kashiwara supercrystals. + + This implements the `\mathfrak{gl}(m|n)` crystal of +diff -up src/sage/combinat/crystals/tensor_product_element.pyx.orig src/sage/combinat/crystals/tensor_product_element.pyx +--- src/sage/combinat/crystals/tensor_product_element.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/combinat/crystals/tensor_product_element.pyx 2020-02-27 13:42:53.490900825 -0700 +@@ -145,8 +145,8 @@ cdef class TensorProductOfCrystalsElemen + """ + from sage.misc.latex import latex + if self._parent.options.convention == "Kashiwara": +- return ' \otimes '.join(latex(c) for c in reversed(self)) +- return ' \otimes '.join(latex(c) for c in self) ++ return r' \otimes '.join(latex(c) for c in reversed(self)) ++ return r' \otimes '.join(latex(c) for c in self) + + def _ascii_art_(self): + """ +@@ -1314,7 +1314,7 @@ cdef class CrystalOfBKKTableauxElement(T + return repr(self.to_tableau()) + + def _repr_diagram(self): +- """ ++ r""" + Return a string representation of ``self`` as a diagram. + + EXAMPLES:: +diff -up src/sage/combinat/integer_lists/base.pyx.orig src/sage/combinat/integer_lists/base.pyx +--- src/sage/combinat/integer_lists/base.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/combinat/integer_lists/base.pyx 2020-02-27 10:03:04.700544965 -0700 +@@ -269,7 +269,7 @@ cdef class IntegerListsBackend(object): + + + cdef class Envelope(object): +- """ ++ r""" + The (currently approximated) upper (lower) envelope of a function + under the specified constraints. + +@@ -523,7 +523,7 @@ cdef class Envelope(object): + return self.f_limit_start + + def limit(self): +- """ ++ r""" + Return a bound on the limit of ``self``. + + OUTPUT: a nonnegative integer or `\infty` +diff -up src/sage/combinat/root_system/reflection_group_c.pyx.orig src/sage/combinat/root_system/reflection_group_c.pyx +--- src/sage/combinat/root_system/reflection_group_c.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/combinat/root_system/reflection_group_c.pyx 2020-02-27 13:46:22.841188756 -0700 +@@ -459,7 +459,7 @@ cdef int first_descent_in_parabolic(Perm + + cpdef PermutationGroupElement reduce_in_coset(PermutationGroupElement w, tuple S, + list parabolic, int N, bint right): +- """ ++ r""" + Return the minimal length coset representative of ``w`` of the parabolic + subgroup indexed by ``parabolic`` (with indices `{0, \ldots, n}`). + +diff -up src/sage/combinat/root_system/reflection_group_element.pyx.orig src/sage/combinat/root_system/reflection_group_element.pyx +--- src/sage/combinat/root_system/reflection_group_element.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/combinat/root_system/reflection_group_element.pyx 2020-02-27 10:05:47.567686763 -0700 +@@ -1109,7 +1109,7 @@ def _gap_factorization(w, gens): + fac = gap3('MinimalWord(W,%s)'%str(w)).sage() + return [i-1 for i in fac] + +-_gap_factorization_code = """ ++_gap_factorization_code = r""" + # MinimalWord(G,w) + # given a permutation group G find some expression of minimal length in the + # generators of G and their inverses of the element w (an inverse is +diff -up src/sage/crypto/boolean_function.pyx.orig src/sage/crypto/boolean_function.pyx +--- src/sage/crypto/boolean_function.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/crypto/boolean_function.pyx 2020-02-27 09:07:31.088625609 -0700 +@@ -1108,7 +1108,7 @@ cdef class BooleanFunction(SageObject): + return (len(W) == 1) or (len(W) == 2 and 0 in W) + + def is_linear_structure(self, val): +- """ ++ r""" + Return ``True`` if ``val`` is a linear structure of this Boolean + function. + +@@ -1178,7 +1178,7 @@ cdef class BooleanFunction(SageObject): + raise TypeError("cannot compute is_linear_structure() using parameter %s" % (val,)) + + def has_linear_structure(self): +- """ ++ r""" + Return ``True`` if this function has a linear structure. + + An `n`-variable Boolean function `f` has a linear structure if +@@ -1209,7 +1209,7 @@ cdef class BooleanFunction(SageObject): + return any(abs(a[i]) == 1<<nvars for i in range(1, 1<<nvars)) + + def linear_structures(self): +- """ ++ r""" + Return all linear structures of this Boolean function as a vector subspace + of `\GF{2}^n`. + +@@ -1240,7 +1240,7 @@ cdef class BooleanFunction(SageObject): + return V.subspace(l) + + def derivative(self, u): +- """ ++ r""" + Return the derivative in direction of ``u`` + + INPUT: +diff -up src/sage/functions/prime_pi.pyx.orig src/sage/functions/prime_pi.pyx +--- src/sage/functions/prime_pi.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/functions/prime_pi.pyx 2020-02-27 13:57:13.458578944 -0700 +@@ -1,4 +1,4 @@ +-""" ++r""" + Counting Primes + + AUTHORS: +diff -up src/sage/geometry/integral_points.pyx.orig src/sage/geometry/integral_points.pyx +--- src/sage/geometry/integral_points.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/geometry/integral_points.pyx 2020-02-27 14:58:09.110842685 -0700 +@@ -726,7 +726,7 @@ cdef loop_over_rectangular_box_points_sa + + + cdef class Inequality_generic: +- """ ++ r""" + An inequality whose coefficients are arbitrary Python/Sage objects + + INPUT: +@@ -839,7 +839,7 @@ cdef class Inequality_generic: + DEF INEQ_INT_MAX_DIM = 20 + + cdef class Inequality_int: +- """ ++ r""" + Fast version of inequality in the case that all coefficients fit + into machine ints. + +diff -up src/sage/graphs/asteroidal_triples.pyx.orig src/sage/graphs/asteroidal_triples.pyx +--- src/sage/graphs/asteroidal_triples.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/graphs/asteroidal_triples.pyx 2020-02-27 09:53:16.680674877 -0700 +@@ -185,7 +185,7 @@ cdef list is_asteroidal_triple_free_C(ui + uint32_t** connected_structure, + uint32_t* waiting_list, + bitset_t seen): +- """ ++ r""" + INPUT: + + - ``n`` -- integer; number of points in the graph +diff -up src/sage/graphs/graph_decompositions/vertex_separation.pyx.orig src/sage/graphs/graph_decompositions/vertex_separation.pyx +--- src/sage/graphs/graph_decompositions/vertex_separation.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/graphs/graph_decompositions/vertex_separation.pyx 2020-02-27 09:45:33.735327813 -0700 +@@ -472,7 +472,7 @@ def linear_ordering_to_path_decompositio + + def pathwidth(self, k=None, certificate=False, algorithm="BAB", verbose=False, + max_prefix_length=20, max_prefix_number=10**6): +- """ ++ r""" + Compute the pathwidth of ``self`` (and provides a decomposition) + + INPUT: +diff -up src/sage/graphs/hyperbolicity.pyx.orig src/sage/graphs/hyperbolicity.pyx +--- src/sage/graphs/hyperbolicity.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/graphs/hyperbolicity.pyx 2020-02-27 09:40:41.823526940 -0700 +@@ -585,7 +585,7 @@ cdef tuple hyperbolicity_BCCM(int N, + float approximation_factor, + float additive_gap, + verbose=False): +- """ ++ r""" + Return the hyperbolicity of a graph. + + This method implements the exact and the approximate algorithms proposed in +@@ -841,7 +841,7 @@ cdef tuple hyperbolicity_CCL(int N, + float approximation_factor, + float additive_gap, + verbose=False): +- """ ++ r""" + Return the hyperbolicity of a graph. + + This method implements the exact and the approximate algorithms proposed in +diff -up src/sage/graphs/matchpoly.pyx.orig src/sage/graphs/matchpoly.pyx +--- src/sage/graphs/matchpoly.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/graphs/matchpoly.pyx 2020-02-27 12:33:20.595046387 -0700 +@@ -50,7 +50,7 @@ x = polygen(ZZ, 'x') + + + def matching_polynomial(G, complement=True, name=None): +- """ ++ r""" + Computes the matching polynomial of the graph `G`. + + If `p(G, k)` denotes the number of `k`-matchings (matchings with `k` edges) +diff -up src/sage/graphs/strongly_regular_db.pyx.orig src/sage/graphs/strongly_regular_db.pyx +--- src/sage/graphs/strongly_regular_db.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/graphs/strongly_regular_db.pyx 2020-02-27 09:51:17.877812212 -0700 +@@ -2391,7 +2391,7 @@ def strongly_regular_from_two_intersecti + + A set of points in the projective geometry `PG(k,q)` is said to be a + 2-intersection set if it intersects every hyperplane in either `h_1` or +- `h_2` points, where `h_1,h_2\in \NN`. ++ `h_2` points, where `h_1,h_2\in \NN`. + + From a 2-intersection set `S` can be defined a strongly-regular graph in the + following way: +diff -up src/sage/groups/group.pyx.orig src/sage/groups/group.pyx +--- src/sage/groups/group.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/groups/group.pyx 2020-02-27 11:36:32.459309482 -0700 +@@ -50,7 +50,7 @@ def is_Group(x): + + + cdef class Group(Parent): +- """ ++ r""" + Base class for all groups + + TESTS:: +@@ -189,7 +189,7 @@ cdef class Group(Parent): + return self.order() != infinity + + def is_multiplicative(self): +- """ ++ r""" + Returns True if the group operation is given by * (rather than + +). + +diff -up src/sage/groups/perm_gps/partn_ref2/refinement_generic.pyx.orig src/sage/groups/perm_gps/partn_ref2/refinement_generic.pyx +--- src/sage/groups/perm_gps/partn_ref2/refinement_generic.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/groups/perm_gps/partn_ref2/refinement_generic.pyx 2020-02-27 08:42:25.623470890 -0700 +@@ -913,7 +913,7 @@ cdef class PartitionRefinement_generic: + "\begin{tikzpicture}\n" + + "\tikzset{level distance=3cm, edge from parent/.style=" + + "{draw, edge from parent path={(\tikzparentnode.south) -- (\tikzchildnode.north)}}}\n" + +- "\Tree") ++ "\Tree") + self._latex_debug_string += "[." + self._latex_act_node() + +diff -up src/sage/groups/perm_gps/partn_ref/data_structures.pyx.orig src/sage/groups/perm_gps/partn_ref/data_structures.pyx +--- src/sage/groups/perm_gps/partn_ref/data_structures.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/groups/perm_gps/partn_ref/data_structures.pyx 2020-02-27 11:31:41.434392986 -0700 +@@ -828,11 +828,11 @@ cdef SC_print_level(StabilizerChain *SC, + print('| labels {}'.format([SC.labels [level][i] for i from 0 <= i < n])) + print('|') + print('| generators {}'.format([[SC.generators [level][n*i + j] for j from 0 <= j < n] for i from 0 <= i < SC.num_gens[level]])) +- print('\ inverses {}'.format([[SC.gen_inverses[level][n*i + j] for j from 0 <= j < n] for i from 0 <= i < SC.num_gens[level]])) ++ print('\ inverses {}'.format([[SC.gen_inverses[level][n*i + j] for j from 0 <= j < n] for i from 0 <= i < SC.num_gens[level]])) + else: + print('/ level {}'.format(level)) + print('|') +- print('\ base_size {}'.format(SC.base_size)) ++ print('\ base_size {}'.format(SC.base_size)) + + cdef StabilizerChain *SC_new_base(StabilizerChain *SC, int *base, int base_len): + """ +diff -up src/sage/groups/perm_gps/partn_ref/refinement_binary.pyx.orig src/sage/groups/perm_gps/partn_ref/refinement_binary.pyx +--- src/sage/groups/perm_gps/partn_ref/refinement_binary.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/groups/perm_gps/partn_ref/refinement_binary.pyx 2020-02-27 11:30:07.172039526 -0700 +@@ -105,7 +105,7 @@ cdef class LinearBinaryCodeStruct(Binary + self.ith_word = &ith_word_linear + + def run(self, partition=None): +- """ ++ r""" + Perform the canonical labeling and automorphism group computation, + storing results to self. + +@@ -607,7 +607,7 @@ cdef int ith_word_nonlinear(BinaryCodeSt + return 0 + + cdef int refine_by_bip_degree(PartitionStack *col_ps, void *S, int *cells_to_refine_by, int ctrb_len): +- """ ++ r""" + Refines the input partition by checking degrees of vertices to the given + cells in the associated bipartite graph (vertices split into columns and + words). +@@ -731,7 +731,7 @@ cdef int refine_by_bip_degree(PartitionS + return invariant + + cdef int compare_linear_codes(int *gamma_1, int *gamma_2, void *S1, void *S2, int degree): +- """ ++ r""" + Compare gamma_1(S1) and gamma_2(S2). + + Return return -1 if gamma_1(S1) < gamma_2(S2), 0 if gamma_1(S1) == gamma_2(S2), +@@ -804,7 +804,7 @@ cdef int compare_linear_codes(int *gamma + return 0 + + cdef int compare_nonlinear_codes(int *gamma_1, int *gamma_2, void *S1, void *S2, int degree): +- """ ++ r""" + Compare gamma_1(S1) and gamma_2(S2). + + Return return -1 if gamma_1(S1) < gamma_2(S2), 0 if gamma_1(S1) == gamma_2(S2), +diff -up src/sage/groups/perm_gps/permgroup_element.pyx.orig src/sage/groups/perm_gps/permgroup_element.pyx +--- src/sage/groups/perm_gps/permgroup_element.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/groups/perm_gps/permgroup_element.pyx 2020-02-27 11:35:14.696667810 -0700 +@@ -1064,7 +1064,7 @@ cdef class PermutationGroupElement(Multi + return y + + cpdef _act_on_(self, x, bint self_on_left): +- """ ++ r""" + Return the right action of self on left. + + For example, if f=left is a polynomial, then this function returns +@@ -1498,7 +1498,7 @@ cdef class PermutationGroupElement(Multi + return ~self + + def sign(self): +- """ ++ r""" + Returns the sign of self, which is `(-1)^{s}`, where + `s` is the number of swaps. + +@@ -1735,7 +1735,7 @@ cdef class PermutationGroupElement(Multi + return _Partitions(cycle_type) + + def has_descent(self, i, side = "right", positive = False): +- """ ++ r""" + INPUT: + + - ``i``: an element of the index set +diff -up src/sage/groups/semimonomial_transformations/semimonomial_transformation.pyx.orig src/sage/groups/semimonomial_transformations/semimonomial_transformation.pyx +--- src/sage/groups/semimonomial_transformations/semimonomial_transformation.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/groups/semimonomial_transformations/semimonomial_transformation.pyx 2020-02-27 08:47:01.774920139 -0700 +@@ -279,7 +279,7 @@ cdef class SemimonomialTransformation(Mu + return (self.parent(), (0, self.v, self.perm, self.get_autom())) + + def get_v(self): +- """ ++ r""" + Returns the component corresponding to `{R^{\times}}^n` of ``self``. + + EXAMPLES:: +@@ -291,7 +291,7 @@ cdef class SemimonomialTransformation(Mu + return self.v + + def get_v_inverse(self): +- """ ++ r""" + Returns the (elementwise) inverse of the component corresponding to + `{R^{\times}}^n` of ``self``. + +@@ -328,7 +328,7 @@ cdef class SemimonomialTransformation(Mu + return self.alpha + + def invert_v(self): +- """ ++ r""" + Elementwisely invert all entries of ``self`` which + correspond to the component `{R^{\times}}^n`. + +diff -up src/sage/libs/eclib/mwrank.pyx.orig src/sage/libs/eclib/mwrank.pyx +--- src/sage/libs/eclib/mwrank.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/libs/eclib/mwrank.pyx 2020-02-26 13:47:58.684086935 -0700 +@@ -333,7 +333,7 @@ cdef class _Curvedata: # cython class + return string_sigoff(Curvedata_repr(self.x))[:-1] + + def silverman_bound(self): +- """ ++ r""" + The Silverman height bound for this elliptic curve. + + OUTPUT: +@@ -362,7 +362,7 @@ cdef class _Curvedata: # cython class + return Curvedata_silverman_bound(self.x) + + def cps_bound(self): +- """ ++ r""" + The Cremona-Prickett-Siksek height bound for this elliptic curve. + + OUTPUT: +@@ -397,7 +397,7 @@ cdef class _Curvedata: # cython class + return x + + def height_constant(self): +- """ ++ r""" + A height bound for this elliptic curve. + + OUTPUT: +@@ -512,7 +512,7 @@ cdef class _mw: + cdef int verb + + def __init__(self, _Curvedata curve, verb=False, pp=1, maxr=999): +- """ ++ r""" + Constructor for mw class. + + INPUT: +@@ -904,7 +904,7 @@ cdef class _mw: + return ok, index, unsat + + def search(self, h_lim, int moduli_option=0, int verb=0): +- """ ++ r""" + Search for points in the mw group. + + INPUT: +@@ -1261,7 +1261,7 @@ cdef class _two_descent: + sig_off() + + def getbasis(self): +- """ ++ r""" + Returns the basis of points found by doing a 2-descent. + + If the success and certain flags are 1, this will be a +diff -up src/sage/libs/eclib/newforms.pyx.orig src/sage/libs/eclib/newforms.pyx +--- src/sage/libs/eclib/newforms.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/libs/eclib/newforms.pyx 2020-02-27 11:17:03.555393145 -0700 +@@ -22,7 +22,7 @@ from sage.modular.all import Cusp + + + cdef class ECModularSymbol: +- """ ++ r""" + Modular symbol associated with an elliptic curve, using John Cremona's newforms class. + + EXAMPLES:: +diff -up src/sage/libs/fes.pyx.orig src/sage/libs/fes.pyx +--- src/sage/libs/fes.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/libs/fes.pyx 2020-02-27 15:31:37.911298615 -0700 +@@ -288,7 +288,7 @@ def find_coordinate_change(As, max_tries + + + def prepare_polynomials(f): +- """ ++ r""" + Finds a linear combination of the equations that is faster to solve by FES + + INPUT: +diff -up src/sage/libs/linkages/padics/API.pxi.orig src/sage/libs/linkages/padics/API.pxi +--- src/sage/libs/linkages/padics/API.pxi.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/libs/linkages/padics/API.pxi 2020-02-27 15:42:51.990640350 -0700 +@@ -469,7 +469,7 @@ cdef inline long chash(celement a, long + + # the expansion_mode enum is defined in padic_template_element_header.pxi + cdef inline cexpansion_next(celement value, expansion_mode mode, long curpower, PowComputer_ prime_pow): +- """ ++ r""" + Return the next digit in a `\pi`-adic expansion of ``value``. + + INPUT: +@@ -483,7 +483,7 @@ cdef inline cexpansion_next(celement val + pass + + cdef inline cexpansion_getitem(celement value, long m, PowComputer_ prime_pow): +- """ ++ r""" + Return the `m`th `\pi`-adic digit in the ``simple_mode`` expansion. + + INPUT: +@@ -512,7 +512,7 @@ cdef list ccoefficients(celement x, long + pass + + cdef int cteichmuller(celement out, celement value, long prec, PowComputer_class prime_pow) except -1: +- """ ++ r""" + Teichmuller lifting. + + INPUT: +diff -up src/sage/libs/linkages/padics/fmpz_poly_unram.pxi.orig src/sage/libs/linkages/padics/fmpz_poly_unram.pxi +--- src/sage/libs/linkages/padics/fmpz_poly_unram.pxi.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/libs/linkages/padics/fmpz_poly_unram.pxi 2020-02-27 15:42:11.511401421 -0700 +@@ -659,7 +659,7 @@ cdef list ccoefficients(celement x, long + return ans + + cdef int cteichmuller(celement out, celement value, long prec, PowComputer_ prime_pow) except -1: +- """ ++ r""" + Teichmuller lifting. + + INPUT: +@@ -838,7 +838,7 @@ cdef inline int cconv_mpz_t_out(mpz_t ou + ## Extra functions ## + + cdef cmatrix_mod_pn(celement a, long aprec, long valshift, PowComputer_ prime_pow): +- """ ++ r""" + Returns the matrix of right multiplication by the element on + the power basis `1, x, x^2, \ldots, x^{d-1}` for this + extension field. Thus the *rows* of this matrix give the +diff -up src/sage/libs/linkages/padics/mpz.pxi.orig src/sage/libs/linkages/padics/mpz.pxi +--- src/sage/libs/linkages/padics/mpz.pxi.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/libs/linkages/padics/mpz.pxi 2020-02-27 15:43:41.974700571 -0700 +@@ -567,7 +567,7 @@ cdef list ccoefficients(mpz_t x, long va + return [ansq] + + cdef int cteichmuller(mpz_t out, mpz_t value, long prec, PowComputer_ prime_pow) except -1: +- """ ++ r""" + Teichmuller lifting. + + INPUT: +diff -up src/sage/libs/linkages/padics/unram_shared.pxi.orig src/sage/libs/linkages/padics/unram_shared.pxi +--- src/sage/libs/linkages/padics/unram_shared.pxi.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/libs/linkages/padics/unram_shared.pxi 2020-02-26 13:52:20.857135309 -0700 +@@ -70,7 +70,7 @@ def frobenius_unram(self, arithmetic=Tru + + @cython.binding(True) + def norm_unram(self, base = None): +- """ ++ r""" + Return the absolute or relative norm of this element. + + .. WARNING:: +@@ -151,7 +151,7 @@ def norm_unram(self, base = None): + + @cython.binding(True) + def trace_unram(self, base = None): +- """ ++ r""" + Return the absolute or relative trace of this element. + + If ``base`` is given then ``base`` must be a subfield of the +diff -up src/sage/libs/ntl/ntl_GF2E.pyx.orig src/sage/libs/ntl/ntl_GF2E.pyx +--- src/sage/libs/ntl/ntl_GF2E.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/libs/ntl/ntl_GF2E.pyx 2020-02-27 15:36:28.211821169 -0700 +@@ -66,7 +66,7 @@ def ntl_GF2E_random(ntl_GF2EContext_clas + + cdef class ntl_GF2E(object): + r""" +- The \class{GF2E} represents a finite extension field over GF(2) ++ The \class{GF2E} represents a finite extension field over GF(2) + using NTL. Elements are represented as polynomials over GF(2) + modulo a modulus. + +@@ -435,7 +435,7 @@ cdef class ntl_GF2E(object): + return l + + def _sage_(ntl_GF2E self, k=None): +- """ ++ r""" + Returns a \class{FiniteFieldElement} representation + of this element. If a \class{FiniteField} k is provided + it is constructed in this field if possible. A \class{FiniteField} +diff -up src/sage/libs/ntl/ntl_GF2X.pyx.orig src/sage/libs/ntl/ntl_GF2X.pyx +--- src/sage/libs/ntl/ntl_GF2X.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/libs/ntl/ntl_GF2X.pyx 2020-02-27 15:34:59.579465248 -0700 +@@ -480,7 +480,7 @@ cdef class ntl_GF2X(object): + return [self[i] for i in range(GF2X_deg(self.x)+1)] + + def bin(ntl_GF2X self): +- """ ++ r""" + Returns binary representation of this element. It is + the same as setting \code{ntl.GF2XHexOutput(False)} and + representing this element afterwards. However it should be +@@ -503,7 +503,7 @@ cdef class ntl_GF2X(object): + return s + + def hex(ntl_GF2X self): +- """ ++ r""" + Return an hexadecimal representation of this element. + + It is the same as setting \code{ntl.GF2XHexOutput(True)} and +diff -up src/sage/libs/ntl/ntl_mat_GF2E.pyx.orig src/sage/libs/ntl/ntl_mat_GF2E.pyx +--- src/sage/libs/ntl/ntl_mat_GF2E.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/libs/ntl/ntl_mat_GF2E.pyx 2020-02-27 15:33:55.565652664 -0700 +@@ -174,7 +174,7 @@ cdef class ntl_mat_GF2E(object): + return unpickle_class_args, (ntl_mat_GF2E, (self.modulus_context(), self.x.NumRows(), self.x.NumCols(), self.list())) + + def __repr__(self): +- """ ++ r""" + Return the string representation of self. + + EXAMPLES:: +@@ -439,7 +439,7 @@ cdef class ntl_mat_GF2E(object): + return r + + def gauss(self,ncols=-1): +- """ ++ r""" + Performs unitary row operations so as to bring this matrix + into row echelon form. If the optional argument \code{ncols} + is supplied, stops when first ncols columns are in echelon +diff -up src/sage/libs/ntl/ntl_mat_GF2.pyx.orig src/sage/libs/ntl/ntl_mat_GF2.pyx +--- src/sage/libs/ntl/ntl_mat_GF2.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/libs/ntl/ntl_mat_GF2.pyx 2020-02-27 15:38:58.065038500 -0700 +@@ -1,4 +1,4 @@ +-""" ++r""" + Matrices over the $\GF{2}$ via NTL + + This class is only provided to have a complete NTL interface and for +@@ -427,7 +427,7 @@ cdef class ntl_mat_GF2(object): + return r + + def gauss(self,ncols=-1): +- """ ++ r""" + Performs unitary row operations so as to bring this matrix + into row echelon form (not reduced!). If the optional + argument \code{ncols} is supplied, stops when first ncols +@@ -591,7 +591,7 @@ cdef class ntl_mat_GF2(object): + return r + + def __invert__(self): +- """ ++ r""" + Return $X = A^{-1}$; an error is raised if A is singular. + + EXAMPLES:: +diff -up src/sage/libs/ntl/ntl_mat_ZZ.pyx.orig src/sage/libs/ntl/ntl_mat_ZZ.pyx +--- src/sage/libs/ntl/ntl_mat_ZZ.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/libs/ntl/ntl_mat_ZZ.pyx 2020-02-27 15:32:42.159053522 -0700 +@@ -66,7 +66,7 @@ cdef class ntl_mat_ZZ(object): + The \class{mat_ZZ} class implements arithmetic with matrices over $\Z$. + """ + def __init__(self, nrows=0, ncols=0, v=None): +- """ ++ r""" + The \class{mat_ZZ} class implements arithmetic with matrices over $\Z$. + + EXAMPLES:: +@@ -122,7 +122,7 @@ cdef class ntl_mat_ZZ(object): + return unpickle_class_args, (ntl_mat_ZZ, (self.__nrows, self.__ncols, self.list())) + + def __repr__(self): +- """ ++ r""" + Return the string representation of self. + + EXAMPLES:: +diff -up src/sage/libs/ntl/ntl_ZZ_pEX.pyx.orig src/sage/libs/ntl/ntl_ZZ_pEX.pyx +--- src/sage/libs/ntl/ntl_ZZ_pEX.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/libs/ntl/ntl_ZZ_pEX.pyx 2020-02-27 15:40:20.817482630 -0700 +@@ -1,4 +1,4 @@ +-""" ++r""" + Wrapper for NTL's polynomials over finite ring extensions of $\Z / p\Z.$ + + AUTHORS: +diff -up src/sage/libs/ntl/ntl_ZZX.pyx.orig src/sage/libs/ntl/ntl_ZZX.pyx +--- src/sage/libs/ntl/ntl_ZZX.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/libs/ntl/ntl_ZZX.pyx 2020-02-27 11:19:30.586809381 -0700 +@@ -688,7 +688,7 @@ cdef class ntl_ZZX(object): + return (self*other).quo_rem(g)[0] + + def xgcd(self, ntl_ZZX other, proof=None): +- """ ++ r""" + If self and other are coprime over the rationals, return r, s, + t such that r = s*self + t*other. Otherwise return 0. This + is \emph{not} the same as the \sage function on polynomials +diff -up src/sage/libs/ppl.pyx.orig src/sage/libs/ppl.pyx +--- src/sage/libs/ppl.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/libs/ppl.pyx 2020-02-27 11:18:35.716773608 -0700 +@@ -5756,7 +5756,7 @@ cdef _make_Constraint_from_richcmp(lhs_, + + #################################################### + cdef class Constraint(object): +- """ ++ r""" + Wrapper for PPL's ``Constraint`` class. + + An object of the class ``Constraint`` is either: +diff -up src/sage/libs/pynac/pynac.pyx.orig src/sage/libs/pynac/pynac.pyx +--- src/sage/libs/pynac/pynac.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/libs/pynac/pynac.pyx 2020-02-26 13:51:20.673271444 -0700 +@@ -385,7 +385,7 @@ cdef stdstring* string_from_pystr(py_str + return new stdstring(s) + + cdef stdstring* py_latex_variable(var_name): +- """ ++ r""" + Returns a c++ string containing the latex representation of the given + variable name. + +@@ -414,7 +414,7 @@ cdef stdstring* py_latex_variable(var_na + return string_from_pystr(py_vlatex) + + def py_latex_variable_for_doctests(x): +- """ ++ r""" + Internal function used so we can doctest a certain cdef'd method. + + EXAMPLES:: +@@ -703,7 +703,7 @@ cdef stdstring* py_latex_fderivative(uns + operator_string=r"\frac{\partial^{%s}}{%s}"%(len(params),''.join(diff_args)) + py_res = operator_string+py_latex_function_pystring(id,args,False) + else: +- ostr = ''.join(['\mathrm{D}_{',', '.join([repr(int(x)) for x in params]), '}']) ++ ostr = ''.join([r'\mathrm{D}_{',', '.join([repr(int(x)) for x in params]), '}']) + fstr = py_latex_function_pystring(id, args, True) + py_res = ostr + fstr + return string_from_pystr(py_res) +@@ -1164,7 +1164,7 @@ cdef bint py_is_crational(x): + return False + + def py_is_crational_for_doctest(x): +- """ ++ r""" + Returns True if pynac should treat this object as an element of `\QQ(i)`. + + TESTS:: +@@ -1304,7 +1304,7 @@ cdef bint py_is_cinteger(x): + return py_is_integer(x) or (py_is_crational(x) and py_denom(x) == 1) + + def py_is_cinteger_for_doctest(x): +- """ ++ r""" + Returns True if pynac should treat this object as an element of `\ZZ(i)`. + + TESTS:: +diff -up src/sage/libs/ratpoints.pyx.orig src/sage/libs/ratpoints.pyx +--- src/sage/libs/ratpoints.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/libs/ratpoints.pyx 2020-02-27 15:25:26.499254622 -0700 +@@ -42,7 +42,7 @@ cdef int process(long x, long z, mpz_t y + + def ratpoints(list coeffs, long H, verbose=False, long max=0, + min_x_denom=None, max_x_denom=None, intervals=[]): +- """ ++ r""" + Access the ratpoints library to find points on the hyperelliptic curve: + + `y^2 = a_n x^n + \cdots + a_1 x + a_0.` +diff -up src/sage/libs/singular/polynomial.pyx.orig src/sage/libs/singular/polynomial.pyx +--- src/sage/libs/singular/polynomial.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/libs/singular/polynomial.pyx 2020-02-27 15:18:01.665479916 -0700 +@@ -22,7 +22,7 @@ cdef extern from *: # hack to get at cyt + int unlikely(int) + + import re +-plusminus_pattern = re.compile("([^(^])([+-])") ++plusminus_pattern = re.compile(r"([^(^])([+-])") + + from sage.cpython.string cimport bytes_to_str, str_to_bytes + +diff -up src/sage/libs/symmetrica/sc.pxi.orig src/sage/libs/symmetrica/sc.pxi +--- src/sage/libs/symmetrica/sc.pxi.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/libs/symmetrica/sc.pxi 2020-02-26 10:48:22.217706792 -0700 +@@ -103,7 +103,7 @@ def charvalue_symmetrica(irred, cls, tab + + + def kranztafel_symmetrica(a, b): +- """ ++ r""" + you enter the INTEGER objects, say a and b, and res becomes a + MATRIX object, the charactertable of S_b \wr S_a, co becomes a + VECTOR object of classorders and cl becomes a VECTOR object of +diff -up src/sage/matrix/matrix0.pyx.orig src/sage/matrix/matrix0.pyx +--- src/sage/matrix/matrix0.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/matrix/matrix0.pyx 2020-02-27 12:13:14.304142090 -0700 +@@ -2175,7 +2175,7 @@ cdef class Matrix(sage.structure.element + # Functions + ################################################### + def act_on_polynomial(self, f): +- """ ++ r""" + Returns the polynomial f(self*x). + + INPUT: +@@ -2241,7 +2241,7 @@ cdef class Matrix(sage.structure.element + # Arithmetic + ################################################### + def commutator(self, other): +- """ ++ r""" + Return the commutator self*other - other*self. + + EXAMPLES:: +@@ -4713,7 +4713,7 @@ cdef class Matrix(sage.structure.element + # Arithmetic + ################################################### + cdef _vector_times_matrix_(self, Vector v): +- """ ++ r""" + Returns the vector times matrix product. + + INPUT: +diff -up src/sage/matrix/matrix2.pyx.orig src/sage/matrix/matrix2.pyx +--- src/sage/matrix/matrix2.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/matrix/matrix2.pyx 2020-02-27 09:38:09.247266810 -0700 +@@ -6754,7 +6754,7 @@ cdef class Matrix(Matrix1): + raise NotImplementedError("%s\nEchelon form not implemented over '%s'."%(msg,self.base_ring())) + + def echelon_form(self, algorithm="default", cutoff=0, **kwds): +- """ ++ r""" + Return the echelon form of self. + + .. NOTE:: +@@ -8810,7 +8810,7 @@ cdef class Matrix(Matrix1): + return img + + def density(self): +- """ ++ r""" + Return the density of the matrix. + + By density we understand the ratio of the number of nonzero +diff -up src/sage/matrix/matrix_gf2e_dense.pyx.orig src/sage/matrix/matrix_gf2e_dense.pyx +--- src/sage/matrix/matrix_gf2e_dense.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/matrix/matrix_gf2e_dense.pyx 2020-02-27 12:14:38.189668697 -0700 +@@ -1,4 +1,4 @@ +-""" ++r""" + Dense matrices over `\GF{2^e}` for `2 <= e <= 10` using the M4RIE library. + + The M4RIE library offers two matrix representations: +@@ -502,7 +502,7 @@ cdef class Matrix_gf2e_dense(matrix_dens + return ans + + cpdef Matrix_gf2e_dense _multiply_karatsuba(Matrix_gf2e_dense self, Matrix_gf2e_dense right): +- """ ++ r""" + Matrix multiplication using Karatsuba over polynomials with + matrix coefficients over GF(2). + +diff -up src/sage/matrix/matrix_integer_dense.pyx.orig src/sage/matrix/matrix_integer_dense.pyx +--- src/sage/matrix/matrix_integer_dense.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/matrix/matrix_integer_dense.pyx 2020-02-27 09:28:59.795169737 -0700 +@@ -1011,7 +1011,7 @@ cdef class Matrix_integer_dense(Matrix_d + + # TODO: Implement better + cdef _vector_times_matrix_(self, Vector v): +- """ ++ r""" + Returns the vector times matrix product. + + INPUT: +@@ -3948,7 +3948,7 @@ cdef class Matrix_integer_dense(Matrix_d + return M + + def _invert_iml(self, use_nullspace=False, check_invertible=True): +- """ ++ r""" + Invert this matrix using IML. The output matrix is an integer + matrix and a denominator. + +@@ -4013,7 +4013,7 @@ cdef class Matrix_integer_dense(Matrix_d + return self._solve_iml(P.identity_matrix(), right=True) + + def _invert_flint(self): +- """ ++ r""" + Invert this matrix using FLINT. The output matrix is an integer + matrix and a denominator. + +@@ -4299,7 +4299,7 @@ cdef class Matrix_integer_dense(Matrix_d + return X + + def _solve_iml(self, Matrix_integer_dense B, right=True): +- """ ++ r""" + Let A equal self be a square matrix. Given B return an integer + matrix C and an integer d such that self C*A == d*B if right is + False or A*C == d*B if right is True. +@@ -4465,7 +4465,7 @@ cdef class Matrix_integer_dense(Matrix_d + mpz_array_clear(mp_N, n*m) + + def _solve_flint(self, Matrix_integer_dense B, right=True): +- """ ++ r""" + Let A equal self be a square matrix. Given B return an integer + matrix C and an integer d such that self C*A == d*B if right is + False or A*C == d*B if right is True. +@@ -5008,7 +5008,7 @@ cdef class Matrix_integer_dense(Matrix_d + # This code below is by E. Burcin. Thanks! + ##################################################################################### + def _hnf_mod(self, D): +- """ ++ r""" + INPUT: + + - ``D`` -- a small integer that is assumed to be a +diff -up src/sage/matrix/matrix_integer_sparse.pyx.orig src/sage/matrix/matrix_integer_sparse.pyx +--- src/sage/matrix/matrix_integer_sparse.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/matrix/matrix_integer_sparse.pyx 2020-02-27 12:09:43.961809493 -0700 +@@ -909,7 +909,7 @@ cdef class Matrix_integer_sparse(Matrix_ + return g + + def _solve_right_nonsingular_square(self, B, algorithm=None, check_rank=False): +- """ ++ r""" + If self is a matrix `A`, then this function returns a + vector or matrix `X` such that `A X = B`. If + `B` is a vector then `X` is a vector and if +diff -up src/sage/matrix/matrix_modn_dense_double.pyx.orig src/sage/matrix/matrix_modn_dense_double.pyx +--- src/sage/matrix/matrix_modn_dense_double.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/matrix/matrix_modn_dense_double.pyx 2020-02-27 12:21:56.689974086 -0700 +@@ -1,4 +1,4 @@ +-""" ++r""" + Dense matrices over `\ZZ/n\ZZ` for `n < 2^{23}` using LinBox's ``Modular<double>`` + + AUTHORS: +diff -up src/sage/matrix/matrix_modn_dense_float.pyx.orig src/sage/matrix/matrix_modn_dense_float.pyx +--- src/sage/matrix/matrix_modn_dense_float.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/matrix/matrix_modn_dense_float.pyx 2020-02-27 12:16:51.940319470 -0700 +@@ -1,4 +1,4 @@ +-""" ++r""" + Dense matrices over `\ZZ/n\ZZ` for `n < 2^{11}` using LinBox's ``Modular<float>`` + + AUTHORS: +diff -up src/sage/matrix/matrix_modn_dense_template.pxi.orig src/sage/matrix/matrix_modn_dense_template.pxi +--- src/sage/matrix/matrix_modn_dense_template.pxi.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/matrix/matrix_modn_dense_template.pxi 2020-02-27 12:30:47.428707123 -0700 +@@ -1,4 +1,4 @@ +-""" ++r""" + Dense matrices over `\ZZ/n\ZZ` for `n` small using the LinBox library (FFLAS/FFPACK). + + FFLAS/FFPACK are libraries to provide BLAS/LAPACK-style routines for +@@ -663,7 +663,7 @@ cdef class Matrix_modn_dense_template(Ma + return (word_size, little_endian, s), 10 + + def _unpickle(self, data, int version): +- """ ++ r""" + TESTS: + + Test for char-sized modulus:: +@@ -861,7 +861,7 @@ cdef class Matrix_modn_dense_template(Ma + + + cpdef _add_(self, right): +- """ ++ r""" + Add two dense matrices over `\Z/n\Z` + + INPUT: +@@ -2525,7 +2525,7 @@ cdef class Matrix_modn_dense_template(Ma + return Matrix_dense.determinant(self) + + cdef xgcd_eliminate(self, celement * row1, celement* row2, Py_ssize_t start_col): +- """ ++ r""" + Reduces ``row1`` and ``row2`` by a unimodular transformation + using the xgcd relation between their first coefficients ``a`` and + ``b``. +diff -up src/sage/matrix/matrix_modn_sparse.pyx.orig src/sage/matrix/matrix_modn_sparse.pyx +--- src/sage/matrix/matrix_modn_sparse.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/matrix/matrix_modn_sparse.pyx 2020-02-27 12:31:50.826605802 -0700 +@@ -854,7 +854,7 @@ cdef class Matrix_modn_sparse(matrix_spa + raise ValueError("no algorithm '%s'"%algorithm) + + def _solve_right_nonsingular_square(self, B, algorithm=None, check_rank=False): +- """ ++ r""" + If self is a matrix `A`, then this function returns a + vector or matrix `X` such that `A X = B`. If + `B` is a vector then `X` is a vector and if +diff -up src/sage/matrix/matrix_polynomial_dense.pyx.orig src/sage/matrix/matrix_polynomial_dense.pyx +--- src/sage/matrix/matrix_polynomial_dense.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/matrix/matrix_polynomial_dense.pyx 2020-02-27 09:22:35.512126137 -0700 +@@ -44,16 +44,16 @@ cdef class Matrix_polynomial_dense(Matri + commonly used in the literature. + + - Working column-wise: each column of the matrix is a vector in the basis; +- then, a $\Bold{K}[x]$-submodule of $\Bold{K}[x]^{m}$ of rank $n$ is +- represented by an $m \times n$ matrix, whose columns span the module +- (via $\Bold{K}[x]$-linear combinations). This matrix has full rank, +- and $n \leq m$. ++ then, a $\Bold{K}[x]$-submodule of $\Bold{K}[x]^{m}$ of rank $n$ is ++ represented by an $m \times n$ matrix, whose columns span the module ++ (via $\Bold{K}[x]$-linear combinations). This matrix has full rank, ++ and $n \leq m$. + + - Working row-wise: each row of the matrix is a vector in the basis; then, +- a $\Bold{K}[x]$-submodule of $\Bold{K}[x]^{n}$ of rank $m$ is +- represented by an $m \times n$ matrix, whose rows span the module (via +- $\Bold{K}[x]$-linear combinations). This matrix has full rank, and $m +- \leq n$. ++ a $\Bold{K}[x]$-submodule of $\Bold{K}[x]^{n}$ of rank $m$ is ++ represented by an $m \times n$ matrix, whose rows span the module (via ++ $\Bold{K}[x]$-linear combinations). This matrix has full rank, and $m ++ \leq n$. + + For the rest of this class description, we assume that one is working + row-wise. For a given such module, all its bases are equivalent under +diff -up src/sage/matrix/matrix_rational_dense.pyx.orig src/sage/matrix/matrix_rational_dense.pyx +--- src/sage/matrix/matrix_rational_dense.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/matrix/matrix_rational_dense.pyx 2020-02-27 12:27:53.166741857 -0700 +@@ -489,7 +489,7 @@ cdef class Matrix_rational_dense(Matrix_ + return rich_to_bool(op, 0) + + cdef _vector_times_matrix_(self, Vector v): +- """ ++ r""" + Returns the vector times matrix product. + + INPUT: +@@ -902,7 +902,7 @@ cdef class Matrix_rational_dense(Matrix_ + return 0 + + def _clear_denom(self): +- """ ++ r""" + INPUT: + + +@@ -958,7 +958,7 @@ cdef class Matrix_rational_dense(Matrix_ + return X + + def charpoly(self, var='x', algorithm=None): +- """ ++ r""" + Return the characteristic polynomial of this matrix. + + .. NOTE:: +@@ -1169,7 +1169,7 @@ cdef class Matrix_rational_dense(Matrix_ + return ans + + def _multiply_over_integers(self, Matrix_rational_dense right, algorithm='default'): +- """ ++ r""" + Multiply this matrix by right using a multimodular algorithm and + return the result. + +diff -up src/sage/matroids/basis_exchange_matroid.pyx.orig src/sage/matroids/basis_exchange_matroid.pyx +--- src/sage/matroids/basis_exchange_matroid.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/matroids/basis_exchange_matroid.pyx 2020-02-27 14:52:21.996354648 -0700 +@@ -2115,7 +2115,7 @@ cdef class BasisExchangeMatroid(Matroid) + return EQ[0] + + cpdef _is_isomorphism(self, other, morphism): +- """ ++ r""" + Version of is_isomorphism() that does no type checking. + + INPUT: +diff -up src/sage/matroids/basis_matroid.pyx.orig src/sage/matroids/basis_matroid.pyx +--- src/sage/matroids/basis_matroid.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/matroids/basis_matroid.pyx 2020-02-27 11:05:01.945973893 -0700 +@@ -1281,7 +1281,7 @@ cdef long set_to_index(bitset_t S): + return index + + cdef index_to_set(bitset_t S, long index, long k, long n): +- """ ++ r""" + Compute the k-subset of `{0, ..., n-1}` of rank index + """ + bitset_clear(S) +diff -up src/sage/matroids/extension.pyx.orig src/sage/matroids/extension.pyx +--- src/sage/matroids/extension.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/matroids/extension.pyx 2020-02-27 11:09:44.223086757 -0700 +@@ -247,7 +247,7 @@ cdef class LinearSubclassesIter: + + + cdef class LinearSubclasses: +- """ ++ r""" + An iterable set of linear subclasses of a matroid. + + Enumerate linear subclasses of a given matroid. A *linear subclass* is a +@@ -411,7 +411,7 @@ cdef class LinearSubclasses: + + + cdef class MatroidExtensions(LinearSubclasses): +- """ ++ r""" + An iterable set of single-element extensions of a given matroid. + + INPUT: +diff -up src/sage/matroids/lean_matrix.pyx.orig src/sage/matroids/lean_matrix.pyx +--- src/sage/matroids/lean_matrix.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/matroids/lean_matrix.pyx 2020-02-27 14:51:31.676283450 -0700 +@@ -2721,7 +2721,7 @@ cdef class QuaternaryMatrix(LeanMatrix): + return sage.matroids.unpickling.unpickle_quaternary_matrix, (version, data) + + cpdef GenericMatrix generic_identity(n, ring): +- """ ++ r""" + Return a GenericMatrix instance containing the `n \times n` identity + matrix over ``ring``. + +diff -up src/sage/matroids/linear_matroid.pyx.orig src/sage/matroids/linear_matroid.pyx +--- src/sage/matroids/linear_matroid.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/matroids/linear_matroid.pyx 2020-02-27 11:08:49.724030318 -0700 +@@ -757,7 +757,7 @@ cdef class LinearMatroid(BasisExchangeMa + return {e: R[self._idx[e]] for e in self.groundset()} + + cpdef LeanMatrix _reduced_representation(self, B=None): +- """ ++ r""" + Return a reduced representation of the matroid, i.e. a matrix `R` such + that `[I\ \ R]` represents the matroid. + +@@ -796,7 +796,7 @@ cdef class LinearMatroid(BasisExchangeMa + # (field) isomorphism + + cpdef bint _is_field_isomorphism(self, LinearMatroid other, morphism): # not safe if self == other +- """ ++ r""" + Version of :meth:`<LinearMatroid.is_field_isomorphism>` that does no + type checking. + +@@ -962,7 +962,7 @@ cdef class LinearMatroid(BasisExchangeMa + return self._is_field_isomorphism(other, morphism) + + cpdef is_field_isomorphism(self, other, morphism): +- """ ++ r""" + Test if a provided morphism induces a bijection between represented + matroids. + +@@ -1318,7 +1318,7 @@ cdef class LinearMatroid(BasisExchangeMa + return type(self)(reduced_matrix=M, groundset=rows + cols) + + cpdef dual(self): +- """ ++ r""" + Return the dual of the matroid. + + Let `M` be a matroid with ground set `E`. If `B` is the set of bases +@@ -1350,7 +1350,7 @@ cdef class LinearMatroid(BasisExchangeMa + return type(self)(reduced_matrix=R, groundset=cols + rows) + + cpdef has_line_minor(self, k, hyperlines=None, certificate=False): +- """ ++ r""" + Test if the matroid has a `U_{2, k}`-minor. + + The matroid `U_{2, k}` is a matroid on `k` elements in which every +@@ -3093,7 +3093,7 @@ cdef class BinaryMatroid(LinearMatroid): + self._one = GF2_one + + cpdef base_ring(self): +- """ ++ r""" + Return the base ring of the matrix representing the matroid, + in this case `\GF{2}`. + +@@ -3273,7 +3273,7 @@ cdef class BinaryMatroid(LinearMatroid): + return self._A.copy() # Deprecated Sage matrix operation + + cpdef LeanMatrix _reduced_representation(self, B=None): +- """ ++ r""" + Return a reduced representation of the matroid, i.e. a matrix `R` such + that `[I\ \ R]` represents the matroid. + +@@ -4161,7 +4161,7 @@ cdef class TernaryMatroid(LinearMatroid) + self._two = GF3_minus_one + + cpdef base_ring(self): +- """ ++ r""" + Return the base ring of the matrix representing the matroid, in this + case `\GF{3}`. + +@@ -4345,7 +4345,7 @@ cdef class TernaryMatroid(LinearMatroid) + return self._A.copy() # Deprecated Sage matrix operation + + cpdef LeanMatrix _reduced_representation(self, B=None): +- """ ++ r""" + Return a reduced representation of the matroid, i.e. a matrix `R` + such that `[I\ \ R]` represents the matroid. + +@@ -4527,7 +4527,7 @@ cdef class TernaryMatroid(LinearMatroid) + return self._t_invariant + + cpdef bicycle_dimension(self): +- """ ++ r""" + Return the bicycle dimension of the ternary matroid. + + The bicycle dimension of a linear subspace `V` is +@@ -5060,7 +5060,7 @@ cdef class QuaternaryMatroid(LinearMatro + self._x_one = (<QuaternaryMatrix>self._A)._x_one + + cpdef base_ring(self): +- """ ++ r""" + Return the base ring of the matrix representing the matroid, in this + case `\GF{4}`. + +@@ -5237,7 +5237,7 @@ cdef class QuaternaryMatroid(LinearMatro + return self._A.copy() # Deprecated Sage matrix operation + + cpdef LeanMatrix _reduced_representation(self, B=None): +- """ ++ r""" + Return a reduced representation of the matroid, i.e. a matrix `R` such + that `[I\ \ R]` represents the matroid. + +@@ -5377,7 +5377,7 @@ cdef class QuaternaryMatroid(LinearMatro + return self._q_invariant + + cpdef bicycle_dimension(self): +- """ ++ r""" + Return the bicycle dimension of the quaternary matroid. + + The bicycle dimension of a linear subspace `V` is +@@ -5774,7 +5774,7 @@ cdef class RegularMatroid(LinearMatroid) + return P + + cpdef base_ring(self): +- """ ++ r""" + Return the base ring of the matrix representing the matroid, in this + case `\ZZ`. + +@@ -6192,7 +6192,7 @@ cdef class RegularMatroid(LinearMatroid) + return {e:idx[m[str(e)]] for e in self.groundset() if str(e) in m} + + cpdef has_line_minor(self, k, hyperlines=None, certificate=False): +- """ ++ r""" + Test if the matroid has a `U_{2, k}`-minor. + + The matroid `U_{2, k}` is a matroid on `k` elements in which every +diff -up src/sage/matroids/matroid.pyx.orig src/sage/matroids/matroid.pyx +--- src/sage/matroids/matroid.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/matroids/matroid.pyx 2020-02-27 11:14:07.206492095 -0700 +@@ -3080,7 +3080,7 @@ cdef class Matroid(SageObject): + return Polyhedron(vertices) + + def independence_matroid_polytope(self): +- """ ++ r""" + Return the independence matroid polytope of ``self``. + + This is defined as the convex hull of the vertices +@@ -3360,7 +3360,7 @@ cdef class Matroid(SageObject): + return self._is_isomorphism(other, morphism) + + cpdef is_isomorphism(self, other, morphism): +- """ ++ r""" + Test if a provided morphism induces a matroid isomorphism. + + A *morphism* is a map from the groundset of ``self`` to the groundset +@@ -3483,7 +3483,7 @@ cdef class Matroid(SageObject): + return self._is_isomorphism(other, mf) + + cpdef _is_isomorphism(self, other, morphism): +- """ ++ r""" + Version of is_isomorphism() that does no type checking. + + INPUT: +@@ -3887,7 +3887,7 @@ cdef class Matroid(SageObject): + return self.delete(X) + + cpdef dual(self): +- """ ++ r""" + Return the dual of the matroid. + + Let `M` be a matroid with ground set `E`. If `B` is the set of bases +@@ -3999,7 +3999,7 @@ cdef class Matroid(SageObject): + return self._has_minor(N, certificate) + + cpdef has_line_minor(self, k, hyperlines=None, certificate=False): +- """ ++ r""" + Test if the matroid has a `U_{2, k}`-minor. + + The matroid `U_{2, k}` is a matroid on `k` elements in which every +@@ -4071,7 +4071,7 @@ cdef class Matroid(SageObject): + return self._has_line_minor(k, hyperlines, certificate) + + cpdef _has_line_minor(self, k, hyperlines, certificate=False): +- """ ++ r""" + Test if the matroid has a `U_{2, k}`-minor. + + Internal version that does no input checking. +@@ -4259,7 +4259,7 @@ cdef class Matroid(SageObject): + return self.dual().extension(element, subsets).dual() + + cpdef modular_cut(self, subsets): +- """ ++ r""" + Compute the modular cut generated by ``subsets``. + + A *modular cut* is a collection `C` of flats such that +@@ -4349,7 +4349,7 @@ cdef class Matroid(SageObject): + return final_list + + cpdef linear_subclasses(self, line_length=None, subsets=None): +- """ ++ r""" + Return an iterable set of linear subclasses of the matroid. + + A *linear subclass* is a set of hyperplanes (i.e. closed sets of rank +@@ -4660,7 +4660,7 @@ cdef class Matroid(SageObject): + return True + + cpdef is_cosimple(self): +- """ ++ r""" + Test if the matroid is cosimple. + + A matroid is *cosimple* if it contains no cocircuits of length 1 or 2. +@@ -4737,7 +4737,7 @@ cdef class Matroid(SageObject): + return components + + cpdef is_connected(self, certificate=False): +- """ ++ r""" + Test if the matroid is connected. + + A *separation* in a matroid is a partition `(X, Y)` of the +@@ -7432,7 +7432,7 @@ cdef class Matroid(SageObject): + return A + + cpdef tutte_polynomial(self, x=None, y=None): +- """ ++ r""" + Return the Tutte polynomial of the matroid. + + The *Tutte polynomial* of a matroid is the polynomial +diff -up src/sage/matroids/set_system.pyx.orig src/sage/matroids/set_system.pyx +--- src/sage/matroids/set_system.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/matroids/set_system.pyx 2020-02-27 14:50:11.189769061 -0700 +@@ -510,7 +510,7 @@ cdef class SetSystem: + return P + + cpdef _equitable_partition(self, SetSystem P=None, EP=None): +- """ ++ r""" + Return an equitable ordered partition of the ground set of the + hypergraph whose edges are the subsets in this SetSystem. + +diff -up src/sage/misc/cachefunc.pyx.orig src/sage/misc/cachefunc.pyx +--- src/sage/misc/cachefunc.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/misc/cachefunc.pyx 2020-02-27 11:38:25.902302125 -0700 +@@ -835,7 +835,7 @@ cdef class CachedFunction(object): + ## forward other questions to the cached function. + + def _instancedoc_(self): +- """ ++ r""" + Provide documentation for the cached function. + + A cached function shall inherit the documentation +diff -up src/sage/modular/arithgroup/arithgroup_element.pyx.orig src/sage/modular/arithgroup/arithgroup_element.pyx +--- src/sage/modular/arithgroup/arithgroup_element.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/modular/arithgroup/arithgroup_element.pyx 2020-02-27 11:52:51.677078266 -0700 +@@ -194,7 +194,7 @@ cdef class ArithmeticSubgroupElement(Mul + return richcmp(self.__x, right.__x, op) + + def __nonzero__(self): +- """ ++ r""" + Return ``True``, since the ``self`` lives in SL(2,\Z), which does not + contain the zero matrix. + +diff -up src/sage/modular/arithgroup/congroup.pyx.orig src/sage/modular/arithgroup/congroup.pyx +--- src/sage/modular/arithgroup/congroup.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/modular/arithgroup/congroup.pyx 2020-02-27 09:02:34.164911827 -0700 +@@ -1,4 +1,4 @@ +-""" ++r""" + Cython helper functions for congruence subgroups + + This file contains optimized Cython implementations of a few functions related +diff -up src/sage/modular/arithgroup/farey_symbol.pyx.orig src/sage/modular/arithgroup/farey_symbol.pyx +--- src/sage/modular/arithgroup/farey_symbol.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/modular/arithgroup/farey_symbol.pyx 2020-02-27 09:01:09.509443852 -0700 +@@ -617,7 +617,7 @@ cdef class Farey: + (forced_format is None and '\xymatrix' in latex.mathjax_avoid_list()): + # output not using xymatrix + s = r'\left( -\infty' +- a = [x._latex_() for x in self.fractions()] + ['\infty'] ++ a = [x._latex_() for x in self.fractions()] + [r'\infty'] + b = self.pairings() + for i in xrange(len(a)): + u = b[i] +diff -up src/sage/modular/modsym/heilbronn.pyx.orig src/sage/modular/modsym/heilbronn.pyx +--- src/sage/modular/modsym/heilbronn.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/modular/modsym/heilbronn.pyx 2020-02-27 11:56:13.562672136 -0700 +@@ -209,7 +209,7 @@ cdef class Heilbronn: + sig_off() + + cdef apply_to_polypart(self, fmpz_poly_t* ans, int i, int k): +- """ ++ r""" + INPUT: + + - ``ans`` - fmpz_poly_t*; pre-allocated an +diff -up src/sage/modular/modsym/manin_symbol.pyx.orig src/sage/modular/modsym/manin_symbol.pyx +--- src/sage/modular/modsym/manin_symbol.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/modular/modsym/manin_symbol.pyx 2020-02-27 09:03:56.595444297 -0700 +@@ -1,5 +1,5 @@ + # -*- coding: utf-8 -*- +-""" ++r""" + Manin symbols + + This module defines the class ManinSymbol. A Manin symbol of +diff -up src/sage/modular/modsym/p1list.pyx.orig src/sage/modular/modsym/p1list.pyx +--- src/sage/modular/modsym/p1list.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/modular/modsym/p1list.pyx 2020-02-27 11:55:42.521181786 -0700 +@@ -27,7 +27,7 @@ ctypedef long long llong + cdef int c_p1_normalize_int(int N, int u, int v, + int* uu, int* vv, int* ss, + int compute_s) except -1: +- """ ++ r""" + Computes the canonical representative of + `\mathbb{P}^1(\ZZ/N\ZZ)` equivalent to + `(u,v)` along with a transforming scalar. +@@ -478,7 +478,7 @@ def p1list_llong(int N): + return lst + + def p1list(N): +- """ ++ r""" + Returns the elements of the projective line modulo `N`, + `\mathbb{P}^1(\ZZ/N\ZZ)`, as a plain list of 2-tuples. + +@@ -655,7 +655,7 @@ cdef int p1_normalize_xgcdtable(int N, i + + + cdef class P1List(object): +- """ ++ r""" + The class for `\mathbb{P}^1(\ZZ/N\ZZ)`, the projective line modulo `N`. + + EXAMPLES:: +@@ -673,7 +673,7 @@ cdef class P1List(object): + True + """ + def __init__(self, int N): +- """ ++ r""" + The constructor for the class P1List. + + INPUT: +@@ -824,7 +824,7 @@ cdef class P1List(object): + return "The projective line over the integers modulo %s"%self.__N + + def lift_to_sl2z(self, int i): +- """ ++ r""" + Lift the `i`'th element of this P1list to an element of + `SL(2,\ZZ)`. + +@@ -1187,7 +1187,7 @@ cdef class export: + return c_p1_normalize_llong(N, u, v, uu, vv, ss, compute_s) + + def lift_to_sl2z_int(int c, int d, int N): +- """ ++ r""" + Lift a pair `(c, d)` to an element of `SL(2, \ZZ)`. + + `(c,d)` is assumed to be an element of +diff -up src/sage/modules/free_module_element.pyx.orig src/sage/modules/free_module_element.pyx +--- src/sage/modules/free_module_element.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/modules/free_module_element.pyx 2020-02-27 15:01:58.389454347 -0700 +@@ -1966,7 +1966,7 @@ cdef class FreeModuleElement(Vector): + return copy(self) + + def lift_centered(self): +- """ ++ r""" + Lift to a congruent, centered vector. + + INPUT: +@@ -2338,7 +2338,7 @@ cdef class FreeModuleElement(Vector): + + def plot_step(self, xmin=0, xmax=1, eps=None, res=None, + connect=True, **kwds): +- """ ++ r""" + INPUT: + + - ``xmin`` - (default: 0) start x position to start +@@ -3609,7 +3609,7 @@ cdef class FreeModuleElement(Vector): + from sage.misc.latex import latex + vector_delimiters = latex.vector_delimiters() + s = '\left' + vector_delimiters[0] +- s += ',,'.join([latex(a) for a in self.list()]) ++ s += ',\,'.join([latex(a) for a in self.list()]) + return s + '\right' + vector_delimiters[1] + + def dense_vector(self): +diff -up src/sage/numerical/backends/generic_backend.pyx.orig src/sage/numerical/backends/generic_backend.pyx +--- src/sage/numerical/backends/generic_backend.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/numerical/backends/generic_backend.pyx 2020-02-27 15:12:48.869255994 -0700 +@@ -1370,7 +1370,7 @@ cdef class GenericBackend: + raise NotImplementedError() + + cpdef bint is_variable_basic(self, int index): +- """ ++ r""" + Test whether the given variable is basic. + + This assumes that the problem has been solved with the simplex method +@@ -1400,7 +1400,7 @@ cdef class GenericBackend: + raise NotImplementedError() + + cpdef bint is_variable_nonbasic_at_lower_bound(self, int index): +- """ ++ r""" + Test whether the given variable is nonbasic at lower bound. + + This assumes that the problem has been solved with the simplex method +@@ -1430,7 +1430,7 @@ cdef class GenericBackend: + raise NotImplementedError() + + cpdef bint is_slack_variable_basic(self, int index): +- """ ++ r""" + Test whether the slack variable of the given row is basic. + + This assumes that the problem has been solved with the simplex method +@@ -1460,7 +1460,7 @@ cdef class GenericBackend: + raise NotImplementedError() + + cpdef bint is_slack_variable_nonbasic_at_lower_bound(self, int index): +- """ ++ r""" + Test whether the given variable is nonbasic at lower bound. + + This assumes that the problem has been solved with the simplex method +diff -up src/sage/numerical/backends/glpk_backend.pyx.orig src/sage/numerical/backends/glpk_backend.pyx +--- src/sage/numerical/backends/glpk_backend.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/numerical/backends/glpk_backend.pyx 2020-02-27 15:11:17.902928905 -0700 +@@ -2130,7 +2130,7 @@ cdef class GLPKBackend(GenericBackend): + + + cpdef bint is_variable_basic(self, int index): +- """ ++ r""" + Test whether the given variable is basic. + + This assumes that the problem has been solved with the simplex method +@@ -2161,7 +2161,7 @@ cdef class GLPKBackend(GenericBackend): + return self.get_col_stat(index) == GLP_BS + + cpdef bint is_variable_nonbasic_at_lower_bound(self, int index): +- """ ++ r""" + Test whether the given variable is nonbasic at lower bound. + This assumes that the problem has been solved with the simplex method + and a basis is available. Otherwise an exception will be raised. +@@ -2191,7 +2191,7 @@ cdef class GLPKBackend(GenericBackend): + return self.get_col_stat(index) == GLP_NL + + cpdef bint is_slack_variable_basic(self, int index): +- """ ++ r""" + Test whether the slack variable of the given row is basic. + + This assumes that the problem has been solved with the simplex method +@@ -2222,7 +2222,7 @@ cdef class GLPKBackend(GenericBackend): + return self.get_row_stat(index) == GLP_BS + + cpdef bint is_slack_variable_nonbasic_at_lower_bound(self, int index): +- """ ++ r""" + Test whether the slack variable of the given row is nonbasic at lower bound. + + This assumes that the problem has been solved with the simplex method +diff -up src/sage/numerical/backends/interactivelp_backend.pyx.orig src/sage/numerical/backends/interactivelp_backend.pyx +--- src/sage/numerical/backends/interactivelp_backend.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/numerical/backends/interactivelp_backend.pyx 2020-02-27 15:09:45.383668708 -0700 +@@ -1071,7 +1071,7 @@ cdef class InteractiveLPBackend: + problem_type, ring, objective_constant_term=d) + + cpdef bint is_variable_basic(self, int index): +- """ ++ r""" + Test whether the given variable is basic. + + This assumes that the problem has been solved with the simplex method +@@ -1101,7 +1101,7 @@ cdef class InteractiveLPBackend: + return self.lp_std_form.decision_variables()[index] in self.final_dictionary.basic_variables() + + cpdef bint is_variable_nonbasic_at_lower_bound(self, int index): +- """ ++ r""" + Test whether the given variable is nonbasic at lower bound. + + This assumes that the problem has been solved with the simplex method +@@ -1131,7 +1131,7 @@ cdef class InteractiveLPBackend: + return self.lp_std_form.decision_variables()[index] in self.final_dictionary.nonbasic_variables() + + cpdef bint is_slack_variable_basic(self, int index): +- """ ++ r""" + Test whether the slack variable of the given row is basic. + + This assumes that the problem has been solved with the simplex method +@@ -1161,7 +1161,7 @@ cdef class InteractiveLPBackend: + return self.lp_std_form.slack_variables()[index] in self.final_dictionary.basic_variables() + + cpdef bint is_slack_variable_nonbasic_at_lower_bound(self, int index): +- """ ++ r""" + Test whether the given variable is nonbasic at lower bound. + + This assumes that the problem has been solved with the simplex method +@@ -1193,7 +1193,7 @@ cdef class InteractiveLPBackend: + cpdef dictionary(self): + # Proposed addition to the general interface, + # which would for other solvers return backend dictionaries (#18804) +- """ ++ r""" + Return a dictionary representing the current basis. + + EXAMPLES:: +@@ -1228,7 +1228,7 @@ cdef class InteractiveLPBackend: + + cpdef interactive_lp_problem(self): + +- """ ++ r""" + Return the :class:`InteractiveLPProblem` object associated with this backend. + + EXAMPLES:: +diff -up src/sage/quadratic_forms/count_local_2.pyx.orig src/sage/quadratic_forms/count_local_2.pyx +--- src/sage/quadratic_forms/count_local_2.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/quadratic_forms/count_local_2.pyx 2020-02-27 14:47:35.887635615 -0700 +@@ -168,7 +168,7 @@ cdef CountAllLocalTypesNaive_cdef(Q, p, + + + def CountAllLocalTypesNaive(Q, p, k, m, zvec, nzvec): +- """ ++ r""" + This is an internal routine, which is called by + :meth:`sage.quadratic_forms.quadratic_form.QuadraticForm.count_congruence_solutions_by_type + QuadraticForm.count_congruence_solutions_by_type`. See the documentation of +diff -up src/sage/quivers/algebra_elements.pyx.orig src/sage/quivers/algebra_elements.pyx +--- src/sage/quivers/algebra_elements.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/quivers/algebra_elements.pyx 2020-02-27 11:46:21.879821027 -0700 +@@ -280,7 +280,7 @@ cdef class PathAlgebraElement(RingElemen + ) + + def _latex_(self): +- """ ++ r""" + Latex string representation. + + EXAMPLES:: +diff -up src/sage/rings/bernoulli_mod_p.pyx.orig src/sage/rings/bernoulli_mod_p.pyx +--- src/sage/rings/bernoulli_mod_p.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/rings/bernoulli_mod_p.pyx 2020-02-27 14:12:09.407391213 -0700 +@@ -35,7 +35,7 @@ from sage.rings.bernmm import bernmm_ber + + + def verify_bernoulli_mod_p(data): +- """ ++ r""" + Computes checksum for Bernoulli numbers. + + It checks the identity +diff -up src/sage/rings/complex_arb.pyx.orig src/sage/rings/complex_arb.pyx +--- src/sage/rings/complex_arb.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/rings/complex_arb.pyx 2020-02-27 10:34:45.320041770 -0700 +@@ -2922,7 +2922,7 @@ cdef class ComplexBall(RingElement): + return res + + def rising_factorial(self, n): +- """ ++ r""" + Return the ``n``-th rising factorial of this ball. + + The `n`-th rising factorial of `x` is equal to `x (x+1) \cdots (x+n-1)`. +@@ -3640,7 +3640,7 @@ cdef class ComplexBall(RingElement): + return res + + def polylog(self, s): +- """ ++ r""" + Return the polylogarithm `\operatorname{Li}_s(\mathrm{self})`. + + EXAMPLES:: +diff -up src/sage/rings/complex_double.pyx.orig src/sage/rings/complex_double.pyx +--- src/sage/rings/complex_double.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/rings/complex_double.pyx 2020-02-27 10:32:06.489839183 -0700 +@@ -1578,7 +1578,7 @@ cdef class ComplexDoubleElement(FieldEle + return self.real().is_NaN() or self.imag().is_NaN() + + cpdef _pow_(self, other): +- """ ++ r""" + The complex number ``self`` raised to the power ``other``. + + This is computed using complex logarithms and exponentials +diff -up src/sage/rings/complex_interval.pyx.orig src/sage/rings/complex_interval.pyx +--- src/sage/rings/complex_interval.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/rings/complex_interval.pyx 2020-02-27 10:20:29.626115066 -0700 +@@ -714,7 +714,7 @@ cdef class ComplexIntervalFieldElement(s + return x + + def norm(self): +- """ ++ r""" + Return the norm of this complex number. + + If `c = a + bi` is a complex number, then the norm of `c` is defined as +@@ -1096,7 +1096,7 @@ cdef class ComplexIntervalFieldElement(s + return x + + def __invert__(self): +- """ ++ r""" + Return the multiplicative inverse of ``self``. + + EXAMPLES:: +diff -up src/sage/rings/complex_mpc.pyx.orig src/sage/rings/complex_mpc.pyx +--- src/sage/rings/complex_mpc.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/rings/complex_mpc.pyx 2020-02-26 11:15:34.722679686 -0700 +@@ -147,15 +147,15 @@ cdef inline mpfr_rnd_t rnd_im(mpc_rnd_t + sign = '[+-]' + digit_ten = '[0123456789]' + exponent_ten = '[e@]' + sign + '?[0123456789]+' +-number_ten = 'inf(?:inity)?|@inf@|nan(?:([0-9A-Z_]*))?|@nan@(?:([0-9A-Z_]*))?'\ +- '|(?:' + digit_ten + '*.' + digit_ten + '+|' + digit_ten + '+.?)(?:' + exponent_ten + ')?' +-imaginary_ten = 'i(?:\s**\s*(?:' + number_ten + '))?|(?:' + number_ten + ')\s**\s*i' +-complex_ten = '(?P<im_first>(?P<im_first_im_sign>' + sign + ')?\s*(?P<im_first_im_abs>' + imaginary_ten + ')' \ +- '(\s*(?P<im_first_re_sign>' + sign + ')\s*(?P<im_first_re_abs>' + number_ten + '))?)' \ ++number_ten = r'inf(?:inity)?|@inf@|nan(?:([0-9A-Z_]*))?|@nan@(?:([0-9A-Z_]*))?'\ ++ '|(?:' + digit_ten + r'*.' + digit_ten + '+|' + digit_ten + r'+.?)(?:' + exponent_ten + ')?' ++imaginary_ten = r'i(?:\s**\s*(?:' + number_ten + '))?|(?:' + number_ten + r')\s**\s*i' ++complex_ten = '(?P<im_first>(?P<im_first_im_sign>' + sign + r')?\s*(?P<im_first_im_abs>' + imaginary_ten + ')' \ ++ r'(\s*(?P<im_first_re_sign>' + sign + r')\s*(?P<im_first_re_abs>' + number_ten + '))?)' \ + '|' \ +- '(?P<re_first>(?P<re_first_re_sign>' + sign + ')?\s*(?P<re_first_re_abs>' + number_ten + ')' \ +- '(\s*(?P<re_first_im_sign>' + sign + ')\s*(?P<re_first_im_abs>' + imaginary_ten + '))?)' +-re_complex_ten = re.compile('^\s*(?:' + complex_ten + ')\s*$', re.I) ++ '(?P<re_first>(?P<re_first_re_sign>' + sign + r')?\s*(?P<re_first_re_abs>' + number_ten + ')' \ ++ r'(\s*(?P<re_first_im_sign>' + sign + r')\s*(?P<re_first_im_abs>' + imaginary_ten + '))?)' ++re_complex_ten = re.compile(r'^\s*(?:' + complex_ten + r')\s*$', re.I) + + cpdef inline split_complex_string(string, int base=10): + """ +@@ -195,17 +195,17 @@ cpdef inline split_complex_string(string + + # Warning: number, imaginary, and complex should be enclosed in parentheses + # when used as regexp because of alternatives '|' +- number = '@nan@(?:([0-9A-Z_]*))?|@inf@|(?:' + digit + '*.' + digit + '+|' + digit + '+.?)(?:' + exponent + ')?' ++ number = r'@nan@(?:([0-9A-Z_]*))?|@inf@|(?:' + digit + r'*.' + digit + '+|' + digit + r'+.?)(?:' + exponent + ')?' + if base <= 10: +- number = 'nan(?:([0-9A-Z_]*))?|inf(?:inity)?|' + number +- imaginary = 'i(?:\s**\s*(?:' + number + '))?|(?:' + number + ')\s**\s*i' +- complex = '(?P<im_first>(?P<im_first_im_sign>' + sign + ')?\s*(?P<im_first_im_abs>' + imaginary + ')' \ +- '(\s*(?P<im_first_re_sign>' + sign + ')\s*(?P<im_first_re_abs>' + number + '))?)' \ ++ number = r'nan(?:([0-9A-Z_]*))?|inf(?:inity)?|' + number ++ imaginary = r'i(?:\s**\s*(?:' + number + '))?|(?:' + number + r')\s**\s*i' ++ complex = '(?P<im_first>(?P<im_first_im_sign>' + sign + r')?\s*(?P<im_first_im_abs>' + imaginary + ')' \ ++ r'(\s*(?P<im_first_re_sign>' + sign + r')\s*(?P<im_first_re_abs>' + number + '))?)' \ + '|' \ +- '(?P<re_first>(?P<re_first_re_sign>' + sign + ')?\s*(?P<re_first_re_abs>' + number + ')' \ +- '(\s*(?P<re_first_im_sign>' + sign + ')\s*(?P<re_first_im_abs>' + imaginary + '))?)' ++ '(?P<re_first>(?P<re_first_re_sign>' + sign + r')?\s*(?P<re_first_re_abs>' + number + ')' \ ++ r'(\s*(?P<re_first_im_sign>' + sign + r')\s*(?P<re_first_im_abs>' + imaginary + '))?)' + +- z = re.match('^\s*(?:' + complex + ')\s*$', string, re.I) ++ z = re.match(r'^\s*(?:' + complex + r')\s*$', string, re.I) + + x, y = None, None + if z is not None: +@@ -217,18 +217,18 @@ cpdef inline split_complex_string(string + return None + + if z.group(prefix + '_re_abs') is not None: +- x = z.expand('\g<' + prefix + '_re_abs>') ++ x = z.expand(r'\g<' + prefix + '_re_abs>') + if z.group(prefix + '_re_sign') is not None: +- x = z.expand('\g<' + prefix + '_re_sign>') + x ++ x = z.expand(r'\g<' + prefix + '_re_sign>') + x + + if z.group(prefix + '_im_abs') is not None: +- y = re.search('(?P<im_part>' + number + ')', z.expand('\g<' + prefix + '_im_abs>'), re.I) ++ y = re.search('(?P<im_part>' + number + ')', z.expand(r'\g<' + prefix + '_im_abs>'), re.I) + if y is None: + y = '1' + else: +- y = y.expand('\g<im_part>') ++ y = y.expand(r'\g<im_part>') + if z.group(prefix + '_im_sign') is not None: +- y = z.expand('\g<' + prefix + '_im_sign>') + y ++ y = z.expand(r'\g<' + prefix + '_im_sign>') + y + + return x, y + +@@ -1725,7 +1725,7 @@ cdef class MPComplexNumber(sage.structur + return z + + def cosh(self): +- """ ++ r""" + Return the hyperbolic cosine of this complex number: + + .. MATH:: +@@ -1745,7 +1745,7 @@ cdef class MPComplexNumber(sage.structur + return z + + def sinh(self): +- """ ++ r""" + Return the hyperbolic sine of this complex number: + + .. MATH:: +@@ -2085,7 +2085,7 @@ cdef class MPComplexNumber(sage.structur + return z + + def exp(self): +- """ ++ r""" + Return the exponential of this complex number: + + .. MATH:: +diff -up src/sage/rings/complex_number.pyx.orig src/sage/rings/complex_number.pyx +--- src/sage/rings/complex_number.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/rings/complex_number.pyx 2020-02-27 14:09:39.595076646 -0700 +@@ -1714,7 +1714,7 @@ cdef class ComplexNumber(sage.structure. + + # Other special functions + def agm(self, right, algorithm="optimal"): +- """ ++ r""" + Return the Arithmetic-Geometric Mean (AGM) of ``self`` and ``right``. + + INPUT: +diff -up src/sage/rings/finite_rings/element_givaro.pyx.orig src/sage/rings/finite_rings/element_givaro.pyx +--- src/sage/rings/finite_rings/element_givaro.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/rings/finite_rings/element_givaro.pyx 2020-02-27 10:22:04.184449193 -0700 +@@ -1204,7 +1204,7 @@ cdef class FiniteField_givaroElement(Fin + return make_FiniteField_givaroElement(self._cache,r) + + def __pow__(FiniteField_givaroElement self, exp, other): +- """ ++ r""" + EXAMPLES:: + + sage: K.<a> = GF(3^3, 'a') +@@ -1345,7 +1345,7 @@ cdef class FiniteField_givaroElement(Fin + return self_int + + def integer_representation(FiniteField_givaroElement self): +- """ ++ r""" + Return the integer representation of ``self``. When ``self`` is in the + prime subfield, the integer returned is equal to ``self``. + +diff -up src/sage/rings/finite_rings/element_ntl_gf2e.pyx.orig src/sage/rings/finite_rings/element_ntl_gf2e.pyx +--- src/sage/rings/finite_rings/element_ntl_gf2e.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/rings/finite_rings/element_ntl_gf2e.pyx 2020-02-27 10:22:49.535650221 -0700 +@@ -400,7 +400,7 @@ cdef class Cache_ntl_gf2e(SageObject): + raise ValueError("Cannot coerce element %s to this field." % e) + + cpdef FiniteField_ntl_gf2eElement fetch_int(self, number): +- """ ++ r""" + Given an integer less than `p^n` with base `2` + representation `a_0 + a_1 \cdot 2 + \cdots + a_k 2^k`, this returns + `a_0 + a_1 x + \cdots + a_k x^k`, where `x` is the +diff -up src/sage/rings/finite_rings/finite_field_base.pyx.orig src/sage/rings/finite_rings/finite_field_base.pyx +--- src/sage/rings/finite_rings/finite_field_base.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/rings/finite_rings/finite_field_base.pyx 2020-02-27 10:24:14.382155455 -0700 +@@ -959,7 +959,7 @@ cdef class FiniteField(Field): + return self._modulus + + def polynomial(self, name=None): +- """ ++ r""" + Return the minimal polynomial of the generator of ``self`` over + the prime finite field. + +diff -up src/sage/rings/finite_rings/hom_finite_field.pyx.orig src/sage/rings/finite_rings/hom_finite_field.pyx +--- src/sage/rings/finite_rings/hom_finite_field.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/rings/finite_rings/hom_finite_field.pyx 2020-02-27 14:05:34.420471507 -0700 +@@ -147,7 +147,7 @@ cdef class SectionFiniteFieldHomomorphis + + + def _repr_(self): +- """ ++ r""" + Return a string representation of this section. + + EXAMPLES:: +diff -up src/sage/rings/finite_rings/integer_mod.pyx.orig src/sage/rings/finite_rings/integer_mod.pyx +--- src/sage/rings/finite_rings/integer_mod.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/rings/finite_rings/integer_mod.pyx 2020-02-27 10:27:31.196688078 -0700 +@@ -115,7 +115,7 @@ from sage.structure.parent cimport Paren + cdef Integer one_Z = Integer(1) + + def Mod(n, m, parent=None): +- """ ++ r""" + Return the equivalence class of `n` modulo `m` as + an element of `\ZZ/m\ZZ`. + +@@ -1547,7 +1547,7 @@ cdef class IntegerMod_abstract(FiniteRin + return [a for a in self.parent() if a**n == self] + + def _balanced_abs(self): +- """ ++ r""" + This function returns `x` or `-x`, whichever has a + positive representative in `-n/2 < x \leq n/2`. + +@@ -1896,7 +1896,7 @@ cdef class IntegerMod_abstract(FiniteRin + + + cdef class IntegerMod_gmp(IntegerMod_abstract): +- """ ++ r""" + Elements of `\ZZ/n\ZZ` for n not small enough + to be operated on in word size. + +@@ -2185,7 +2185,7 @@ cdef class IntegerMod_gmp(IntegerMod_abs + return long(self.lift()) + + def __pow__(IntegerMod_gmp self, exp, m): # NOTE: m ignored, always use modulus of parent ring +- """ ++ r""" + EXAMPLES:: + + sage: R = Integers(10^10) +@@ -2294,7 +2294,7 @@ cdef class IntegerMod_gmp(IntegerMod_abs + + @coerce_binop + def gcd(self, IntegerMod_gmp other): +- """ ++ r""" + Greatest common divisor + + Returns the "smallest" generator in `\ZZ / N\ZZ` of the ideal +@@ -2327,7 +2327,7 @@ cdef class IntegerMod_gmp(IntegerMod_abs + + + cdef class IntegerMod_int(IntegerMod_abstract): +- """ ++ r""" + Elements of `\ZZ/n\ZZ` for n small enough to + be operated on in 32 bits + +@@ -2948,7 +2948,7 @@ cdef class IntegerMod_int(IntegerMod_abs + + + def _balanced_abs(self): +- """ ++ r""" + This function returns `x` or `-x`, whichever has a + positive representative in `-n/2 < x \leq n/2`. + """ +@@ -2959,7 +2959,7 @@ cdef class IntegerMod_int(IntegerMod_abs + + @coerce_binop + def gcd(self, IntegerMod_int other): +- """ ++ r""" + Greatest common divisor + + Returns the "smallest" generator in `\ZZ / N\ZZ` of the ideal +@@ -3137,7 +3137,7 @@ cdef int jacobi_int(int_fast32_t a, int_ + ###################################################################### + + cdef class IntegerMod_int64(IntegerMod_abstract): +- """ ++ r""" + Elements of `\ZZ/n\ZZ` for n small enough to + be operated on in 64 bits + +@@ -3448,7 +3448,7 @@ cdef class IntegerMod_int64(IntegerMod_a + return self._new_c(self.ivalue >> (-k)) + + def __pow__(IntegerMod_int64 self, exp, m): # NOTE: m ignored, always use modulus of parent ring +- """ ++ r""" + EXAMPLES:: + + sage: R = Integers(10) +@@ -3596,7 +3596,7 @@ cdef class IntegerMod_int64(IntegerMod_a + return hash(self.ivalue) + + def _balanced_abs(self): +- """ ++ r""" + This function returns `x` or `-x`, whichever has a + positive representative in `-n/2 < x \leq n/2`. + """ +@@ -3607,7 +3607,7 @@ cdef class IntegerMod_int64(IntegerMod_a + + @coerce_binop + def gcd(self, IntegerMod_int64 other): +- """ ++ r""" + Greatest common divisor + + Returns the "smallest" generator in `\ZZ / N\ZZ` of the ideal +diff -up src/sage/rings/finite_rings/residue_field.pyx.orig src/sage/rings/finite_rings/residue_field.pyx +--- src/sage/rings/finite_rings/residue_field.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/rings/finite_rings/residue_field.pyx 2020-02-26 12:24:03.640048006 -0700 +@@ -1,4 +1,4 @@ +-""" ++r""" + Finite residue fields + + We can take the residue field of maximal ideals in the ring of integers +@@ -1808,7 +1808,7 @@ class ResidueFiniteField_ntl_gf2e(Residu + """ + # we change the order for consistency with FiniteField_ntl_gf2e's __cinit__ + def __init__(self, q, name, modulus, repr, p, to_vs, to_order, PB): +- """ ++ r""" + INPUT: + + - ``p`` -- the prime ideal defining this residue field +diff -up src/sage/rings/function_field/element.pyx.orig src/sage/rings/function_field/element.pyx +--- src/sage/rings/function_field/element.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/rings/function_field/element.pyx 2020-02-26 14:11:12.803894369 -0700 +@@ -148,7 +148,7 @@ cdef class FunctionFieldElement(FieldEle + raise NotImplementedError("PARI does not support general function field elements.") + + def _latex_(self): +- """ ++ r""" + EXAMPLES:: + + sage: K.<t> = FunctionField(QQ) +diff -up src/sage/rings/function_field/ideal.py.orig src/sage/rings/function_field/ideal.py +--- src/sage/rings/function_field/ideal.py.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/rings/function_field/ideal.py 2020-02-26 14:10:24.140803564 -0700 +@@ -2166,7 +2166,7 @@ class FunctionFieldIdeal_global(Function + return self.gens_over_base() + + def gens_two(self): +- """ ++ r""" + Return two generators of this fractional ideal. + + If the ideal is principal, one generator *may* be returned. +diff -up src/sage/rings/integer_ring.pyx.orig src/sage/rings/integer_ring.pyx +--- src/sage/rings/integer_ring.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/rings/integer_ring.pyx 2020-02-27 14:00:39.430781027 -0700 +@@ -391,7 +391,7 @@ cdef class IntegerRing_class(PrincipalId + return "\Bold{Z}" + + def __getitem__(self, x): +- """ ++ r""" + Return the ring `\ZZ[...]` obtained by adjoining to the integers one + or several elements. + +@@ -1143,7 +1143,7 @@ cdef class IntegerRing_class(PrincipalId + return sage.rings.infinity.infinity + + def zeta(self, n=2): +- """ ++ r""" + Return a primitive ``n``-th root of unity in the integers, or raise an + error if none exists. + +diff -up src/sage/rings/laurent_series_ring_element.pyx.orig src/sage/rings/laurent_series_ring_element.pyx +--- src/sage/rings/laurent_series_ring_element.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/rings/laurent_series_ring_element.pyx 2020-02-27 10:37:46.261850642 -0700 +@@ -86,7 +86,7 @@ def is_LaurentSeries(x): + + + cdef class LaurentSeries(AlgebraElement): +- """ ++ r""" + A Laurent Series. + + We consider a Laurent series of the form `t^n \cdot f` where `f` is a +diff -up src/sage/rings/number_field/number_field_element.pyx.orig src/sage/rings/number_field/number_field_element.pyx +--- src/sage/rings/number_field/number_field_element.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/rings/number_field/number_field_element.pyx 2020-02-27 14:17:24.733733303 -0700 +@@ -484,7 +484,7 @@ cdef class NumberFieldElement(FieldEleme + return codomain(f(im_gens[0])) + + def _latex_(self): +- """ ++ r""" + Returns the latex representation for this element. + + EXAMPLES:: +@@ -3877,7 +3877,7 @@ cdef class NumberFieldElement(FieldEleme + return ht + + def global_height_non_arch(self, prec=None): +- """ ++ r""" + Returns the total non-archimedean component of the height of self. + + INPUT: +diff -up src/sage/rings/number_field/number_field_element_quadratic.pyx.orig src/sage/rings/number_field/number_field_element_quadratic.pyx +--- src/sage/rings/number_field/number_field_element_quadratic.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/rings/number_field/number_field_element_quadratic.pyx 2020-02-26 12:30:16.381058496 -0700 +@@ -1,4 +1,4 @@ +-""" ++r""" + Optimized Quadratic Number Field Elements + + This file defines a Cython class ``NumberFieldElement_quadratic`` to speed up +@@ -840,7 +840,7 @@ cdef class NumberFieldElement_quadratic( + return res + + def parts(self): +- """ ++ r""" + This function returns a pair of rationals `a` and `b` such that self `= + a+b\sqrt{D}`. + +@@ -1581,7 +1581,7 @@ cdef class NumberFieldElement_quadratic( + ################################################################################# + + def __hash__(self): +- """ ++ r""" + Return hash of this number field element. + + For elements in `\ZZ` or `\QQ` the hash coincides with the one in the +@@ -2015,7 +2015,7 @@ cdef class NumberFieldElement_quadratic( + + + def norm(self, K=None): +- """ ++ r""" + Return the norm of self. If the second argument is None, this is the + norm down to `\QQ`. Otherwise, return the norm down to K (which had + better be either `\QQ` or this number field). +diff -up src/sage/rings/number_field/number_field_morphisms.pyx.orig src/sage/rings/number_field/number_field_morphisms.pyx +--- src/sage/rings/number_field/number_field_morphisms.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/rings/number_field/number_field_morphisms.pyx 2020-02-27 14:15:30.637780730 -0700 +@@ -340,7 +340,7 @@ cdef class EmbeddedNumberFieldConversion + + + cpdef matching_root(poly, target, ambient_field=None, margin=1, max_prec=None): +- """ ++ r""" + Given a polynomial and a target, this function chooses the root that + target best approximates as compared in ambient_field. + +@@ -403,7 +403,7 @@ cpdef matching_root(poly, target, ambien + + + cpdef closest(target, values, margin=1): +- """ ++ r""" + This is a utility function that returns the item in values closest to + target (with respect to the \code{abs} function). If margin is greater + than 1, and x and y are the first and second closest elements to target, +diff -up src/sage/rings/number_field/totallyreal.pyx.orig src/sage/rings/number_field/totallyreal.pyx +--- src/sage/rings/number_field/totallyreal.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/rings/number_field/totallyreal.pyx 2020-02-26 12:31:22.883761593 -0700 +@@ -1,4 +1,4 @@ +-""" ++r""" + Enumeration of Primitive Totally Real Fields + + This module contains functions for enumerating all primitive +diff -up src/sage/rings/padics/CA_template.pxi.orig src/sage/rings/padics/CA_template.pxi +--- src/sage/rings/padics/CA_template.pxi.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/rings/padics/CA_template.pxi 2020-02-27 14:21:45.536053250 -0700 +@@ -392,7 +392,7 @@ cdef class CAElement(pAdicTemplateElemen + + + def __pow__(CAElement self, _right, dummy): +- """ ++ r""" + Exponentiation. + + When ``right`` is divisible by `p` then one can get more +@@ -521,7 +521,7 @@ cdef class CAElement(pAdicTemplateElemen + return ans + + cdef pAdicTemplateElement _lshift_c(self, long shift): +- """ ++ r""" + Multiplies by `\pi^{\mbox{shift}}`. + + Negative shifts may truncate the result. +@@ -553,7 +553,7 @@ cdef class CAElement(pAdicTemplateElemen + return ans + + cdef pAdicTemplateElement _rshift_c(self, long shift): +- """ ++ r""" + Divides by ``^{\mbox{shift}}``. + + Positive shifts may truncate the result. +@@ -1611,7 +1611,7 @@ cdef class pAdicCoercion_CA_frac_field(R + + + cdef class pAdicConvert_CA_frac_field(Morphism): +- """ ++ r""" + The section of the inclusion from `\ZZ_q`` to its fraction field. + + EXAMPLES:: +diff -up src/sage/rings/padics/CR_template.pxi.orig src/sage/rings/padics/CR_template.pxi +--- src/sage/rings/padics/CR_template.pxi.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/rings/padics/CR_template.pxi 2020-02-27 14:20:48.003085660 -0700 +@@ -720,7 +720,7 @@ cdef class CRElement(pAdicTemplateElemen + return ans + + cdef pAdicTemplateElement _lshift_c(self, long shift): +- """ ++ r""" + Multiplies by `\pi^{\mbox{shift}}`. + + Negative shifts may truncate the result if the parent is not a +@@ -751,7 +751,7 @@ cdef class CRElement(pAdicTemplateElemen + return ans + + cdef pAdicTemplateElement _rshift_c(self, long shift): +- """ ++ r""" + Divides by ``\pi^{\mbox{shift}}``. + + Positive shifts may truncate the result if the parent is not a +@@ -2338,7 +2338,7 @@ cdef class pAdicCoercion_CR_frac_field(R + + + cdef class pAdicConvert_CR_frac_field(Morphism): +- """ ++ r""" + The section of the inclusion from `\ZZ_q`` to its fraction field. + + EXAMPLES:: +diff -up src/sage/rings/padics/FM_template.pxi.orig src/sage/rings/padics/FM_template.pxi +--- src/sage/rings/padics/FM_template.pxi.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/rings/padics/FM_template.pxi 2020-02-27 14:30:07.794033635 -0700 +@@ -381,7 +381,7 @@ cdef class FMElement(pAdicTemplateElemen + return ans + + cdef pAdicTemplateElement _lshift_c(self, long shift): +- """ ++ r""" + Multiplies self by `\pi^{shift}`. + + If shift < -self.valuation(), digits will be truncated. See +@@ -428,7 +428,7 @@ cdef class FMElement(pAdicTemplateElemen + return ans + + cdef pAdicTemplateElement _rshift_c(self, long shift): +- """ ++ r""" + Divides by `\pi^{shift}`, and truncates. + + Note that this operation will insert arbitrary digits (in +@@ -462,7 +462,7 @@ cdef class FMElement(pAdicTemplateElemen + return ans + + def add_bigoh(self, absprec): +- """ ++ r""" + Returns a new element truncated modulo `\pi^{\mbox{absprec}}`. + + INPUT: +diff -up src/sage/rings/padics/FP_template.pxi.orig src/sage/rings/padics/FP_template.pxi +--- src/sage/rings/padics/FP_template.pxi.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/rings/padics/FP_template.pxi 2020-02-27 14:27:17.166102208 -0700 +@@ -653,7 +653,7 @@ cdef class FPElement(pAdicTemplateElemen + return ans + + cdef pAdicTemplateElement _lshift_c(self, long shift): +- """ ++ r""" + Multiplies self by `\pi^{shift}`. + + Negative shifts may truncate the result if the parent is not a +@@ -706,7 +706,7 @@ cdef class FPElement(pAdicTemplateElemen + return ans + + cdef pAdicTemplateElement _rshift_c(self, long shift): +- """ ++ r""" + Divides by `\pi^{shift}`. + + Positive shifts may truncate the result if the parent is not a +@@ -782,7 +782,7 @@ cdef class FPElement(pAdicTemplateElemen + return self.parent()._printer.repr_gen(self, do_latex, mode=mode) + + def add_bigoh(self, absprec): +- """ ++ r""" + Returns a new element truncated modulo `\pi^{\mbox{absprec}}`. + + INPUT: +diff -up src/sage/rings/padics/local_generic_element.pyx.orig src/sage/rings/padics/local_generic_element.pyx +--- src/sage/rings/padics/local_generic_element.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/rings/padics/local_generic_element.pyx 2020-02-27 10:40:29.052964694 -0700 +@@ -355,7 +355,7 @@ cdef class LocalGenericElement(Commutati + return ans + + def _latex_(self): +- """ ++ r""" + Returns a latex representation of self. + + EXAMPLES:: +diff -up src/sage/rings/padics/morphism.pyx.orig src/sage/rings/padics/morphism.pyx +--- src/sage/rings/padics/morphism.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/rings/padics/morphism.pyx 2020-02-27 14:31:55.331074487 -0700 +@@ -280,7 +280,7 @@ cdef class FrobeniusEndomorphism_padics( + + + def __hash__(self): +- """ ++ r""" + Return a hash of this morphism. + + It is the hash of ``(domain, codomain, ('Frob', power)`` +diff -up src/sage/rings/padics/padic_capped_absolute_element.pyx.orig src/sage/rings/padics/padic_capped_absolute_element.pyx +--- src/sage/rings/padics/padic_capped_absolute_element.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/rings/padics/padic_capped_absolute_element.pyx 2020-02-27 10:48:47.499131689 -0700 +@@ -383,7 +383,7 @@ cdef class pAdicCappedAbsoluteElement(CA + return ans + + def _exp_binary_splitting(self, aprec): +- """ ++ r""" + Compute the exponential power series of this element + + This is a helper method for :meth:`exp`. +@@ -443,7 +443,7 @@ cdef class pAdicCappedAbsoluteElement(CA + return ans + + def _exp_newton(self, aprec, log_algorithm=None): +- """ ++ r""" + Compute the exponential power series of this element + + This is a helper method for :meth:`exp`. +diff -up src/sage/rings/padics/padic_capped_relative_element.pyx.orig src/sage/rings/padics/padic_capped_relative_element.pyx +--- src/sage/rings/padics/padic_capped_relative_element.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/rings/padics/padic_capped_relative_element.pyx 2020-02-27 10:45:06.545045373 -0700 +@@ -250,7 +250,7 @@ cdef class pAdicCappedRelativeElement(CR + return self.lift_c() + + def residue(self, absprec=1, field=None, check_prec=True): +- """ ++ r""" + Reduces this element modulo `p^{\mathrm{absprec}}`. + + INPUT: +@@ -436,7 +436,7 @@ cdef class pAdicCappedRelativeElement(CR + return ans + + def _exp_binary_splitting(self, aprec): +- """ ++ r""" + Compute the exponential power series of this element + + This is a helper method for :meth:`exp`. +@@ -498,7 +498,7 @@ cdef class pAdicCappedRelativeElement(CR + return ans + + def _exp_newton(self, aprec, log_algorithm=None): +- """ ++ r""" + Compute the exponential power series of this element + + This is a helper method for :meth:`exp`. +diff -up src/sage/rings/padics/padic_ext_element.pyx.orig src/sage/rings/padics/padic_ext_element.pyx +--- src/sage/rings/padics/padic_ext_element.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/rings/padics/padic_ext_element.pyx 2020-02-26 12:37:01.119373785 -0700 +@@ -1,4 +1,4 @@ +-""" ++r""" + p-Adic Extension Element + + A common superclass for all elements of extension rings and field of `\ZZ_p` and +diff -up src/sage/rings/padics/padic_fixed_mod_element.pyx.orig src/sage/rings/padics/padic_fixed_mod_element.pyx +--- src/sage/rings/padics/padic_fixed_mod_element.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/rings/padics/padic_fixed_mod_element.pyx 2020-02-27 10:47:41.918293107 -0700 +@@ -157,7 +157,7 @@ cdef class pAdicFixedModElement(FMElemen + return self.lift_c() + + cdef lift_c(self): +- """ ++ r""" + Returns an integer congruent to this element modulo the precision. + + .. WARNING:: +@@ -227,7 +227,7 @@ cdef class pAdicFixedModElement(FMElemen + holder.value) + + def _integer_(self, Z=None): +- """ ++ r""" + Return an integer congruent to ``self`` modulo the precision. + + .. WARNING:: +@@ -449,7 +449,7 @@ cdef class pAdicFixedModElement(FMElemen + return ans + + def _exp_binary_splitting(self, aprec): +- """ ++ r""" + Compute the exponential power series of this element + + This is a helper method for :meth:`exp`. +@@ -508,7 +508,7 @@ cdef class pAdicFixedModElement(FMElemen + return ans + + def _exp_newton(self, aprec, log_algorithm=None): +- """ ++ r""" + Compute the exponential power series of this element + + This is a helper method for :meth:`exp`. +diff -up src/sage/rings/padics/padic_floating_point_element.pyx.orig src/sage/rings/padics/padic_floating_point_element.pyx +--- src/sage/rings/padics/padic_floating_point_element.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/rings/padics/padic_floating_point_element.pyx 2020-02-27 10:46:09.415931306 -0700 +@@ -238,7 +238,7 @@ cdef class pAdicFloatingPointElement(FPE + return self.lift_c() + + def residue(self, absprec=1, field=None, check_prec=False): +- """ ++ r""" + Reduces this element modulo `p^{\mathrm{absprec}}`. + + INPUT: +@@ -321,7 +321,7 @@ cdef class pAdicFloatingPointElement(FPE + return Mod(selfvalue, modulus) + + def _exp_binary_splitting(self, aprec): +- """ ++ r""" + Compute the exponential power series of this element + + This is a helper method for :meth:`exp`. +@@ -382,7 +382,7 @@ cdef class pAdicFloatingPointElement(FPE + return ans + + def _exp_newton(self, aprec, log_algorithm=None): +- """ ++ r""" + Compute the exponential power series of this element + + This is a helper method for :meth:`exp`. +diff -up src/sage/rings/padics/padic_generic_element.pyx.orig src/sage/rings/padics/padic_generic_element.pyx +--- src/sage/rings/padics/padic_generic_element.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/rings/padics/padic_generic_element.pyx 2020-02-27 10:43:44.418501293 -0700 +@@ -543,7 +543,7 @@ cdef class pAdicGenericElement(LocalGene + return self._repr_(mode=mode) + + def _repr_(self, mode=None, do_latex=False): +- """ ++ r""" + Returns a string representation of this element. + + INPUT: +@@ -3039,7 +3039,7 @@ cdef class pAdicGenericElement(LocalGene + return series_unit*nfactorial_unit.inverse_of_unit()<<(series_val-nfactorial_val) + + def _exp_binary_splitting(self, aprec): +- """ ++ r""" + Compute the exponential power series of this element + + This is a helper method for :meth:`exp`. +@@ -3085,7 +3085,7 @@ cdef class pAdicGenericElement(LocalGene + raise NotImplementedError("The binary splitting algorithm is not implemented for the parent: %s" % self.parent()) + + def _exp_newton(self, aprec, log_algorithm=None): +- """ ++ r""" + Compute the exponential power series of this element + + This is a helper method for :meth:`exp`. +@@ -3763,7 +3763,7 @@ cdef class pAdicGenericElement(LocalGene + return parent(root) + + def _inverse_pth_root(self, twist=None, hint=None): +- """ ++ r""" + In its simplest form, computes the inverse of + ``p``-th root of this element. + +@@ -4106,7 +4106,7 @@ cdef class pAdicGenericElement(LocalGene + return (H[n](z - 1) - ((z.log(0))**(n-1)*(1 - z).log(0))/Integer(n-1).factorial()).add_bigoh(N) + + def polylog(self, n): +- """ ++ r""" + Return `Li_n(self)` , the `n`th `p`-adic polylogarithm of this element. + + INPUT: +@@ -4359,7 +4359,7 @@ def _polylog_c(n, p): + return p/(p-1) - (n-1)/p.log() + (n-1)*(n*(p-1)/p.log()).log(p) + (2*p*(p-1)*n/p.log()).log(p) + + def _findprec(c_1, c_2, c_3, p): +- """ ++ r""" + Return an integer k such that c_1*k - c_2*log_p(k) > c_3. + This is an internal function, used by :meth:`polylog`. + +@@ -4389,7 +4389,7 @@ def _findprec(c_1, c_2, c_3, p): + k += 1 + + def _compute_g(p, n, prec, terms): +- """ ++ r""" + Return the list of power series `g_i = \int(-g_{i-1}/(v-v^2))` used in the computation of polylogarithms. + This is an internal function, used by :meth:`polylog`. + +diff -up src/sage/rings/padics/padic_template_element.pxi.orig src/sage/rings/padics/padic_template_element.pxi +--- src/sage/rings/padics/padic_template_element.pxi.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/rings/padics/padic_template_element.pxi 2020-02-27 10:49:59.029864892 -0700 +@@ -612,7 +612,7 @@ cdef class pAdicTemplateElement(pAdicGen + return trim_zeros(list(self.unit_part().expansion(lift_mode='smallest'))) + + cpdef pAdicTemplateElement unit_part(self): +- """ ++ r""" + Returns the unit part of this element. + + This is the `p`-adic element `u` in the same ring so that this +diff -up src/sage/rings/padics/padic_ZZ_pX_CA_element.pyx.orig src/sage/rings/padics/padic_ZZ_pX_CA_element.pyx +--- src/sage/rings/padics/padic_ZZ_pX_CA_element.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/rings/padics/padic_ZZ_pX_CA_element.pyx 2020-02-26 12:41:30.300414798 -0700 +@@ -1,4 +1,4 @@ +-""" ++r""" + `p`-Adic ``ZZ_pX`` CA Element + + This file implements elements of Eisenstein and unramified extensions +@@ -1539,7 +1539,7 @@ cdef class pAdicZZpXCAElement(pAdicZZpXE + return self.to_fraction_field() * (~right) + + def _integer_(self, Z=None): +- """ ++ r""" + Returns an integer congruent to this element modulo + `\pi`^``self.absolute_precision()``, if possible. + +@@ -1935,7 +1935,7 @@ cdef class pAdicZZpXCAElement(pAdicZZpXE + return [zero] * ordp + ulist + + def matrix_mod_pn(self): +- """ ++ r""" + Returns the matrix of right multiplication by the element on + the power basis `1, x, x^2, \ldots, x^{d-1}` for this + extension field. Thus the *rows* of this matrix give the +diff -up src/sage/rings/padics/padic_ZZ_pX_CR_element.pyx.orig src/sage/rings/padics/padic_ZZ_pX_CR_element.pyx +--- src/sage/rings/padics/padic_ZZ_pX_CR_element.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/rings/padics/padic_ZZ_pX_CR_element.pyx 2020-02-26 12:40:01.838037825 -0700 +@@ -1,4 +1,4 @@ +-""" ++r""" + `p`-Adic ``ZZ_pX`` CR Element + + This file implements elements of Eisenstein and unramified extensions +@@ -224,7 +224,7 @@ cdef inline int check_ordp(long a) excep + + cdef class pAdicZZpXCRElement(pAdicZZpXElement): + def __init__(self, parent, x, absprec = infinity, relprec = infinity, empty = False): +- """ ++ r""" + Creates an element of a capped relative precision, unramified + or Eisenstein extension of `\ZZ_p` or `\QQ_p`. + +@@ -2298,7 +2298,7 @@ cdef class pAdicZZpXCRElement(pAdicZZpXE + return ans + + def _integer_(self, Z=None): +- """ ++ r""" + Return an integer congruent to this element modulo + `\pi`^``self.absolute_precision()``, if possible + +@@ -2796,7 +2796,7 @@ cdef class pAdicZZpXCRElement(pAdicZZpXE + return ulist + + def matrix_mod_pn(self): +- """ ++ r""" + Return the matrix of right multiplication by the element on + the power basis `1, x, x^2, \ldots, x^{d-1}` for this + extension field. Thus the *rows* of this matrix give the +diff -up src/sage/rings/padics/padic_ZZ_pX_element.pyx.orig src/sage/rings/padics/padic_ZZ_pX_element.pyx +--- src/sage/rings/padics/padic_ZZ_pX_element.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/rings/padics/padic_ZZ_pX_element.pyx 2020-02-26 12:38:14.111019390 -0700 +@@ -344,7 +344,7 @@ cdef class pAdicZZpXElement(pAdicExtElem + return ans + + def norm(self, base=None): +- """ ++ r""" + Return the absolute or relative norm of this element. + + NOTE! This is not the `p`-adic absolute value. This is a +@@ -420,7 +420,7 @@ cdef class pAdicZZpXElement(pAdicExtElem + return self.parent().ground_ring()(self.unit_part().matrix_mod_pn().det()) * norm_of_uniformizer**self.valuation() + + def trace(self, base = None): +- """ ++ r""" + Return the absolute or relative trace of this element. + + If ``base`` is given then ``base`` must be a subfield of the +diff -up src/sage/rings/padics/padic_ZZ_pX_FM_element.pyx.orig src/sage/rings/padics/padic_ZZ_pX_FM_element.pyx +--- src/sage/rings/padics/padic_ZZ_pX_FM_element.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/rings/padics/padic_ZZ_pX_FM_element.pyx 2020-02-26 12:43:41.091000479 -0700 +@@ -1,4 +1,4 @@ +-""" ++r""" + `p`-Adic ``ZZ_pX`` FM Element + + This file implements elements of Eisenstein and unramified extensions +@@ -149,7 +149,7 @@ from sage.rings.padics.pow_computer_ext + + cdef class pAdicZZpXFMElement(pAdicZZpXElement): + def __init__(self, parent, x, absprec=None, relprec=None, empty=False): +- """ ++ r""" + Creates an element of a fixed modulus, unramified or + eisenstein extension of `\ZZ_p` or `\QQ_p`. + +@@ -902,7 +902,7 @@ cdef class pAdicZZpXFMElement(pAdicZZpXE + return ans + + def add_bigoh(self, absprec): +- """ ++ r""" + Return a new element truncated modulo \pi^absprec. + + This is only implemented for unramified extension at +@@ -949,7 +949,7 @@ cdef class pAdicZZpXFMElement(pAdicZZpXE + return ans + + def _integer_(self, Z=None): +- """ ++ r""" + Returns an integer congruent to this element modulo + `\pi` ^ ``self.absolute_precision()``, if possible. + +@@ -980,7 +980,7 @@ cdef class pAdicZZpXFMElement(pAdicZZpXE + return ans + + def matrix_mod_pn(self): +- """ ++ r""" + Returns the matrix of right multiplication by the element on + the power basis `1, x, x^2, \ldots, x^{d-1}` for this + extension field. Thus the \emph{rows} of this matrix give the +@@ -1041,7 +1041,7 @@ cdef class pAdicZZpXFMElement(pAdicZZpXE + # raise NotImplementedError + + def norm(self, base = None): +- """ ++ r""" + Return the absolute or relative norm of this element. + + NOTE! This is not the `p`-adic absolute value. This is a +@@ -1078,7 +1078,7 @@ cdef class pAdicZZpXFMElement(pAdicZZpXE + return self.parent().ground_ring()(self.unit_part().matrix_mod_pn().det()) * norm_of_uniformizer**self.valuation() + + def trace(self, base = None): +- """ ++ r""" + Return the absolute or relative trace of this element. + + If `K` is given then `K` must be a subfield of the parent `L` of +diff -up src/sage/rings/padics/pow_computer_ext.pyx.orig src/sage/rings/padics/pow_computer_ext.pyx +--- src/sage/rings/padics/pow_computer_ext.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/rings/padics/pow_computer_ext.pyx 2020-02-27 14:23:35.369082319 -0700 +@@ -1248,7 +1248,7 @@ cdef class PowComputer_ZZ_pX(PowComputer + return 0 + + cdef class PowComputer_ZZ_pX_FM(PowComputer_ZZ_pX): +- """ ++ r""" + This class only caches a context and modulus for p^prec_cap. + + Designed for use with fixed modulus p-adic rings, in Eisenstein +diff -up src/sage/rings/padics/qadic_flint_CA.pyx.orig src/sage/rings/padics/qadic_flint_CA.pyx +--- src/sage/rings/padics/qadic_flint_CA.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/rings/padics/qadic_flint_CA.pyx 2020-02-27 14:24:22.319239812 -0700 +@@ -27,7 +27,7 @@ cdef class qAdicCappedAbsoluteElement(CA + norm = norm_unram + + def matrix_mod_pn(self): +- """ ++ r""" + Returns the matrix of right multiplication by the element on + the power basis `1, x, x^2, \ldots, x^{d-1}` for this + extension field. Thus the *rows* of this matrix give the +diff -up src/sage/rings/padics/qadic_flint_CR.pyx.orig src/sage/rings/padics/qadic_flint_CR.pyx +--- src/sage/rings/padics/qadic_flint_CR.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/rings/padics/qadic_flint_CR.pyx 2020-02-27 14:28:41.772583958 -0700 +@@ -27,7 +27,7 @@ cdef class qAdicCappedRelativeElement(CR + norm = norm_unram + + def matrix_mod_pn(self): +- """ ++ r""" + Returns the matrix of right multiplication by the element on + the power basis `1, x, x^2, \ldots, x^{d-1}` for this + extension field. Thus the *rows* of this matrix give the +diff -up src/sage/rings/padics/qadic_flint_FM.pyx.orig src/sage/rings/padics/qadic_flint_FM.pyx +--- src/sage/rings/padics/qadic_flint_FM.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/rings/padics/qadic_flint_FM.pyx 2020-02-27 14:29:11.364052944 -0700 +@@ -27,7 +27,7 @@ cdef class qAdicFixedModElement(FMElemen + norm = norm_unram + + def matrix_mod_pn(self): +- """ ++ r""" + Returns the matrix of right multiplication by the element on + the power basis `1, x, x^2, \ldots, x^{d-1}` for this + extension field. Thus the *rows* of this matrix give the +diff -up src/sage/rings/padics/qadic_flint_FP.pyx.orig src/sage/rings/padics/qadic_flint_FP.pyx +--- src/sage/rings/padics/qadic_flint_FP.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/rings/padics/qadic_flint_FP.pyx 2020-02-27 14:25:28.424053567 -0700 +@@ -27,7 +27,7 @@ cdef class qAdicFloatingPointElement(FPE + norm = norm_unram + + def matrix_mod_pn(self): +- """ ++ r""" + Returns the matrix of right multiplication by the element on + the power basis `1, x, x^2, \ldots, x^{d-1}` for this + extension field. Thus the *rows* of this matrix give the +diff -up src/sage/rings/polynomial/cyclotomic.pyx.orig src/sage/rings/polynomial/cyclotomic.pyx +--- src/sage/rings/polynomial/cyclotomic.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/rings/polynomial/cyclotomic.pyx 2020-02-27 14:43:20.186376927 -0700 +@@ -193,7 +193,7 @@ def cyclotomic_coeffs(nn, sparse=None): + return L + + def cyclotomic_value(n, x): +- """ ++ r""" + Return the value of the `n`-th cyclotomic polynomial evaluated at `x`. + + INPUT: +diff -up src/sage/rings/polynomial/laurent_polynomial.pyx.orig src/sage/rings/polynomial/laurent_polynomial.pyx +--- src/sage/rings/polynomial/laurent_polynomial.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/rings/polynomial/laurent_polynomial.pyx 2020-02-27 14:42:24.611430268 -0700 +@@ -237,7 +237,7 @@ cdef class LaurentPolynomial(Commutative + + + cdef class LaurentPolynomial_univariate(LaurentPolynomial): +- """ ++ r""" + A univariate Laurent polynomial in the form of `t^n \cdot f` + where `f` is a polynomial in `t`. + +diff -up src/sage/rings/polynomial/multi_polynomial_libsingular.pyx.orig src/sage/rings/polynomial/multi_polynomial_libsingular.pyx +--- src/sage/rings/polynomial/multi_polynomial_libsingular.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/rings/polynomial/multi_polynomial_libsingular.pyx 2020-02-26 12:49:19.224880230 -0700 +@@ -2075,7 +2075,7 @@ cdef class MPolynomial_libsingular(MPoly + return new_MP(P, _p) + + def __call__(self, *x, **kwds): +- """ ++ r""" + Evaluate this multi-variate polynomial at ``x``, where ``x`` + is either the tuple of values to substitute in, or one can use + functional notation ``f(a_0,a_1,a_2, \ldots)`` to evaluate +@@ -2344,7 +2344,7 @@ cdef class MPolynomial_libsingular(MPoly + return new_MP((<MPolynomial_libsingular>left)._parent,_p) + + cpdef _div_(left, right_ringelement): +- """ ++ r""" + Divide left by right + + EXAMPLES:: +@@ -2559,7 +2559,7 @@ cdef class MPolynomial_libsingular(MPoly + return char_to_str(s) + + def _latex_(self): +- """ ++ r""" + Return a polynomial LaTeX representation of this polynomial. + + EXAMPLES:: +@@ -4500,7 +4500,7 @@ cdef class MPolynomial_libsingular(MPoly + return Sequence(l, check=False, immutable=True) + + def reduce(self,I): +- """ ++ r""" + Return a remainder of this polynomial modulo the + polynomials in ``I``. + +@@ -5219,7 +5219,7 @@ cdef class MPolynomial_libsingular(MPoly + return new_MP(self._parent,p) + + def integral(self, MPolynomial_libsingular var): +- """ ++ r""" + Integrates this polynomial with respect to the provided + variable. + +diff -up src/sage/rings/polynomial/multi_polynomial.pyx.orig src/sage/rings/polynomial/multi_polynomial.pyx +--- src/sage/rings/polynomial/multi_polynomial.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/rings/polynomial/multi_polynomial.pyx 2020-02-27 11:00:30.479716969 -0700 +@@ -209,7 +209,7 @@ cdef class MPolynomial(CommutativeRingEl + return R([self]) + + def coefficients(self): +- """ ++ r""" + Return the nonzero coefficients of this polynomial in a list. + The returned list is decreasingly ordered by the term ordering + of ``self.parent()``, i.e. the list of coefficients matches the list +@@ -1224,7 +1224,7 @@ cdef class MPolynomial(CommutativeRingEl + return R(dict([(k,f(v)) for (k,v) in self.dict().items()])) + + def _norm_over_nonprime_finite_field(self): +- """ ++ r""" + Given a multivariate polynomial over a nonprime finite field + `\GF{p**e}`, compute the norm of the polynomial down to `\GF{p}`, which + is the product of the conjugates by the Frobenius action on +diff -up src/sage/rings/polynomial/pbori.pyx.orig src/sage/rings/polynomial/pbori.pyx +--- src/sage/rings/polynomial/pbori.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/rings/polynomial/pbori.pyx 2020-02-27 10:58:59.991311061 -0700 +@@ -1362,7 +1362,7 @@ cdef class BooleanPolynomialRing(MPolyno + return R + + def defining_ideal(self): +- """ ++ r""" + Return `I = <x_i^2 + x_i> \subset R` where ``R = + self.cover_ring()``, and `x_i` any element in the set of + variables of this ring. +diff -up src/sage/rings/polynomial/plural.pyx.orig src/sage/rings/polynomial/plural.pyx +--- src/sage/rings/polynomial/plural.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/rings/polynomial/plural.pyx 2020-02-26 12:46:32.801795133 -0700 +@@ -250,7 +250,7 @@ cdef class NCPolynomialRing_plural(Ring) + + """ + def __init__(self, base_ring, names, c, d, order, category, check=True): +- """ ++ r""" + Construct a noncommutative polynomial G-algebra subject to the following conditions: + + INPUT: +diff -up src/sage/rings/polynomial/polynomial_element.pyx.orig src/sage/rings/polynomial/polynomial_element.pyx +--- src/sage/rings/polynomial/polynomial_element.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/rings/polynomial/polynomial_element.pyx 2020-02-27 10:56:29.731958111 -0700 +@@ -2654,8 +2654,8 @@ cdef class Polynomial(CommutativeAlgebra + var = "" + s += "%s %s" % (x, var) + s = s.replace(" + -", " - ") +- s = re.sub(" 1(.0+)? |"," ", s) +- s = re.sub(" -1(.0+)? |", " -", s) ++ s = re.sub(r" 1(.0+)? |"," ", s) ++ s = re.sub(r" -1(.0+)? |", " -", s) + s = s.replace("|","") + if s == " ": + return "0" +@@ -2755,7 +2755,7 @@ cdef class Polynomial(CommutativeAlgebra + raise IndexError("polynomials are immutable") + + cpdef _floordiv_(self, right): +- """ ++ r""" + Quotient of division of self by other. This is denoted //. + + If self = quotient * right + remainder, this function returns +@@ -4795,7 +4795,7 @@ cdef class Polynomial(CommutativeAlgebra + return ~(q.leading_coefficient())*q # make monic (~ is inverse in python) + + def is_primitive(self, n=None, n_prime_divs=None): +- """ ++ r""" + Return ``True`` if the polynomial is primitive. The semantics of + "primitive" depend on the polynomial coefficients. + +@@ -6385,8 +6385,8 @@ cdef class Polynomial(CommutativeAlgebra + where the roots `a` and `b` are to be considered in the algebraic + closure of the fraction field of the coefficients and counted with + multiplicities. If the polynomials are not monic this quantity is +- multiplied by `\alpha_1^{deg(p_2)} \alpha_2^{deg(p_1)}` where +- `\alpha_1` and `\alpha_2` are the leading coefficients of `p_1` and ++ multiplied by `\alpha_1^{deg(p_2)} \alpha_2^{deg(p_1)}` where ++ `\alpha_1` and `\alpha_2` are the leading coefficients of `p_1` and + `p_2` respectively. + + INPUT: +diff -up src/sage/rings/polynomial/polynomial_gf2x.pyx.orig src/sage/rings/polynomial/polynomial_gf2x.pyx +--- src/sage/rings/polynomial/polynomial_gf2x.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/rings/polynomial/polynomial_gf2x.pyx 2020-02-27 14:35:51.159778076 -0700 +@@ -101,7 +101,7 @@ cdef class Polynomial_GF2X(Polynomial_te + return pari(self.list()).Polrev(variable) * pari(1).Mod(2) + + def modular_composition(Polynomial_GF2X self, Polynomial_GF2X g, Polynomial_GF2X h, algorithm=None): +- """ ++ r""" + Compute `f(g) \pmod h`. + + Both implementations use Brent-Kung's Algorithm 2.1 (*Fast Algorithms +diff -up src/sage/rings/polynomial/polynomial_integer_dense_flint.pyx.orig src/sage/rings/polynomial/polynomial_integer_dense_flint.pyx +--- src/sage/rings/polynomial/polynomial_integer_dense_flint.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/rings/polynomial/polynomial_integer_dense_flint.pyx 2020-02-27 14:40:21.060772018 -0700 +@@ -1,4 +1,4 @@ +-""" ++r""" + Dense univariate polynomials over `\ZZ`, implemented using FLINT. + + AUTHORS: +@@ -1350,7 +1350,7 @@ cdef class Polynomial_integer_dense_flin + return smallInteger(fmpz_poly_degree(self.__poly)) + + def pseudo_divrem(self, B): +- """ ++ r""" + Write ``A = self``. This function computes polynomials `Q` and `R` + and an integer `d` such that + +diff -up src/sage/rings/polynomial/polynomial_modn_dense_ntl.pyx.orig src/sage/rings/polynomial/polynomial_modn_dense_ntl.pyx +--- src/sage/rings/polynomial/polynomial_modn_dense_ntl.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/rings/polynomial/polynomial_modn_dense_ntl.pyx 2020-02-27 14:36:40.134885830 -0700 +@@ -1,4 +1,4 @@ +-""" ++r""" + Dense univariate polynomials over `\ZZ/n\ZZ`, implemented using NTL. + + This implementation is generally slower than the FLINT implementation in +diff -up src/sage/rings/polynomial/polynomial_zmod_flint.pyx.orig src/sage/rings/polynomial/polynomial_zmod_flint.pyx +--- src/sage/rings/polynomial/polynomial_zmod_flint.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/rings/polynomial/polynomial_zmod_flint.pyx 2020-02-27 14:40:56.729095964 -0700 +@@ -1,4 +1,4 @@ +-""" ++r""" + Dense univariate polynomials over `\ZZ/n\ZZ`, implemented using FLINT. + + This module gives a fast implementation of `(\ZZ/n\ZZ)[x]` whenever `n` is at +diff -up src/sage/rings/polynomial/real_roots.pyx.orig src/sage/rings/polynomial/real_roots.pyx +--- src/sage/rings/polynomial/real_roots.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/rings/polynomial/real_roots.pyx 2020-02-27 14:38:08.079283628 -0700 +@@ -1252,7 +1252,7 @@ def de_casteljau_intvec(Vector_integer_d + cdef double half_ulp = ldexp(1.0 * 65/64, -54) + + def intvec_to_doublevec(Vector_integer_dense b, long err): +- """ ++ r""" + Given a vector of integers A = [a1, ..., an], and an integer + error bound E, returns a vector of floating-point numbers + B = [b1, ..., bn], lower and upper error bounds F1 and F2, and +@@ -2142,7 +2142,7 @@ def subsample_vec_doctest(a, slen, llen) + return subsample_vec(a, slen, llen) + + def maximum_root_first_lambda(p): +- """ ++ r""" + Given a polynomial with real coefficients, computes an upper bound + on its largest real root, using the first-\lambda algorithm from + "Implementations of a New Theorem for Computing Bounds for Positive +diff -up src/sage/rings/polynomial/skew_polynomial_element.pyx.orig src/sage/rings/polynomial/skew_polynomial_element.pyx +--- src/sage/rings/polynomial/skew_polynomial_element.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/rings/polynomial/skew_polynomial_element.pyx 2020-02-27 11:01:57.406185634 -0700 +@@ -1649,8 +1649,8 @@ cdef class SkewPolynomial(AlgebraElement + var = "" + s += "%s %s"%(x,var) + s = s.replace(" + -", " - ") +- s = re.sub(" 1(.0+)? |"," ", s) +- s = re.sub(" -1(.0+)? |", " -", s) ++ s = re.sub(r" 1(.0+)? |"," ", s) ++ s = re.sub(r" -1(.0+)? |", " -", s) + s = s.replace("|","") + if s == " ": + return "0" +diff -up src/sage/rings/polynomial/symmetric_reduction.pyx.orig src/sage/rings/polynomial/symmetric_reduction.pyx +--- src/sage/rings/polynomial/symmetric_reduction.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/rings/polynomial/symmetric_reduction.pyx 2020-02-27 10:57:19.593079736 -0700 +@@ -1,4 +1,4 @@ +-""" ++r""" + Symmetric Reduction of Infinite Polynomials + + :class:`~sage.rings.polynomial.symmetric_reduction.SymmetricReductionStrategy` +diff -up src/sage/rings/quotient_ring.py.orig src/sage/rings/quotient_ring.py +--- src/sage/rings/quotient_ring.py.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/rings/quotient_ring.py 2020-02-26 12:35:50.055692397 -0700 +@@ -1298,7 +1298,7 @@ class QuotientRing_generic(QuotientRing_ + QuotientRing_nc.__init__(self, R, I, names, category=category) + + def _macaulay2_init_(self, macaulay2=None): +- """ ++ r""" + EXAMPLES: + + Quotients of multivariate polynomial rings over `\QQ`, `\ZZ` and +diff -up src/sage/rings/rational.pyx.orig src/sage/rings/rational.pyx +--- src/sage/rings/rational.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/rings/rational.pyx 2020-02-26 12:26:09.151654850 -0700 +@@ -1719,7 +1719,7 @@ cdef class Rational(sage.structure.eleme + return self.numer().squarefree_part() * self.denom().squarefree_part() + + def is_padic_square(self, p, check=True): +- """ ++ r""" + Determines whether this rational number is a square in `\QQ_p` (or in + `R` when ``p = infinity``). + +diff -up src/sage/rings/real_arb.pyx.orig src/sage/rings/real_arb.pyx +--- src/sage/rings/real_arb.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/rings/real_arb.pyx 2020-02-27 10:39:29.670017427 -0700 +@@ -234,7 +234,7 @@ from sage.structure.unique_representatio + from sage.cpython.string cimport char_to_str, str_to_bytes + + cdef void mpfi_to_arb(arb_t target, const mpfi_t source, const long precision): +- """ ++ r""" + Convert an MPFI interval to an Arb ball. + + INPUT: +@@ -278,7 +278,7 @@ cdef void mpfi_to_arb(arb_t target, cons + mpfr_clear(right) + + cdef int arb_to_mpfi(mpfi_t target, arb_t source, const long precision) except -1: +- """ ++ r""" + Convert an Arb ball to an MPFI interval. + + INPUT: +@@ -771,7 +771,7 @@ class RealBallField(UniqueRepresentation + # Ball functions of non-ball arguments + + def sinpi(self, x): +- """ ++ r""" + Return a ball enclosing `\sin(\pi x)`. + + This works even if ``x`` itself is not a ball, and may be faster or +@@ -817,7 +817,7 @@ class RealBallField(UniqueRepresentation + return res + + def cospi(self, x): +- """ ++ r""" + Return a ball enclosing `\cos(\pi x)`. + + This works even if ``x`` itself is not a ball, and may be faster or +@@ -2912,7 +2912,7 @@ cdef class RealBall(RingElement): + return res + + def sqrt1pm1(self): +- """ ++ r""" + Return `\sqrt{1+\mathrm{self}}-1`, computed accurately when ``self`` is + close to zero. + +@@ -3493,7 +3493,7 @@ cdef class RealBall(RingElement): + return res + + def rising_factorial(self, n): +- """ ++ r""" + Return the ``n``-th rising factorial of this ball. + + The `n`-th rising factorial of `x` is equal to `x (x+1) \cdots (x+n-1)`. +@@ -3595,7 +3595,7 @@ cdef class RealBall(RingElement): + return res + + def polylog(self, s): +- """ ++ r""" + Return the polylogarithm `\operatorname{Li}_s(\mathrm{self})`. + + EXAMPLES:: +diff -up src/sage/rings/real_double.pyx.orig src/sage/rings/real_double.pyx +--- src/sage/rings/real_double.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/rings/real_double.pyx 2020-02-27 10:18:35.746129544 -0700 +@@ -2079,7 +2079,7 @@ cdef class RealDoubleElement(FieldElemen + return a + + def log(self, base=None): +- """ ++ r""" + Return the logarithm. + + INPUT: +@@ -2255,7 +2255,7 @@ cdef class RealDoubleElement(FieldElemen + return a + + def exp2(self): +- """ ++ r""" + Return `2^\mathtt{self}`. + + EXAMPLES:: +diff -up src/sage/rings/real_mpfi.pyx.orig src/sage/rings/real_mpfi.pyx +--- src/sage/rings/real_mpfi.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/rings/real_mpfi.pyx 2020-02-27 10:14:36.381371499 -0700 +@@ -1307,7 +1307,7 @@ cdef class RealIntervalFieldElement(Ring + return self.str(10) + + def _latex_(self): +- """ ++ r""" + Return a latex representation of ``self``. + + EXAMPLES:: +@@ -4406,7 +4406,7 @@ cdef class RealIntervalFieldElement(Ring + return x + + def exp2(self): +- """ ++ r""" + Returns `2^\mathtt{self}` + + EXAMPLES:: +diff -up src/sage/rings/real_mpfr.pyx.orig src/sage/rings/real_mpfr.pyx +--- src/sage/rings/real_mpfr.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/rings/real_mpfr.pyx 2020-02-27 10:16:40.188177426 -0700 +@@ -3896,7 +3896,7 @@ cdef class RealNumber(sage.structure.ele + return mpfr_inf_p(self.value) and mpfr_sgn(self.value) < 0 + + def is_infinity(self): +- """ ++ r""" + Return ``True`` if ``self`` is `\infty` and ``False`` otherwise. + + EXAMPLES:: +diff -up src/sage/rings/semirings/tropical_semiring.pyx.orig src/sage/rings/semirings/tropical_semiring.pyx +--- src/sage/rings/semirings/tropical_semiring.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/rings/semirings/tropical_semiring.pyx 2020-02-27 11:04:01.364022751 -0700 +@@ -99,7 +99,7 @@ cdef class TropicalSemiringElement(Eleme + return repr(self._val) + + def _latex_(self): +- """ ++ r""" + Return a latex representation of ``self``. + + EXAMPLES:: +@@ -135,7 +135,7 @@ cdef class TropicalSemiringElement(Eleme + + # Comparisons + cpdef _richcmp_(left, right, int op): +- """ ++ r""" + Return the standard comparison of ``left`` and ``right``. + + EXAMPLES:: +@@ -259,7 +259,7 @@ cdef class TropicalSemiringElement(Eleme + return x + + def __neg__(self): +- """ ++ r""" + Return the additive inverse, which only exists for `\infty`. + + EXAMPLES:: +@@ -610,7 +610,7 @@ class TropicalSemiring(Parent, UniqueRep + + @cached_method + def zero(self): +- """ ++ r""" + Return the (tropical) additive identity element `+\infty`. + + EXAMPLES:: +diff -up src/sage/rings/tate_algebra_element.pyx.orig src/sage/rings/tate_algebra_element.pyx +--- src/sage/rings/tate_algebra_element.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/rings/tate_algebra_element.pyx 2020-02-27 14:14:01.439381378 -0700 +@@ -1521,7 +1521,7 @@ cdef class TateAlgebraElement(Commutativ + return True + + def __pow__(self, exponent, modulus): +- """ ++ r""" + Return this element raised to the power ``exponent``. + + INPUT: +@@ -2433,7 +2433,7 @@ cdef class TateAlgebraElement(Commutativ + return self._prec - self.valuation() + + def log(self, prec=None): +- """ ++ r""" + Return the logarithm of this series. + + INPUT: +@@ -2590,7 +2590,7 @@ cdef class TateAlgebraElement(Commutativ + return total.add_bigoh(aprec) + + def exp(self, prec=None): +- """ ++ r""" + Return the exponential of this series. + + INPUT: +@@ -3343,7 +3343,7 @@ cdef class TateAlgebraElement(Commutativ + + @coerce_binop + def Spoly(self, other): +- """ ++ r""" + Return the S-polynomial of this series and ``other``. + + INPUT: +diff -up src/sage/structure/coerce_maps.pyx.orig src/sage/structure/coerce_maps.pyx +--- src/sage/structure/coerce_maps.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/structure/coerce_maps.pyx 2020-02-27 11:52:18.843646230 -0700 +@@ -312,7 +312,7 @@ cdef class NamedConvertMap(Map): + + cdef class CallableConvertMap(Map): + def __init__(self, domain, codomain, func, parent_as_first_arg=None): +- """ ++ r""" + This lets one easily create maps from any callable object. + + This is especially useful to create maps from bound methods. +diff -up src/sage/symbolic/expression.pyx.orig src/sage/symbolic/expression.pyx +--- src/sage/symbolic/expression.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/symbolic/expression.pyx 2020-02-27 09:30:14.669819391 -0700 +@@ -610,7 +610,7 @@ cdef class Expression(CommutativeRingEle + return new_Expression_from_GEx(self._parent, self._gobj) + + def _repr_(self): +- """ ++ r""" + Return string representation of this symbolic expression. + + EXAMPLES:: +@@ -3632,7 +3632,7 @@ cdef class Expression(CommutativeRingEle + return 1/self + + cpdef int _cmp_(left, right) except -2: +- """ ++ r""" + Compare self and right, returning -1, 0, or 1, depending on if + self < right, self == right, or self > right, respectively. + +@@ -3868,7 +3868,7 @@ cdef class Expression(CommutativeRingEle + return print_order_compare_mul(left._gobj, right._gobj) + + cpdef _pow_(self, other): +- """ ++ r""" + Return ``self`` raised to the power ``other``. + + OUTPUT: a symbolic expression +@@ -4743,7 +4743,7 @@ cdef class Expression(CommutativeRingEle + expand_rational = rational_expand = expand + + def expand_trig(self, full=False, half_angles=False, plus=True, times=True): +- """ ++ r""" + Expand trigonometric and hyperbolic functions of sums of angles + and of multiple angles occurring in self. For best results, self + should already be expanded. +@@ -7263,7 +7263,7 @@ cdef class Expression(CommutativeRingEle + return new_Expression_from_GEx(self._parent, x) + + def gosper_term(self, n): +- """ ++ r""" + Return Gosper's hypergeometric term for ``self``. + + Suppose ``f``=``self`` is a hypergeometric term such that: +diff -up src/sage/symbolic/function.pyx.orig src/sage/symbolic/function.pyx +--- src/sage/symbolic/function.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/symbolic/function.pyx 2020-02-27 15:06:07.634817327 -0700 +@@ -1565,7 +1565,7 @@ cdef class DeprecatedSFunction(SymbolicF + evalf_params_first, pickled_functions)) + + def __setstate__(self, state): +- """ ++ r""" + EXAMPLES:: + + sage: from sage.symbolic.function import DeprecatedSFunction +diff -up src/sage/symbolic/ring.pyx.orig src/sage/symbolic/ring.pyx +--- src/sage/symbolic/ring.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/symbolic/ring.pyx 2020-02-27 15:08:09.648492686 -0700 +@@ -86,7 +86,7 @@ cdef class SymbolicRing(CommutativeRing) + return "Symbolic Ring" + + def _latex_(self): +- """ ++ r""" + Return latex representation of the symbolic ring. + + EXAMPLES:: +@@ -476,7 +476,7 @@ cdef class SymbolicRing(CommutativeRing) + return new_Expression_from_GEx(self, exp) + + def wild(self, unsigned int n=0): +- """ ++ r""" + Return the n-th wild-card for pattern matching and substitution. + + INPUT: +@@ -728,7 +728,7 @@ cdef class SymbolicRing(CommutativeRing) + return e + + def var(self, name, latex_name=None, n=None, domain=None): +- """ ++ r""" + Return a symbolic variable as an element of the symbolic ring. + + INPUT: +@@ -913,7 +913,7 @@ cdef class SymbolicRing(CommutativeRing) + return ccrepr(x._gobj) + + def _latex_element_(self, Expression x): +- """ ++ r""" + Returns the standard LaTeX version of the expression *x*. + + EXAMPLES:: +diff -up src/sage/symbolic/series.pyx.orig src/sage/symbolic/series.pyx +--- src/sage/symbolic/series.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/symbolic/series.pyx 2020-02-27 15:06:54.249929204 -0700 +@@ -1,4 +1,4 @@ +-""" ++r""" + Symbolic Series + + Symbolic series are special kinds of symbolic expressions that are diff --git a/sagemath-extensions.patch b/sagemath-extensions.patch index 08a18f0..22f1416 100644 --- a/sagemath-extensions.patch +++ b/sagemath-extensions.patch @@ -1,5 +1,6 @@ ---- src/module_list.py.orig 2019-09-29 17:03:11.000000000 -0600 -+++ src/module_list.py 2020-01-06 20:27:37.840293653 -0700 +diff -up src/module_list.py.orig src/module_list.py +--- src/module_list.py.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/module_list.py 2020-02-25 13:38:22.980350735 -0700 @@ -389,16 +389,16 @@ ext_modules = [ Extension('sage.graphs.matchpoly', sources = ['sage/graphs/matchpoly.pyx']), @@ -35,7 +36,7 @@
Extension('sage.graphs.spanning_tree', sources = ['sage/graphs/spanning_tree.pyx']), -@@ -476,9 +475,9 @@ ext_modules = [ +@@ -479,9 +478,9 @@ ext_modules = [ ## ################################
@@ -47,7 +48,7 @@
Extension('*', ['sage/interfaces/*.pyx']),
-@@ -497,21 +496,19 @@ ext_modules = [ +@@ -500,21 +499,19 @@ ext_modules = [ ## ################################
@@ -74,7 +75,7 @@
Extension('sage.libs.flint.flint', sources = ["sage/libs/flint/flint.pyx"], -@@ -540,13 +537,14 @@ ext_modules = [ +@@ -543,13 +540,14 @@ ext_modules = [ sources = ["sage/libs/homfly.pyx"], libraries = ["homfly", "gc"]),
@@ -92,7 +93,7 @@
Extension('sage.libs.lcalc.lcalc_Lfunction', sources = ['sage/libs/lcalc/lcalc_Lfunction.pyx'], -@@ -563,10 +561,9 @@ ext_modules = [ +@@ -566,10 +564,9 @@ ext_modules = [ Extension('sage.libs.lrcalc.lrcalc', sources = ["sage/libs/lrcalc/lrcalc.pyx"]),
@@ -105,7 +106,7 @@
Extension('*', ['sage/libs/pari/*.pyx']),
-@@ -812,7 +809,8 @@ ext_modules = [ +@@ -815,7 +812,8 @@ ext_modules = [ include_dirs = cblas_include_dirs),
Extension('sage.matrix.matrix_integer_sparse', @@ -115,7 +116,7 @@
Extension('sage.matrix.matrix_mod2_dense', sources = ['sage/matrix/matrix_mod2_dense.pyx'], -@@ -831,20 +829,21 @@ ext_modules = [ +@@ -834,20 +832,21 @@ ext_modules = [ Extension('sage.matrix.matrix_modn_dense_float', sources = ['sage/matrix/matrix_modn_dense_float.pyx'], language="c++", @@ -140,7 +141,7 @@
Extension('sage.matrix.matrix_mpolynomial_dense', sources = ['sage/matrix/matrix_mpolynomial_dense.pyx']), -@@ -874,10 +873,9 @@ ext_modules = [ +@@ -877,10 +876,9 @@ ext_modules = [ Extension('sage.matrix.matrix_window', sources = ['sage/matrix/matrix_window.pyx']),
@@ -153,7 +154,7 @@
Extension('sage.matrix.misc', sources = ['sage/matrix/misc.pyx']), -@@ -1053,26 +1051,25 @@ ext_modules = [ +@@ -1056,26 +1054,25 @@ ext_modules = [ Extension("sage.numerical.backends.interactivelp_backend", ["sage/numerical/backends/interactivelp_backend.pyx"]),
diff --git a/sagemath-includes.patch b/sagemath-includes.patch index ae7438e..174668a 100644 --- a/sagemath-includes.patch +++ b/sagemath-includes.patch @@ -1,5 +1,6 @@ ---- src/module_list.py.orig 2020-01-06 20:29:14.108070190 -0700 -+++ src/module_list.py 2020-01-06 20:29:39.724010734 -0700 +diff -up src/module_list.py.orig src/module_list.py +--- src/module_list.py.orig 2020-02-25 13:53:37.097039897 -0700 ++++ src/module_list.py 2020-02-26 14:43:39.912744735 -0700 @@ -44,6 +44,9 @@ zlib_libs = zlib_pc['libraries'] zlib_library_dirs = zlib_pc['library_dirs'] zlib_include_dirs = zlib_pc['include_dirs'] @@ -35,7 +36,7 @@
Extension('*', sources = ['sage/algebras/finite_dimensional_algebras/*.pyx']),
-@@ -559,7 +571,8 @@ ext_modules = [ +@@ -562,7 +574,8 @@ ext_modules = [ [])),
Extension('sage.libs.lrcalc.lrcalc', @@ -45,7 +46,7 @@
Extension("sage.libs.meataxe", sources = ['sage/libs/meataxe.pyx'], -@@ -580,23 +593,28 @@ ext_modules = [ +@@ -583,23 +596,28 @@ ext_modules = [ sources = ['sage/libs/readline.pyx'], libraries = ['readline']),
@@ -79,7 +80,7 @@
################################### ## -@@ -604,7 +622,8 @@ ext_modules = [ +@@ -607,7 +625,8 @@ ext_modules = [ ## ###################################
@@ -89,7 +90,7 @@
################################### ## -@@ -776,7 +795,8 @@ ext_modules = [ +@@ -779,7 +798,8 @@ ext_modules = [
Extension("sage.matrix.matrix_complex_ball_dense", ["sage/matrix/matrix_complex_ball_dense.pyx"], @@ -99,7 +100,7 @@
Extension('sage.matrix.matrix_complex_double_dense', sources = ['sage/matrix/matrix_complex_double_dense.pyx']), -@@ -784,6 +804,7 @@ ext_modules = [ +@@ -787,6 +807,7 @@ ext_modules = [ Extension('sage.matrix.matrix_cyclo_dense', sources = ['sage/matrix/matrix_cyclo_dense.pyx'], language = "c++", @@ -107,7 +108,7 @@ libraries=['ntl']),
Extension('sage.matrix.matrix_gap', -@@ -846,6 +867,7 @@ ext_modules = [ +@@ -849,6 +870,7 @@ ext_modules = [ libraries = ['gomp']),
Extension('sage.matrix.matrix_mpolynomial_dense', @@ -115,7 +116,7 @@ sources = ['sage/matrix/matrix_mpolynomial_dense.pyx']),
Extension('sage.matrix.matrix_polynomial_dense', -@@ -1132,7 +1154,8 @@ ext_modules = [ +@@ -1135,7 +1157,8 @@ ext_modules = [ language = 'c++'),
Extension("sage.rings.complex_arb", @@ -125,7 +126,7 @@
Extension('sage.rings.complex_double', sources = ['sage/rings/complex_double.pyx'], -@@ -1208,7 +1231,8 @@ ext_modules = [ +@@ -1211,7 +1234,8 @@ ext_modules = [ sources = ['sage/rings/real_interval_absolute.pyx']),
Extension("sage.rings.real_arb", @@ -135,7 +136,7 @@
Extension('sage.rings.real_lazy', sources = ['sage/rings/real_lazy.pyx']), -@@ -1291,6 +1315,7 @@ ext_modules = [ +@@ -1294,6 +1318,7 @@ ext_modules = [
Extension('sage.rings.number_field.number_field_element_quadratic', sources = ['sage/rings/number_field/number_field_element_quadratic.pyx'], @@ -143,7 +144,7 @@ libraries=['ntl'], language = 'c++'),
-@@ -1430,12 +1455,15 @@ ext_modules = [ +@@ -1433,12 +1458,15 @@ ext_modules = [ sources = ['sage/rings/polynomial/multi_polynomial.pyx']),
Extension('sage.rings.polynomial.multi_polynomial_ideal_libsingular', @@ -159,7 +160,7 @@ sources = ['sage/rings/polynomial/multi_polynomial_libsingular.pyx']),
Extension('sage.rings.polynomial.multi_polynomial_ring_base', -@@ -1448,7 +1476,8 @@ ext_modules = [ +@@ -1451,7 +1479,8 @@ ext_modules = [ sources = ['sage/rings/polynomial/polydict.pyx']),
Extension('sage.rings.polynomial.polynomial_complex_arb', @@ -169,8 +170,9 @@
Extension('sage.rings.polynomial.polynomial_compiled', sources = ['sage/rings/polynomial/polynomial_compiled.pyx']), ---- src/setup.py.orig 2020-01-06 20:29:10.564078418 -0700 -+++ src/setup.py 2020-01-06 20:29:39.725010732 -0700 +diff -up src/setup.py.orig src/setup.py +--- src/setup.py.orig 2020-02-26 15:43:14.065012133 -0700 ++++ src/setup.py 2020-02-26 15:52:14.558846775 -0700 @@ -85,6 +85,7 @@ keep_going = False
# search for dependencies and add to gcc -I<path> diff --git a/sagemath-primecount.patch b/sagemath-primecount.patch deleted file mode 100644 index 29434b8..0000000 --- a/sagemath-primecount.patch +++ /dev/null @@ -1,110 +0,0 @@ -diff -up src/sage/interfaces/primecount.pyx.orig src/sage/interfaces/primecount.pyx ---- src/sage/interfaces/primecount.pyx.orig 2019-06-26 14:41:04.000000000 -0600 -+++ src/sage/interfaces/primecount.pyx 2019-09-17 16:13:46.316032782 -0600 -@@ -22,7 +22,7 @@ cdef inline int _do_sig(int64_t n): - "threshold for sig_on/sig_off" - return n >> 26 - --cpdef int64_t prime_pi(int64_t n, method=None) except -1: -+cpdef int64_t prime_pi(int64_t n) except -1: - r""" - Return the number of prime numbers smaller or equal than ``n``. - -@@ -30,76 +30,22 @@ cpdef int64_t prime_pi(int64_t n, method - - - ``n`` - an integer - -- - ``method`` - ``None`` or a string that determines the primecount -- function to be called -- -- - ``"deleglise_rivat"`` -- - ``"legendre"`` -- - ``"lehmer"`` -- - ``"lmo"`` -- - ``"meissel"`` -- - ``"primesieve"`` -- - EXAMPLES:: - - sage: from sage.interfaces.primecount import prime_pi # optional - primecount - - sage: prime_pi(1000) == 168 # optional - primecount - True -- sage: prime_pi(1000, "deleglise_rivat") == 168 # optional - primecount -- True -- sage: prime_pi(1000, "legendre") == 168 # optional - primecount -- True -- sage: prime_pi(1000, "lehmer") == 168 # optional - primecount -- True -- sage: prime_pi(1000, "lmo") == 168 # optional - primecount -- True -- sage: prime_pi(1000, "meissel") == 168 # optional - primecount -- True -- sage: prime_pi(1000, "primesieve") == 168 # optional - primecount -- True -- sage: prime_pi(1000, "youpi") # optional - primecount -- Traceback (most recent call last): -- ... -- ValueError: unknown method 'youpi' - """ - cdef int64_t ans -- if method is None: -- if _do_sig(n): sig_on() -- ans = primecount.pi(n) -- if _do_sig(n): sig_off() -- elif method == "deleglise_rivat": -- if _do_sig(n): sig_on() -- ans = primecount.pi_deleglise_rivat(n) -- if _do_sig(n): sig_off() -- elif method == "legendre": -- if _do_sig(n): sig_on() -- ans = primecount.pi_legendre(n) -- if _do_sig(n): sig_off() -- elif method == "lehmer": -- if _do_sig(n): sig_on() -- ans = primecount.pi_lehmer(n) -- if _do_sig(n): sig_off() -- elif method == "lmo": -- if _do_sig(n): sig_on() -- ans = primecount.pi_lmo(n) -- if _do_sig(n): sig_off() -- elif method == "meissel": -- if _do_sig(n): sig_on() -- ans = primecount.pi_meissel(n) -- if _do_sig(n): sig_off() -- elif method == "primesieve": -- if _do_sig(n): sig_on() -- ans = primecount.pi_primesieve(n) -- if _do_sig(n): sig_off() -- else: -- raise ValueError("unknown method {!r}".format(method)) -- -+ if _do_sig(n): sig_on() -+ ans = primecount.pi(n) -+ if _do_sig(n): sig_off() - return ans - - cpdef prime_pi_128(n): - r""" -- Return the number of prime number smaller than ``n``. -+ Return the number of prime numbers smaller than ``n``. - - EXAMPLES:: - -diff -up src/sage/libs/primecount.pxd.orig src/sage/libs/primecount.pxd ---- src/sage/libs/primecount.pxd.orig 2019-06-26 14:41:05.000000000 -0600 -+++ src/sage/libs/primecount.pxd 2019-09-17 16:11:06.678851358 -0600 -@@ -9,13 +9,6 @@ cdef extern from "primecount.hpp" namesp - - cppstring pi(const cppstring& x) - -- int64_t pi_deleglise_rivat(int64_t x) -- int64_t pi_legendre(int64_t x) -- int64_t pi_lehmer(int64_t x) -- int64_t pi_lmo(int64_t x) -- int64_t pi_meissel(int64_t x) -- int64_t pi_primesieve(int64_t x) -- - int64_t nth_prime(int64_t n) - - int64_t phi(int64_t x, int64_t a) diff --git a/sagemath-python3.patch b/sagemath-python3.patch index b01dda9..36a73fd 100644 --- a/sagemath-python3.patch +++ b/sagemath-python3.patch @@ -1,51 +1,6 @@ -diff -up build/pkgs/sagenb/src/sagenb/misc/support.py.orig build/pkgs/sagenb/src/sagenb/misc/support.py ---- build/pkgs/sagenb/src/sagenb/misc/support.py.orig 2019-02-01 06:34:20.000000000 -0700 -+++ build/pkgs/sagenb/src/sagenb/misc/support.py 2020-01-07 19:57:46.756664911 -0700 -@@ -178,7 +178,7 @@ def completions(s, globs, format=False, - try: - if not '.' in s and not '(' in s: - v = [x for x in globs.keys() if x[:n] == s] + \ -- [x for x in __builtins__.keys() if x[:n] == s] -+ [x for x in builtins.keys() if x[:n] == s] - else: - if not ')' in s: - i = s.rfind('.') -diff -up build/pkgs/sagenb/src/sagenb/notebook/docHTMLProcessor.py.orig build/pkgs/sagenb/src/sagenb/notebook/docHTMLProcessor.py ---- build/pkgs/sagenb/src/sagenb/notebook/docHTMLProcessor.py.orig 2019-02-01 05:37:36.000000000 -0700 -+++ build/pkgs/sagenb/src/sagenb/notebook/docHTMLProcessor.py 2020-01-07 19:57:46.757664910 -0700 -@@ -25,7 +25,7 @@ This module contains three classes: - - .. NOTE:: - -- This extension of htmllib.HTMLParser was partly inspired by Mark -+ This extension of html.parser.HTMLParser was partly inspired by Mark - Pilgrim's 'Dive Into Python' examples. - - AUTHORS: -@@ -155,7 +155,7 @@ class genericHTMLProcessor(HTMLParser): - u'<h1 class="title">Title</h1>\n\n<p>nSome text</p>\n\n\n\n' - - """ -- # self.feed() is a HTMLParser method and starts everything -+ # self.feed() is an HTMLParser method and starts everything - # off; Most of the functions here are extensions to - # HTMLParser, and may never actually be visibly called here. - -diff -up build/pkgs/sagenb/src/sagenb/notebook/wiki2html.py.orig build/pkgs/sagenb/src/sagenb/notebook/wiki2html.py ---- build/pkgs/sagenb/src/sagenb/notebook/wiki2html.py.orig 2019-02-01 05:37:36.000000000 -0700 -+++ build/pkgs/sagenb/src/sagenb/notebook/wiki2html.py 2020-01-07 19:57:46.758664910 -0700 -@@ -59,7 +59,7 @@ class Parser: - 'parent': r'(?:%s)?' % re.escape(PARENT_PREFIX), - } - url_rule = r'%(url_guard)s(%(url)s):([^\s<%(punct)s]|([%(punct)s][^\s<%(punct)s]))+' % { -- 'url_guard': ur'(^|(?<!\w))', -+ 'url_guard': r'(^|(?<!\w))', - 'url': url_pattern, - 'punct': punct_pattern, - } diff -up build/pkgs/sagetex/src/extractsagecode.py.orig build/pkgs/sagetex/src/extractsagecode.py ---- build/pkgs/sagetex/src/extractsagecode.py.orig 2019-06-11 04:58:29.000000000 -0600 -+++ build/pkgs/sagetex/src/extractsagecode.py 2020-01-07 19:57:46.759664909 -0700 +--- build/pkgs/sagetex/src/extractsagecode.py.orig 2019-11-14 04:02:40.000000000 -0700 ++++ build/pkgs/sagetex/src/extractsagecode.py 2020-02-25 13:42:46.674646884 -0700 @@ -45,7 +45,7 @@ See the SageTeX documentation for more d
try: @@ -56,8 +11,8 @@ diff -up build/pkgs/sagetex/src/extractsagecode.py.orig build/pkgs/sagetex/src/e usage() sys.exit(2) diff -up build/pkgs/sagetex/src/makestatic.py.orig build/pkgs/sagetex/src/makestatic.py ---- build/pkgs/sagetex/src/makestatic.py.orig 2019-06-11 04:58:29.000000000 -0600 -+++ build/pkgs/sagetex/src/makestatic.py 2020-01-07 19:57:46.759664909 -0700 +--- build/pkgs/sagetex/src/makestatic.py.orig 2019-11-14 04:02:40.000000000 -0700 ++++ build/pkgs/sagetex/src/makestatic.py 2020-02-25 13:42:46.674646884 -0700 @@ -45,7 +45,7 @@ See the SageTeX documentation for more d
try: @@ -68,8 +23,8 @@ diff -up build/pkgs/sagetex/src/makestatic.py.orig build/pkgs/sagetex/src/makest usage() sys.exit(2) diff -up build/pkgs/sagetex/src/remote-sagetex.py.orig build/pkgs/sagetex/src/remote-sagetex.py ---- build/pkgs/sagetex/src/remote-sagetex.py.orig 2019-06-11 04:58:29.000000000 -0600 -+++ build/pkgs/sagetex/src/remote-sagetex.py 2020-01-07 19:57:46.760664908 -0700 +--- build/pkgs/sagetex/src/remote-sagetex.py.orig 2019-11-14 04:02:40.000000000 -0700 ++++ build/pkgs/sagetex/src/remote-sagetex.py 2020-02-25 13:42:46.674646884 -0700 @@ -24,12 +24,11 @@ ## You should have received a copy of the GNU General Public License along ## with this program. If not, see http://www.gnu.org/licenses/. @@ -133,8 +88,8 @@ diff -up build/pkgs/sagetex/src/remote-sagetex.py.orig build/pkgs/sagetex/src/re if not password: from getpass import getpass diff -up build/pkgs/sagetex/src/sagetexparse.py.orig build/pkgs/sagetex/src/sagetexparse.py ---- build/pkgs/sagetex/src/sagetexparse.py.orig 2019-06-11 04:58:29.000000000 -0600 -+++ build/pkgs/sagetex/src/sagetexparse.py 2020-01-07 19:57:46.760664908 -0700 +--- build/pkgs/sagetex/src/sagetexparse.py.orig 2019-11-14 04:02:40.000000000 -0700 ++++ build/pkgs/sagetex/src/sagetexparse.py 2020-02-25 13:42:46.674646884 -0700 @@ -132,7 +132,7 @@ class SageCodeExtractor():
def plotout(self, s, l, t): @@ -145,8 +100,8 @@ diff -up build/pkgs/sagetex/src/sagetexparse.py.orig build/pkgs/sagetex/src/sage self.result += t.code[1:-1] + '\n\n'
diff -up src/sage/combinat/finite_state_machine.py.orig src/sage/combinat/finite_state_machine.py ---- src/sage/combinat/finite_state_machine.py.orig 2019-09-29 17:03:11.000000000 -0600 -+++ src/sage/combinat/finite_state_machine.py 2020-01-07 19:57:46.766664904 -0700 +--- src/sage/combinat/finite_state_machine.py.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/combinat/finite_state_machine.py 2020-02-25 13:42:46.676646848 -0700 @@ -936,7 +936,7 @@ from six.moves import range, zip_longest from six import itervalues
@@ -156,7 +111,7 @@ diff -up src/sage/combinat/finite_state_machine.py.orig src/sage/combinat/finite import itertools from copy import copy, deepcopy
-@@ -14166,7 +14166,7 @@ def is_FSMProcessIterator(PI): +@@ -14161,7 +14161,7 @@ def is_FSMProcessIterator(PI):
class FSMProcessIterator(SageObject, @@ -165,21 +120,9 @@ diff -up src/sage/combinat/finite_state_machine.py.orig src/sage/combinat/finite """ This class takes an input, feeds it into a finite state machine (automaton or transducer, in particular), tests whether this was -diff -up src/sage/combinat/multiset_partition_into_sets_ordered.py.orig src/sage/combinat/multiset_partition_into_sets_ordered.py ---- src/sage/combinat/multiset_partition_into_sets_ordered.py.orig 2019-09-29 17:03:11.000000000 -0600 -+++ src/sage/combinat/multiset_partition_into_sets_ordered.py 2020-01-07 19:57:46.768664902 -0700 -@@ -1952,7 +1952,7 @@ class OrderedMultisetPartitionsIntoSets( - - # slice by 'order' - if "alphabet" in fc: -- no_alpha = {k: v for (k, v) in iteritems(self.constraints) if k is not "alphabet"} -+ no_alpha = {k: v for (k, v) in iteritems(self.constraints) if k != "alphabet"} - return OrderedMultisetPartitionsIntoSets(fc["alphabet"], size, **no_alpha) - - # slice by 'size' diff -up src/sage/combinat/root_system/branching_rules.py.orig src/sage/combinat/root_system/branching_rules.py ---- src/sage/combinat/root_system/branching_rules.py.orig 2019-09-29 17:03:11.000000000 -0600 -+++ src/sage/combinat/root_system/branching_rules.py 2020-01-07 19:57:46.769664902 -0700 +--- src/sage/combinat/root_system/branching_rules.py.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/combinat/root_system/branching_rules.py 2020-02-25 13:42:46.678646812 -0700 @@ -1750,7 +1750,7 @@ def branching_rule(Rtype, Stype, rule="d elif rule == "tensor" or rule == "tensor-debug": if not Stype.is_compound(): @@ -190,9 +133,9 @@ diff -up src/sage/combinat/root_system/branching_rules.py.orig src/sage/combinat if Rtype[0] == 'A': nr = Rtype[1]+1 diff -up src/sage/geometry/triangulation/point_configuration.py.orig src/sage/geometry/triangulation/point_configuration.py ---- src/sage/geometry/triangulation/point_configuration.py.orig 2019-09-29 17:03:11.000000000 -0600 -+++ src/sage/geometry/triangulation/point_configuration.py 2020-01-07 19:57:46.770664901 -0700 -@@ -619,7 +619,7 @@ class PointConfiguration(UniqueRepresent +--- src/sage/geometry/triangulation/point_configuration.py.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/geometry/triangulation/point_configuration.py 2020-02-26 14:41:58.109624057 -0700 +@@ -619,11 +619,11 @@ class PointConfiguration(UniqueRepresent ['{{0,1,2,4},{1,2,3,4}}'] """ timeout = 600 @@ -201,9 +144,14 @@ diff -up src/sage/geometry/triangulation/point_configuration.py.orig src/sage/ge proc.expect(r'Evaluating Commandline Options ...') proc.expect(r'... done.') proc.setecho(0) +- assert proc.readline().strip() == b'' ++ assert proc.readline().strip() == '' + + if verbose: + print("#### TOPCOM input ####") diff -up src/sage/graphs/graph_latex.py.orig src/sage/graphs/graph_latex.py ---- src/sage/graphs/graph_latex.py.orig 2019-09-29 17:03:11.000000000 -0600 -+++ src/sage/graphs/graph_latex.py 2020-01-07 19:59:40.240580166 -0700 +--- src/sage/graphs/graph_latex.py.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/graphs/graph_latex.py 2020-02-25 13:42:46.679646794 -0700 @@ -1156,7 +1156,7 @@ class GraphLatex(SageObject): # elif name in color_dicts: @@ -263,20 +211,20 @@ diff -up src/sage/graphs/graph_latex.py.orig src/sage/graphs/graph_latex.py for key, p in value.items(): if not((isinstance(p, tuple)) and (len(p) == 2) and (p[0] >= 0) and (p[1] in compass_points)): diff -up src/sage/interfaces/frobby.py.orig src/sage/interfaces/frobby.py ---- src/sage/interfaces/frobby.py.orig 2019-09-29 17:03:11.000000000 -0600 -+++ src/sage/interfaces/frobby.py 2020-01-07 19:57:46.771664900 -0700 -@@ -77,7 +77,7 @@ class Frobby: +--- src/sage/interfaces/frobby.py.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/interfaces/frobby.py 2020-02-26 14:41:07.262562710 -0700 +@@ -79,7 +79,7 @@ class Frobby: print("Frobby command: ", repr(command)) print("Frobby input:\n", input)
- process = Popen(command, stdin = PIPE, stdout = PIPE, stderr = PIPE) -+ process = Popen(command, stdin = PIPE, stdout = PIPE, stderr = PIPE, enconding='utf-8') - output, err = process.communicate(input = input) - - if verbose: ++ process = Popen(command, stdin = PIPE, stdout = PIPE, stderr = PIPE, encoding='utf-8') + if input: + frinput = str_to_bytes(input) + else: diff -up src/sage/interfaces/gfan.py.orig src/sage/interfaces/gfan.py ---- src/sage/interfaces/gfan.py.orig 2019-09-29 17:03:11.000000000 -0600 -+++ src/sage/interfaces/gfan.py 2020-01-07 19:57:46.772664899 -0700 +--- src/sage/interfaces/gfan.py.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/interfaces/gfan.py 2020-02-25 13:42:46.679646794 -0700 @@ -66,7 +66,7 @@ class Gfan(object): if six.PY2: enc_kwargs = {} @@ -287,8 +235,8 @@ diff -up src/sage/interfaces/gfan.py.orig src/sage/interfaces/gfan.py gfan_processes = Popen(cmd, stdin=PIPE, stdout=PIPE, stderr=PIPE, **enc_kwargs) diff -up src/sage/interfaces/gp.py.orig src/sage/interfaces/gp.py ---- src/sage/interfaces/gp.py.orig 2019-09-29 17:03:11.000000000 -0600 -+++ src/sage/interfaces/gp.py 2020-01-07 19:57:46.773664899 -0700 +--- src/sage/interfaces/gp.py.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/interfaces/gp.py 2020-02-25 13:42:46.680646776 -0700 @@ -934,17 +934,6 @@ class GpElement(ExpectElement): """ return repr(self.type()) == 't_STR' @@ -308,8 +256,8 @@ diff -up src/sage/interfaces/gp.py.orig src/sage/interfaces/gp.py """ Return Python float. diff -up src/sage/interfaces/latte.py.orig src/sage/interfaces/latte.py ---- src/sage/interfaces/latte.py.orig 2019-09-29 17:03:11.000000000 -0600 -+++ src/sage/interfaces/latte.py 2020-01-07 19:57:46.773664899 -0700 +--- src/sage/interfaces/latte.py.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/interfaces/latte.py 2020-02-25 13:42:46.680646776 -0700 @@ -152,6 +152,7 @@ def count(arg, ehrhart_polynomial=False, latte_proc = Popen(args, stdin=PIPE, stdout=PIPE, @@ -327,8 +275,8 @@ diff -up src/sage/interfaces/latte.py.orig src/sage/interfaces/latte.py
ans, err = latte_proc.communicate(arg) diff -up src/sage/interfaces/sagespawn.pyx.orig src/sage/interfaces/sagespawn.pyx ---- src/sage/interfaces/sagespawn.pyx.orig 2019-09-29 17:03:11.000000000 -0600 -+++ src/sage/interfaces/sagespawn.pyx 2020-01-07 19:57:46.774664898 -0700 +--- src/sage/interfaces/sagespawn.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/interfaces/sagespawn.pyx 2020-02-25 13:42:46.680646776 -0700 @@ -1,6 +1,6 @@ """ Sage wrapper around pexpect's ``spawn`` class and @@ -377,8 +325,8 @@ diff -up src/sage/interfaces/sagespawn.pyx.orig src/sage/interfaces/sagespawn.py pass self.fileobj.close() diff -up src/sage/libs/coxeter3/coxeter.pyx.orig src/sage/libs/coxeter3/coxeter.pyx ---- src/sage/libs/coxeter3/coxeter.pyx.orig 2019-09-29 17:03:11.000000000 -0600 -+++ src/sage/libs/coxeter3/coxeter.pyx 2020-01-07 19:57:46.776664896 -0700 +--- src/sage/libs/coxeter3/coxeter.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/libs/coxeter3/coxeter.pyx 2020-02-25 13:42:46.680646776 -0700 @@ -33,7 +33,7 @@ cdef class String: EXAMPLES::
@@ -512,9 +460,9 @@ diff -up src/sage/libs/coxeter3/coxeter.pyx.orig src/sage/libs/coxeter3/coxeter. if rank == 0: raise NotImplementedError("Coxeter group of type ['A',0] using Coxeter 3 not yet implemented") diff -up src/sage/misc/parser.pyx.orig src/sage/misc/parser.pyx ---- src/sage/misc/parser.pyx.orig 2019-09-29 17:03:11.000000000 -0600 -+++ src/sage/misc/parser.pyx 2020-01-07 19:57:46.777664896 -0700 -@@ -96,7 +96,7 @@ def token_to_str(int token): +--- src/sage/misc/parser.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/misc/parser.pyx 2020-02-25 13:42:46.681646759 -0700 +@@ -95,7 +95,7 @@ def token_to_str(int token):
cdef inline bint is_alphanumeric(char c): @@ -813,8 +761,8 @@ diff -up src/sage/misc/parser.pyx.orig src/sage/misc/parser.pyx return self.p_list(tokens) else: diff -up src/sage/plot/plot3d/plot3d.py.orig src/sage/plot/plot3d/plot3d.py ---- src/sage/plot/plot3d/plot3d.py.orig 2019-09-29 17:03:11.000000000 -0600 -+++ src/sage/plot/plot3d/plot3d.py 2020-01-07 19:57:46.778664895 -0700 +--- src/sage/plot/plot3d/plot3d.py.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/plot/plot3d/plot3d.py 2020-02-25 13:42:46.681646759 -0700 @@ -188,7 +188,8 @@ class _Coordinates(object): sage: arb((x+z,y*z,z), z, (x,y)) Arbitrary Coordinates coordinate transform (z in terms of x, y) @@ -826,8 +774,8 @@ diff -up src/sage/plot/plot3d/plot3d.py.orig src/sage/plot/plot3d/plot3d.py raise ValueError('variables were specified incorrectly for this coordinate system; incorrect variables were %s'%list(set(all_vars).symmetric_difference(set(indep_vars+[dep_var])))) self.dep_var = dep_var diff -up src/sage/plot/point.py.orig src/sage/plot/point.py ---- src/sage/plot/point.py.orig 2019-09-29 17:03:11.000000000 -0600 -+++ src/sage/plot/point.py 2020-01-07 19:57:46.779664894 -0700 +--- src/sage/plot/point.py.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/plot/point.py 2020-02-25 13:42:46.681646759 -0700 @@ -29,7 +29,7 @@ TESTS:: from sage.misc.decorators import options, rename_keyword from sage.plot.colors import to_mpl_color @@ -847,8 +795,8 @@ diff -up src/sage/plot/point.py.orig src/sage/plot/point.py
try: diff -up src/sage/repl/display/fancy_repr.py.orig src/sage/repl/display/fancy_repr.py ---- src/sage/repl/display/fancy_repr.py.orig 2019-09-29 17:03:11.000000000 -0600 -+++ src/sage/repl/display/fancy_repr.py 2020-01-07 19:57:46.780664894 -0700 +--- src/sage/repl/display/fancy_repr.py.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/repl/display/fancy_repr.py 2020-02-25 13:42:46.682646741 -0700 @@ -15,7 +15,7 @@ Representations of objects. import types
@@ -868,8 +816,8 @@ diff -up src/sage/repl/display/fancy_repr.py.orig src/sage/repl/display/fancy_re else: # A user-provided repr. Find newlines and replace them with p.break_() diff -up src/sage/repl/ipython_kernel/interact.py.orig src/sage/repl/ipython_kernel/interact.py ---- src/sage/repl/ipython_kernel/interact.py.orig 2019-09-29 17:03:11.000000000 -0600 -+++ src/sage/repl/ipython_kernel/interact.py 2020-01-07 19:57:46.781664893 -0700 +--- src/sage/repl/ipython_kernel/interact.py.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/repl/ipython_kernel/interact.py 2020-02-25 13:42:46.682646741 -0700 @@ -35,7 +35,8 @@ EXAMPLES::
from ipywidgets.widgets import SelectionSlider, ValueWidget, ToggleButtons @@ -881,9 +829,9 @@ diff -up src/sage/repl/ipython_kernel/interact.py.orig src/sage/repl/ipython_ker from .widgets_sagenb import input_grid from sage.structure.element import parent diff -up src/sage/rings/integer.pyx.orig src/sage/rings/integer.pyx ---- src/sage/rings/integer.pyx.orig 2019-09-29 17:03:11.000000000 -0600 -+++ src/sage/rings/integer.pyx 2020-01-07 19:57:46.785664890 -0700 -@@ -7124,7 +7124,7 @@ cdef int mpz_set_str_python(mpz_ptr z, c +--- src/sage/rings/integer.pyx.orig 2020-02-27 10:29:19.004788998 -0700 ++++ src/sage/rings/integer.pyx 2020-02-27 15:48:31.176289587 -0700 +@@ -7123,7 +7123,7 @@ cdef int mpz_set_str_python(mpz_ptr z, c while x[0] == c' ': x += 1 # Strip spaces
# Disallow a sign here @@ -892,22 +840,10 @@ diff -up src/sage/rings/integer.pyx.orig src/sage/rings/integer.pyx x = "" # Force an error below
assert base >= 2 -diff -up src/sage/rings/multi_power_series_ring_element.py.orig src/sage/rings/multi_power_series_ring_element.py ---- src/sage/rings/multi_power_series_ring_element.py.orig 2019-09-29 17:03:11.000000000 -0600 -+++ src/sage/rings/multi_power_series_ring_element.py 2020-01-07 19:57:46.786664889 -0700 -@@ -1396,7 +1396,7 @@ class MPowerSeries(PowerSeries): - # at this stage, self is probably a non-zero - # element of the base ring - for a in range(len(self._bg_value.list())): -- if self._bg_value.list()[a] is not 0: -+ if self._bg_value.list()[a] != 0: - return a - - def is_nilpotent(self): diff -up src/sage/rings/polynomial/pbori.pyx.orig src/sage/rings/polynomial/pbori.pyx ---- src/sage/rings/polynomial/pbori.pyx.orig 2019-09-29 17:03:11.000000000 -0600 -+++ src/sage/rings/polynomial/pbori.pyx 2020-01-07 19:57:46.788664888 -0700 -@@ -4765,8 +4765,7 @@ cdef class PolynomialConstruct: +--- src/sage/rings/polynomial/pbori.pyx.orig 2020-02-27 10:58:59.991311061 -0700 ++++ src/sage/rings/polynomial/pbori.pyx 2020-02-27 15:48:31.177289568 -0700 +@@ -4764,8 +4764,7 @@ cdef class PolynomialConstruct: # So, it is just a conversion. [Simon King] return (<BooleanPolynomialRing>ring)._element_constructor_(x)
@@ -918,9 +854,9 @@ diff -up src/sage/rings/polynomial/pbori.pyx.orig src/sage/rings/polynomial/pbor
cdef class MonomialConstruct: diff -up src/sage/rings/real_mpfi.pyx.orig src/sage/rings/real_mpfi.pyx ---- src/sage/rings/real_mpfi.pyx.orig 2019-09-29 17:03:11.000000000 -0600 -+++ src/sage/rings/real_mpfi.pyx 2020-01-07 19:57:46.790664886 -0700 -@@ -1943,12 +1943,12 @@ cdef class RealIntervalFieldElement(Ring +--- src/sage/rings/real_mpfi.pyx.orig 2020-02-27 10:14:36.381371499 -0700 ++++ src/sage/rings/real_mpfi.pyx 2020-02-27 15:48:31.178289550 -0700 +@@ -1941,12 +1941,12 @@ cdef class RealIntervalFieldElement(Ring
cdef long digits digits = strlen(lower_s) @@ -935,7 +871,7 @@ diff -up src/sage/rings/real_mpfi.pyx.orig src/sage/rings/real_mpfi.pyx digits -= 1 upper_expo -= digits
-@@ -2117,7 +2117,7 @@ cdef class RealIntervalFieldElement(Ring +@@ -2115,7 +2115,7 @@ cdef class RealIntervalFieldElement(Ring raise MemoryError("Unable to allocate memory for the mantissa of an interval") mpz_get_str(tmp_cstr, base, lower_mpz) digits = strlen(tmp_cstr) @@ -945,9 +881,9 @@ diff -up src/sage/rings/real_mpfi.pyx.orig src/sage/rings/real_mpfi.pyx mant_string = bytes_to_str(tmp_cstr+1) sign_string = bytes_to_str(b'-') diff -up src/sage/rings/real_mpfr.pyx.orig src/sage/rings/real_mpfr.pyx ---- src/sage/rings/real_mpfr.pyx.orig 2019-09-29 17:03:11.000000000 -0600 -+++ src/sage/rings/real_mpfr.pyx 2020-01-07 19:57:46.791664885 -0700 -@@ -2039,7 +2039,7 @@ cdef class RealNumber(sage.structure.ele +--- src/sage/rings/real_mpfr.pyx.orig 2020-02-27 10:16:40.188177426 -0700 ++++ src/sage/rings/real_mpfr.pyx 2020-02-27 15:48:31.179289531 -0700 +@@ -2037,7 +2037,7 @@ cdef class RealNumber(sage.structure.ele if s is NULL: raise RuntimeError("unable to convert an mpfr number to a string") # t contains just digits (no sign, decimal point or exponent) @@ -957,9 +893,9 @@ diff -up src/sage/rings/real_mpfr.pyx.orig src/sage/rings/real_mpfr.pyx t = char_to_str(s + 1) else: diff -up src/sage/structure/sage_object.pyx.orig src/sage/structure/sage_object.pyx ---- src/sage/structure/sage_object.pyx.orig 2019-09-29 17:03:11.000000000 -0600 -+++ src/sage/structure/sage_object.pyx 2020-01-07 19:57:46.791664885 -0700 -@@ -665,7 +665,7 @@ cdef class SageObject: +--- src/sage/structure/sage_object.pyx.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/structure/sage_object.pyx 2020-02-25 13:42:56.898464506 -0700 +@@ -671,7 +671,7 @@ cdef class SageObject: try: s = self._interface_init_(I) except Exception: @@ -969,9 +905,9 @@ diff -up src/sage/structure/sage_object.pyx.orig src/sage/structure/sage_object. if c: try: diff -up src/sage/symbolic/expression.pyx.orig src/sage/symbolic/expression.pyx ---- src/sage/symbolic/expression.pyx.orig 2019-09-29 17:03:11.000000000 -0600 -+++ src/sage/symbolic/expression.pyx 2020-01-07 19:57:46.794664883 -0700 -@@ -12916,7 +12916,7 @@ cdef class hold_class: +--- src/sage/symbolic/expression.pyx.orig 2020-02-27 09:30:14.669819391 -0700 ++++ src/sage/symbolic/expression.pyx 2020-02-27 15:48:31.182289476 -0700 +@@ -12945,7 +12945,7 @@ cdef class hold_class: sage: SR(2)^5 32 """ @@ -980,7 +916,7 @@ diff -up src/sage/symbolic/expression.pyx.orig src/sage/symbolic/expression.pyx
def __exit__(self, *args): """ -@@ -12929,7 +12929,7 @@ cdef class hold_class: +@@ -12958,7 +12958,7 @@ cdef class hold_class: sage: SR(2)^5 32 """ @@ -989,15 +925,3 @@ diff -up src/sage/symbolic/expression.pyx.orig src/sage/symbolic/expression.pyx
def start(self): """ -diff -up src/setup.py.orig src/setup.py ---- src/setup.py.orig 2019-09-29 17:03:11.000000000 -0600 -+++ src/setup.py 2020-01-07 19:57:46.794664883 -0700 -@@ -232,7 +232,7 @@ class sage_build_cython(Command): - cdivision=True, - embedsignature=True, - fast_getattr=True, -- language_level="2", -+ language_level=3, - preliminary_late_includes_cy28=True, - profile=self.profile, - ) diff --git a/sagemath-sagenb-python3.patch b/sagemath-sagenb-python3.patch deleted file mode 100644 index 8ba9206..0000000 --- a/sagemath-sagenb-python3.patch +++ /dev/null @@ -1,351 +0,0 @@ -diff -up build/pkgs/sagenb/src/sagenb/flask_version/base.py.orig build/pkgs/sagenb/src/sagenb/flask_version/base.py ---- build/pkgs/sagenb/src/sagenb/flask_version/base.py.orig 2019-09-05 13:19:45.878376777 -0300 -+++ build/pkgs/sagenb/src/sagenb/flask_version/base.py 2019-09-05 13:27:08.353250002 -0300 -@@ -140,7 +140,7 @@ def localization_js(): - locale=repr(get_locale()) - if _localization_cache.get(locale,None) is None: - data = render_template(os.path.join('js/localization.js'), N_=N_, nN_=nN_) -- _localization_cache[locale] = (data, sha1(repr(data)).hexdigest()) -+ _localization_cache[locale] = (data, sha1(repr(data).encode('ascii')).hexdigest()) - data,datahash = _localization_cache[locale] - - if request.environ.get('HTTP_IF_NONE_MATCH', None) == datahash: -@@ -158,7 +158,7 @@ def mathjax_js(): - if _mathjax_js_cache is None: - from sagenb.misc.misc import mathjax_macros - data = render_template('js/mathjax_sage.js', theme_mathjax_macros=mathjax_macros) -- _mathjax_js_cache = (data, sha1(repr(data)).hexdigest()) -+ _mathjax_js_cache = (data, sha1(repr(data).encode('ascii')).hexdigest()) - data,datahash = _mathjax_js_cache - - if request.environ.get('HTTP_IF_NONE_MATCH', None) == datahash: -@@ -173,7 +173,7 @@ def mathjax_js(): - def keyboard_js(browser_os): - from sagenb.notebook.keyboards import get_keyboard - data = get_keyboard(browser_os) -- datahash=sha1(data).hexdigest() -+ datahash=sha1(str(data).encode('ascii')).hexdigest() - if request.environ.get('HTTP_IF_NONE_MATCH', None) == datahash: - response = make_response('',304) - else: -@@ -490,7 +490,7 @@ def create_app(path_to_notebook, *args, - filename = os.path.join(SRC, path) - if os.path.isfile(filename): - from cgi import escape -- src = escape(open(filename).read().decode('utf-8','ignore')) -+ src = escape(open(filename).read().decode('ascii')) - if (os.path.splitext(filename)[1] in - ['.py','.c','.cc','.h','.hh','.pyx','.pxd']): - return render_template(os.path.join('html', 'source_code.html'), -diff -up build/pkgs/sagenb/src/sagenb/misc/format.py.orig build/pkgs/sagenb/src/sagenb/misc/format.py ---- build/pkgs/sagenb/src/sagenb/misc/format.py.orig 2019-09-05 13:20:21.507608139 -0300 -+++ build/pkgs/sagenb/src/sagenb/misc/format.py 2019-09-05 13:27:08.353250002 -0300 -@@ -126,7 +126,7 @@ import sys - sys.ps1 = "%s" - print("START%s") - %s --""" % (prompt, number, displayhook_hack(string).encode('utf-8', 'ignore')) -+""" % (prompt, number, displayhook_hack(string).encode('ascii')) - try: - string = '# -*- coding: utf-8 -*-\n' + relocate_future_imports(string) - except SyntaxError: -diff -up build/pkgs/sagenb/src/sagenb/misc/misc.py.orig build/pkgs/sagenb/src/sagenb/misc/misc.py ---- build/pkgs/sagenb/src/sagenb/misc/misc.py.orig 2019-09-05 13:20:31.231671284 -0300 -+++ build/pkgs/sagenb/src/sagenb/misc/misc.py 2019-09-05 13:27:08.354250008 -0300 -@@ -424,7 +424,7 @@ def set_permissive_permissions(filename) - stat.S_IRUSR | stat.S_IWUSR | stat.S_IXUSR | \ - stat.S_IRGRP | stat.S_IWGRP | stat.S_IXGRP) - --def encoded_str(obj, encoding='utf-8'): -+def encoded_str(obj, encoding='ascii'): - r""" - Takes an object and returns an encoded str human-readable representation. - -@@ -445,7 +445,7 @@ def encoded_str(obj, encoding='utf-8'): - return binary_type(obj) - - --def unicode_str(obj, encoding='utf-8'): -+def unicode_str(obj, encoding='ascii'): - r""" - Takes an object and returns a unicode human-readable representation. - -diff -up build/pkgs/sagenb/src/sagenb/misc/support.py.orig build/pkgs/sagenb/src/sagenb/misc/support.py ---- build/pkgs/sagenb/src/sagenb/misc/support.py.orig 2019-09-05 13:20:40.258729902 -0300 -+++ build/pkgs/sagenb/src/sagenb/misc/support.py 2019-09-05 13:27:08.356250022 -0300 -@@ -279,7 +279,7 @@ def docstring(obj_name, globs, system='s - s += newline - s += sageinspect.sage_getdoc(obj, obj_name) - s = s.rstrip() -- return html_markup(s.decode('utf-8')) -+ return html_markup(s.decode('ascii')) - - - def html_markup(s): -@@ -433,7 +433,7 @@ def syseval(system, cmd, dir=None): - if hasattr(system.__class__, 'chdir'): - system.chdir(dir) - if isinstance(cmd, text_type): -- cmd = cmd.encode('utf-8', 'ignore') -+ cmd = cmd.encode('ascii') - return system.eval(cmd, sage_globals, locals=sage_globals) - - ###################################################################### -diff -up build/pkgs/sagenb/src/sagenb/misc/worksheet2rst.py.orig build/pkgs/sagenb/src/sagenb/misc/worksheet2rst.py ---- build/pkgs/sagenb/src/sagenb/misc/worksheet2rst.py.orig 2019-09-05 13:20:49.848792176 -0300 -+++ build/pkgs/sagenb/src/sagenb/misc/worksheet2rst.py 2019-09-05 13:27:08.356250022 -0300 -@@ -200,5 +200,5 @@ if __name__=='__main__': - text = sys.stdin.read() - images_dir = sys.argv[2] if len(sys.argv)>2 else '' - -- print(worksheet2rst(text, images_dir).encode('utf-8')) -+ print(worksheet2rst(text, images_dir).encode('ascii')) - -diff -up build/pkgs/sagenb/src/sagenb/notebook/challenge.py.orig build/pkgs/sagenb/src/sagenb/notebook/challenge.py ---- build/pkgs/sagenb/src/sagenb/notebook/challenge.py.orig 2019-09-05 13:20:58.515848457 -0300 -+++ build/pkgs/sagenb/src/sagenb/notebook/challenge.py 2019-09-05 13:27:08.356250022 -0300 -@@ -529,7 +529,7 @@ class reCAPTCHAChallenge(AbstractChallen - - def encode_if_necessary(s): - if isinstance(s, unicode): -- return s.encode('utf-8') -+ return s.encode('ascii') - return s - - params = urlencode({ -diff -up build/pkgs/sagenb/src/sagenb/notebook/css.py.orig build/pkgs/sagenb/src/sagenb/notebook/css.py ---- build/pkgs/sagenb/src/sagenb/notebook/css.py.orig 2019-09-05 13:21:08.792915193 -0300 -+++ build/pkgs/sagenb/src/sagenb/notebook/css.py 2019-09-05 13:27:08.357250028 -0300 -@@ -58,5 +58,5 @@ def css(color='default'): - user_css = '\n' + open(user_css_path).read() - - data = main_css + user_css -- _css_cache = (data, sha1(data).hexdigest()) -+ _css_cache = (data, sha1(str(data).encode('ascii')).hexdigest()) - return _css_cache -diff -up build/pkgs/sagenb/src/sagenb/notebook/js.py.orig build/pkgs/sagenb/src/sagenb/notebook/js.py ---- build/pkgs/sagenb/src/sagenb/notebook/js.py.orig 2019-09-05 13:21:17.511971810 -0300 -+++ build/pkgs/sagenb/src/sagenb/notebook/js.py 2019-09-05 13:27:08.357250028 -0300 -@@ -84,7 +84,7 @@ def javascript(): - if debug_mode: - # TODO: maybe we should return a random hash so that the code - # is reloaded on every refresh -- return s, sha1(s).hexdigest() -+ return s, sha1(str(s).encode('ascii')).hexdigest() - - # TODO: use minify here, which is more standard (and usually safer - # and with gzip compression, smaller); But first inquire about the -@@ -92,7 +92,7 @@ def javascript(): - # Evil" clause in the license. Does that prevent us from - # distributing it (i.e., it adds an extra condition to the - # software)? See http://www.crockford.com/javascript/jsmin.py.txt -- s = JavaScriptCompressor().getPacked(s.encode('utf-8')) -+ s = JavaScriptCompressor().getPacked(s.encode('ascii')) - _cache_javascript = (s, sha1(s).hexdigest()) - - return _cache_javascript -diff -up build/pkgs/sagenb/src/sagenb/notebook/register.py.orig build/pkgs/sagenb/src/sagenb/notebook/register.py ---- build/pkgs/sagenb/src/sagenb/notebook/register.py.orig 2019-09-05 13:21:26.247028528 -0300 -+++ build/pkgs/sagenb/src/sagenb/notebook/register.py 2019-09-05 13:27:08.358250034 -0300 -@@ -22,7 +22,7 @@ def build_msg(key, username, addr, port, - '%(url_prefix)s://%(addr)s:%(port)s/confirm?key=%(key)s\n\n' - 'You will be taken to a page which will confirm that you have indeed registered.', - url_prefix=url_prefix, addr=addr, port=port, key=key) -- return s.encode('utf-8') -+ return s.encode('ascii') - - def build_password_msg(key, username, addr, port, secure): - url_prefix = "https" if secure else "http" -@@ -31,7 +31,7 @@ def build_password_msg(key, username, ad - 'Sign in at %(url_prefix)s://%(addr)s:%(port)s/\n\n' - 'Make sure to reset your password by going to Settings in the upper right bar.', - key=key, url_prefix=url_prefix, addr=addr, port=port) -- return s.encode('utf-8') -+ return s.encode('ascii') - - def make_key(): - from random import randint -diff -up build/pkgs/sagenb/src/sagenb/notebook/smtpsend.py.orig build/pkgs/sagenb/src/sagenb/notebook/smtpsend.py ---- build/pkgs/sagenb/src/sagenb/notebook/smtpsend.py.orig 2019-09-05 13:21:35.087085930 -0300 -+++ build/pkgs/sagenb/src/sagenb/notebook/smtpsend.py 2019-09-05 13:27:08.358250034 -0300 -@@ -18,20 +18,15 @@ AUTHOR: - - Bobby Moretti - """ --from twisted.mail import smtp, relaymanager # problematic with python 3 --from email.mime.base import MIMEBase --from email.mime.multipart import MIMEMultipart --import sys -- -+from twisted.mail.smtp import sendmail -+from twisted.internet.task import react -+from email.mime.text import MIMEText - - def buildMessage(fromaddr, toaddr, subject, body): -- message = MIMEMultipart() -+ message = MIMEText(body) - message['From'] = fromaddr - message['To'] = toaddr - message['Subject'] = subject -- textPart = MIMEBase('text', 'plain') -- textPart.set_payload(body) -- message.attach(textPart) - return message - - def sendComplete(result): -@@ -42,16 +37,10 @@ def handleError(error): - - def send_mail(fromaddr, toaddr, subject, body, on_success=sendComplete, on_failure=handleError): - try: -- recpt_domain = toaddr.split('@')[1].encode("ascii") -- except (ValueError, IndexError, UnicodeDecodeError): -- raise ValueError("mal-formed destination address") -- message = buildMessage(fromaddr, toaddr, subject, body) -- messageData = message.as_string(unixfrom=False) -- -- def on_found_record(mx_rec): -- smtp_server = str(mx_rec.name) -- sending = smtp.sendmail(smtp_server, fromaddr, [toaddr], messageData) -- sending.addCallback(on_success).addErrback(on_failure) -- -- relaymanager.MXCalculator().getMX(recpt_domain).addCallback(on_found_record) -+ d = sendmail("localhost", fromaddr, toaddr, message) -+ d.addBoth(print) -+ except: -+ handleError(sys.exc_info()[0]) -+ return -+ sendComplete() - -diff -up build/pkgs/sagenb/src/sagenb/notebook/user_manager.py.orig build/pkgs/sagenb/src/sagenb/notebook/user_manager.py ---- build/pkgs/sagenb/src/sagenb/notebook/user_manager.py.orig 2019-09-05 13:21:45.143151229 -0300 -+++ build/pkgs/sagenb/src/sagenb/notebook/user_manager.py 2019-09-05 13:27:08.360250047 -0300 -@@ -461,7 +461,7 @@ class SimpleUserManager(UserManager): - if encrypt: - salt = user.generate_salt() - new_password = 'sha256${0}${1}'.format(salt, -- hashlib.sha256(salt + new_password).hexdigest()) -+ hashlib.sha256(str(salt + new_password).encode('ascii')).hexdigest()) - self._passwords[username] = new_password - # need to make sure password in the user object is synced - # for compatibility only the user object data is stored in the 'users.pickle' -diff -up build/pkgs/sagenb/src/sagenb/notebook/user.py.orig build/pkgs/sagenb/src/sagenb/notebook/user.py ---- build/pkgs/sagenb/src/sagenb/notebook/user.py.orig 2019-09-05 13:21:54.855214298 -0300 -+++ build/pkgs/sagenb/src/sagenb/notebook/user.py 2019-09-05 13:27:08.360250047 -0300 -@@ -185,7 +185,7 @@ class User(object): - if encrypt: - salt = generate_salt() - self._password = 'sha256${0}${1}'.format(salt, -- hashlib.sha256(salt + password).hexdigest()) -+ hashlib.sha256(str(salt + password).encode('ascii')).hexdigest()) - else: - self._password = password - self._temporary_password = '' -diff -up build/pkgs/sagenb/src/sagenb/notebook/worksheet.py.orig build/pkgs/sagenb/src/sagenb/notebook/worksheet.py ---- build/pkgs/sagenb/src/sagenb/notebook/worksheet.py.orig 2019-09-05 13:26:14.467900092 -0300 -+++ build/pkgs/sagenb/src/sagenb/notebook/worksheet.py 2019-09-05 13:27:08.361250054 -0300 -@@ -313,7 +313,7 @@ class Worksheet(object): - - d = {############# - # basic identification -- 'name': unicode(self.name()), -+ 'name': str(self.name().encode('ascii')), - 'id_number': int(self.id_number()), - - ############# -@@ -2157,9 +2157,9 @@ class Worksheet(object): - filename = self.worksheet_html_filename() - - if os.path.exists(filename): -- contents = open(filename).read().decode('utf-8', 'ignore') -+ contents = open(filename).read().decode('ascii') - else: -- contents = u' ' -+ contents = ' ' - - try: - r = [unicode(x.lower()) for x in [self.owner(), self.publisher(), self.name(), contents]] -@@ -2190,8 +2190,8 @@ class Worksheet(object): - if E is None: - E = self.edit_text() - worksheet_html = self.worksheet_html_filename() -- open(filename, 'w').write(bz2.compress(E.encode('utf-8', 'ignore'))) -- open(worksheet_html, 'w').write(self.body().encode('utf-8', 'ignore')) -+ open(filename, 'w').write(bz2.compress(E.encode('ascii'))) -+ open(worksheet_html, 'w').write(self.body().encode('ascii')) - self.limit_snapshots() - try: - X = self.__saved_by_info -@@ -3930,7 +3930,7 @@ except (KeyError, IOError): - """ - # The extra newline below is necessary, since otherwise source - # code introspection doesn't include the last line. -- return 'open("%s","w").write("# -*- coding: utf-8 -*-\n" + _support_.preparse_worksheet_cell(base64.b64decode("%s"),globals())+"\n"); execfile(os.path.abspath("%s"))'%(CODE_PY, base64.b64encode(s.encode('utf-8', 'ignore')), CODE_PY) -+ return 'open("%s","w").write("# -*- coding: utf-8 -*-\n" + _support_.preparse_worksheet_cell(base64.b64decode("%s"),globals())+"\n"); execfile(os.path.abspath("%s"))'%(CODE_PY, base64.b64encode(s.encode('ascii')), CODE_PY) - - ########################################################## - # Loading and attaching files -@@ -4114,7 +4114,7 @@ except (KeyError, IOError): - os.makedirs(code) - spyx = os.path.abspath(os.path.join(code, 'sage%s.spyx'%id)) - if not (os.path.exists(spyx) and open(spyx).read() == cmd): -- open(spyx,'w').write(cmd.encode('utf-8', 'ignore')) -+ open(spyx,'w').write(cmd.encode('ascii')) - return '_support_.cython_import_all("%s", globals())'%spyx - - def check_for_system_switching(self, input, cell): -diff -up build/pkgs/sagenb/src/sagenb/storage/filesystem_storage.py.orig build/pkgs/sagenb/src/sagenb/storage/filesystem_storage.py ---- build/pkgs/sagenb/src/sagenb/storage/filesystem_storage.py.orig 2019-09-05 13:22:17.198359375 -0300 -+++ build/pkgs/sagenb/src/sagenb/storage/filesystem_storage.py 2019-09-05 13:27:08.361250054 -0300 -@@ -106,7 +106,7 @@ class FilesystemDatastore(Datastore): - - def _deep_user_path(self, username): - from hashlib import md5 -- h = md5(username).hexdigest() -+ h = md5(str(username).encode('ascii')).hexdigest() - base = ['__store__', h[:1], h[:2], h[:3], h[:4]] - path = os.path.join(*base) - self._makepath(self._abspath(os.path.join(self._home_path, path))) -@@ -397,7 +397,7 @@ class FilesystemDatastore(Datastore): - # todo -- add check if changed - filename = self._worksheet_html_filename(username, id_number) - with atomic_write(self._abspath(filename)) as f: -- f.write(worksheet.body().encode('utf-8', 'ignore')) -+ f.write(str(worksheet.body())) - - def create_worksheet(self, username, id_number): - """ -@@ -548,7 +548,7 @@ class FilesystemDatastore(Datastore): - - worksheet_txt = members[0].name - W = self.load_worksheet(username, id_number) -- W.edit_save_old_format(T.extractfile(worksheet_txt).read().decode('utf-8', 'ignore')) -+ W.edit_save_old_format(T.extractfile(worksheet_txt).read().decode('ascii')) - # '/' is right, since old worksheets always unix - dir = worksheet_txt.split('/')[0] - -diff -up build/pkgs/sagenb/src/sagenb/testing/selenium/selenium.py.orig build/pkgs/sagenb/src/sagenb/testing/selenium/selenium.py ---- build/pkgs/sagenb/src/sagenb/testing/selenium/selenium.py.orig 2019-09-05 13:22:27.220424454 -0300 -+++ build/pkgs/sagenb/src/sagenb/testing/selenium/selenium.py 2019-09-05 13:27:08.361250054 -0300 -@@ -199,9 +199,9 @@ class selenium: - - def do_command(self, verb, args): - conn = http.client.HTTPConnection(self.host, self.port) -- body = u'cmd=' + urllib.quote_plus(unicode(verb).encode('utf-8')) -+ body = u'cmd=' + urllib.quote_plus(unicode(verb).encode('ascii')) - for i in range(len(args)): -- body += '&' + unicode(i+1) + '=' + urllib.quote_plus(unicode(args[i]).encode('utf-8')) -+ body += '&' + unicode(i+1) + '=' + urllib.quote_plus(unicode(args[i]).encode('ascii')) - if (None != self.sessionId): - body += "&sessionId=" + unicode(self.sessionId) - headers = {"Content-Type": "application/x-www-form-urlencoded; charset=utf-8"} -diff -up build/pkgs/sagenb/src/sagenb/data/sage/html/worksheet_listing.html.orig ./build/pkgs/sagenb/src/sagenb/data/sage/html/worksheet_listing.html ---- build/pkgs/sagenb/src/sagenb/data/sage/html/worksheet_listing.html.orig 2019-09-05 15:39:56.829175774 -0300 -+++ build/pkgs/sagenb/src/sagenb/data/sage/html/worksheet_listing.html 2019-09-05 15:40:26.822369920 -0300 -@@ -45,6 +45,7 @@ INPUT: - <h1>{{ gettext('Account is read only. You may download or delete worksheets or data.') }}</h1> - {% endif %} - <h3><a href="https://trac.sagemath.org/ticket/25837">{{ gettext('This notebook is deprecated. Click here for details.') }}</a></h3> -+<h5>The sagemath rpm package was built with python3, but the sagemath notebook is discontinued and has not been ported to python3.<br>Only minimal functionality to browse documentation is available.<br>Please run the shell command:<br><code>$ sage -n jupyter</code><br>to use the jupyter notebook.</h5> - <div id="user-main-controls" class="user-controls"> - {% if pub is not defined or not pub %} - <a href="/new_worksheet" target="_blank">{{ gettext('New Worksheet') }}</a> diff --git a/sagemath-sagenb.patch b/sagemath-sagenb.patch deleted file mode 100644 index 24d25c1..0000000 --- a/sagemath-sagenb.patch +++ /dev/null @@ -1,88 +0,0 @@ -diff -up build/pkgs/sagenb/src/sagenb/flask_version/base.py.orig build/pkgs/sagenb/src/sagenb/flask_version/base.py ---- build/pkgs/sagenb/src/sagenb/flask_version/base.py.orig 2018-11-05 08:45:39.000000000 -0700 -+++ build/pkgs/sagenb/src/sagenb/flask_version/base.py 2019-01-04 10:28:38.099158223 -0700 -@@ -7,8 +7,6 @@ from functools import partial - from flask import Flask, Blueprint, url_for, request, session, redirect, g, make_response, current_app, render_template - from .decorators import login_required, guest_or_login_required, with_lock - from .decorators import global_lock --# Make flask use the old session foo from <=flask-0.9 --from flask_oldsessions import OldSecureCookieSessionInterface - - from flask_autoindex import AutoIndex - from sage.env import SAGE_SRC, SAGE_DOC -@@ -28,7 +26,6 @@ class SageNBFlask(Flask): - def __init__(self, *args, **kwds): - self.startup_token = kwds.pop('startup_token', None) - Flask.__init__(self, *args, **kwds) -- self.session_interface = OldSecureCookieSessionInterface() - - self.config['SESSION_COOKIE_HTTPONLY'] = False - -@@ -39,13 +36,13 @@ class SageNBFlask(Flask): - self.add_static_path('/javascript', DATA) - self.add_static_path('/static', DATA) - self.add_static_path('/java', DATA) -- self.add_static_path('/java/jmol', os.path.join(os.environ["SAGE_SHARE"],"jmol")) -- self.add_static_path('/jsmol', os.path.join(os.environ["SAGE_SHARE"],"jsmol")) -- self.add_static_path('/jsmol/js', os.path.join(os.environ["SAGE_SHARE"],"jsmol","js")) -- self.add_static_path('/j2s', os.path.join(os.environ["SAGE_SHARE"],"jsmol","j2s")) -- self.add_static_path('/jsmol/j2s', os.path.join(os.environ["SAGE_SHARE"],"jsmol","j2s")) -- self.add_static_path('/j2s/core', os.path.join(os.environ["SAGE_SHARE"],"jsmol","j2s","core")) -- self.add_static_path('/threejs', os.path.join(os.environ["SAGE_SHARE"],"threejs")) -+ self.add_static_path('/java/jmol', os.path.join(os.environ["SAGE_ROOT"],"share","jmol")) -+ self.add_static_path('/jsmol', os.path.join(os.environ["SAGE_ROOT"],"share","jsmol")) -+ self.add_static_path('/jsmol/js', os.path.join(os.environ["SAGE_ROOT"],"share","jsmol","js")) -+ self.add_static_path('/j2s', os.path.join(os.environ["SAGE_ROOT"],"jsmol","j2s")) -+ self.add_static_path('/jsmol/j2s', os.path.join(os.environ["SAGE_ROOT"],"share","jsmol","j2s")) -+ self.add_static_path('/j2s/core', os.path.join(os.environ["SAGE_ROOT"],"share","jsmol","j2s","core")) -+ self.add_static_path('/threejs', os.path.join(os.environ["SAGE_ROOT"],"share","threejs")) - import mimetypes - mimetypes.add_type('text/plain','.jmol') - -diff -up build/pkgs/sagenb/src/sagenb/misc/misc.py.orig build/pkgs/sagenb/src/sagenb/misc/misc.py ---- build/pkgs/sagenb/src/sagenb/misc/misc.py.orig 2018-11-05 08:45:39.000000000 -0700 -+++ build/pkgs/sagenb/src/sagenb/misc/misc.py 2019-01-04 10:28:38.099158223 -0700 -@@ -196,7 +196,8 @@ def pad_zeros(s, size=3): - - SAGENB_ROOT = os.path.split(resource_filename(__name__, ''))[0] - --DATA = os.path.join(SAGENB_ROOT, 'data') -+import sage.env -+DATA = os.path.join(sage.env.SAGE_SRC, 'sagenb', 'data') - - if 'DOT_SAGENB' in os.environ: - DOT_SAGENB = os.environ['DOT_SAGENB'] -diff -up build/pkgs/sagenb/src/sagenb/notebook/cell.py.orig build/pkgs/sagenb/src/sagenb/notebook/cell.py ---- build/pkgs/sagenb/src/sagenb/notebook/cell.py.orig 2018-11-05 08:45:39.000000000 -0700 -+++ build/pkgs/sagenb/src/sagenb/notebook/cell.py 2019-01-04 10:28:38.100158204 -0700 -@@ -2387,8 +2387,8 @@ class Cell(Cell_generic): - with open(jmol_name, 'r') as f: - jmol_script = f.read() - jmol_script = jmol_script.replace( -- 'defaultdirectory "', -- 'defaultdirectory "{0}/'.format(self.url_to_worksheet())) -+ 'defaultdirectory "', -+ 'defaultdirectory "/home/' + self.worksheet_filename() + '/') - with open(jmol_name, 'w') as f: - f.write(jmol_script) - -diff -up build/pkgs/sagenb/src/sagenb/notebook/run_notebook.py.orig build/pkgs/sagenb/src/sagenb/notebook/run_notebook.py ---- build/pkgs/sagenb/src/sagenb/notebook/run_notebook.py.orig 2018-11-05 08:45:39.000000000 -0700 -+++ build/pkgs/sagenb/src/sagenb/notebook/run_notebook.py 2019-01-04 10:28:38.101158185 -0700 -@@ -53,12 +53,11 @@ sagenb.notebook.misc.DIR = %(cwd)r #We s - # Flask # - ######### - import os, sys, random --import sagenb.flask_version.base as flask_base --opts={} -+sagenb_dir = os.path.join(os.environ['SAGE_ROOT'], 'src', 'sagenb') -+sys.path.append(sagenb_dir) -+import flask_version.base as flask_base - startup_token = '{0:x}'.format(random.randint(0, 2**128)) --if %(automatic_login)s: -- opts['startup_token'] = startup_token --flask_app = flask_base.create_app(%(notebook_opts)s, **opts) -+flask_app = flask_base.create_app(%(notebook_opts)s, startup_token=startup_token) - - def save_notebook(notebook): - print("Quitting all running worksheets...") diff --git a/sagemath-scripts.patch b/sagemath-scripts.patch index 6b6e447..01cef9b 100644 --- a/sagemath-scripts.patch +++ b/sagemath-scripts.patch @@ -1,6 +1,6 @@ diff -up src/bin/sage.orig src/bin/sage ---- src/bin/sage.orig 2019-10-03 14:38:40.429507574 -0300 -+++ src/bin/sage 2019-10-03 14:47:00.852631198 -0300 +--- src/bin/sage.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/bin/sage 2020-02-25 13:37:42.510072662 -0700 @@ -26,13 +26,10 @@ usage() { echo " file.[sage|py|spyx] -- run given .sage, .py or .spyx file" echo " -advanced -- list all command line options" @@ -585,7 +585,7 @@ diff -up src/bin/sage.orig src/bin/sage - # tends to ask interactive questions if something goes wrong. These - # cause the build to hang. If stdin is /dev/null, TeX just aborts. - shift -- exec sage-python23 -m sage_setup.docbuild "$@" </dev/null +- exec sage-python -m sage_setup.docbuild "$@" </dev/null -fi - if [ "$1" = '-gdb' -o "$1" = "--gdb" ]; then @@ -605,8 +605,8 @@ diff -up src/bin/sage.orig src/bin/sage exec sage-startuptime.py "$@" fi diff -up src/bin/sage-valgrind.orig src/bin/sage-valgrind ---- src/bin/sage-valgrind.orig 2019-10-03 14:47:13.247708565 -0300 -+++ src/bin/sage-valgrind 2019-10-03 14:47:46.404915531 -0300 +--- src/bin/sage-valgrind.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/bin/sage-valgrind 2020-02-25 13:36:02.973848216 -0700 @@ -4,17 +4,7 @@ if [ -z $SAGE_EXTCODE ]; then SAGE_EXTCODE=`${0/-valgrind} -c "from sage.env import SAGE_EXTCODE; print(SAGE_EXTCODE)"` fi diff --git a/sagemath-tdlib.patch b/sagemath-tdlib.patch index aafe061..0612f71 100644 --- a/sagemath-tdlib.patch +++ b/sagemath-tdlib.patch @@ -1,5 +1,6 @@ ---- src/sage/graphs/graph_decompositions/tdlib/sage_tdlib.cpp.orig 2019-09-29 17:03:11.000000000 -0600 -+++ src/sage/graphs/graph_decompositions/tdlib/sage_tdlib.cpp 2020-01-06 10:58:12.087355771 -0700 +diff -up src/sage/graphs/graph_decompositions/tdlib/sage_tdlib.cpp.orig src/sage/graphs/graph_decompositions/tdlib/sage_tdlib.cpp +--- src/sage/graphs/graph_decompositions/tdlib/sage_tdlib.cpp.orig 2020-01-01 04:03:10.000000000 -0700 ++++ src/sage/graphs/graph_decompositions/tdlib/sage_tdlib.cpp 2020-02-25 13:59:23.612853911 -0700 @@ -2,8 +2,8 @@ #include <map>
diff --git a/sagemath.spec b/sagemath.spec index 5571df8..d456da1 100644 --- a/sagemath.spec +++ b/sagemath.spec @@ -18,9 +18,6 @@ %bcond_with docs %endif
-# not functional due to missing jar dependencies -%bcond_with sage3d - # use a workaround to match upstream sagemath patched sphinx %bcond_without sphinx_hack
@@ -40,7 +37,7 @@
%global combinatorial_designs_pkg combinatorial_designs-20140630 %global conway_polynomials_pkg conway_polynomials-0.5 -%global cremona_ver 2016-10-17 +%global cremona_ver 2019-10-29 %global elliptic_curves_pkg elliptic_curves-0.8.1 %global flintqs_pkg flintqs-1.0 %global graphs_pkg graphs-20161026 @@ -59,8 +56,7 @@ %endif %global polytopes_db_pkg polytopes_db-20170220 %global rubiks_pkg rubiks-20070912 -%global sagenb_pkg sagenb-1.1.2 -%global sagetex_pkg sagetex-3.3 +%global sagetex_pkg sagetex-3.4 %global Sphinx_pkg Sphinx-1.8.5 %global singular_pkg singular-4.1.1p2 %if %{with bundled_thebe} @@ -68,7 +64,7 @@ %global thebe_pkg thebe-%{thebe_ver} %endif %if %{with bundled_threejs} -%global threejs_ver r105 +%global threejs_ver r110 %global threejs_pkg threejs-%{threejs_ver} %endif %if %{with bundled_widgetsnbextension} @@ -77,7 +73,7 @@ %endif
# Spkg equivalents of required rpms; we pretend they are installed as spkgs. -%global SAGE_REQUIRED_PKGS 4ti2-1.6.9 bliss-0.73 cbc-2.10.3 CoCoALib-0.99601 coxeter3-1.1 cryptominisat-5.6.8 database_cremona_ellcurve-%{cremona_ver} gap_packages-4.10.2 gmp-6.1.2 libsirocco-2.0 lrslib-070 mcqd-1.0 meataxe-1.0 primecount-5.1 qepcad-B.1.72 saclib-2.2.7 surf-1.0.6-gcc6 tdlib-0.9.0 +%global SAGE_REQUIRED_PKGS 4ti2-1.6.9 bliss-0.73 cbc-2.10.4 CoCoALib-0.99650 coxeter3-3.1 cryptominisat-5.6.8 database_cremona_ellcurve-%{cremona_ver} gap_packages-4.10.2 gmp-6.1.2 libsirocco-2.0.2 lrslib-070 mcqd-1.0 meataxe-1.0 primecount-5.3 qepcad-B.1.72 saclib-2.2.7 surf-1.0.6-gcc6 tdlib-0.9.0
%ifarch %{ix86} x86_64 %global SAGE_REQUIRED_PKGS %{SAGE_REQUIRED_PKGS} fes-0.2 @@ -94,8 +90,8 @@
Name: sagemath Summary: A free open-source mathematics software system -Version: 8.9 -Release: 3%{?dist} +Version: 9.0 +Release: 1%{?dist} # The file ${SAGE_ROOT}/COPYING.txt is the upstream license breakdown file # Additionally, every $files section has a comment with the license name # before files with that license @@ -107,8 +103,8 @@ Source2: gprc.expect # Follow maxima's ExclusiveArch ExclusiveArch: aarch64 %{arm} %{ix86} x86_64 ppc sparcv9
-# Fix ecm interact() command -Patch0: %{name}-ecm.patch +# Fix stray escapes in python strings +Patch0: %{name}-escape.patch
# Fix a "random" bit chooser that always chooses 0 Patch1: %{name}-random.patch @@ -122,7 +118,7 @@ Patch3: %{name}-extensions.patch
# helper to: # o respect a DESTDIR environment variable -# o avoid double '//' in pathnames, what can confused debugedit & co +# o avoid double '//' in pathnames, which can confuse debugedit & co # o minor change to help in incremental builds by avoiding rebuilding # files # o do not assume there is an installed sagemath @@ -131,92 +127,83 @@ Patch4: %{name}-rpmbuild.patch # build documentation in buildroot environment Patch5: %{name}-sagedoc.patch
-# sage notebook rpm and system environment adjustments -Patch6: %{name}-sagenb.patch - # do not attempt to create state files in system directories -Patch7: %{name}-readonly.patch +Patch6: %{name}-readonly.patch
# work with all maxima-runtime lisp backend packages -Patch8: %{name}-maxima.patch +Patch7: %{name}-maxima.patch
# execute 4ti2 programs in $PATH not in $SAGE_ROOT/local/bin -Patch9: %{name}-4ti2.patch +Patch8: %{name}-4ti2.patch
# use jmol itself to export preview images # FIXME besides not using X and told so, fails if DISPLAY is not set -Patch10: %{name}-jmol.patch +Patch9: %{name}-jmol.patch
# tell the user how to install the large Cremona database # add a missing commit() that causes large database construction to fail -Patch11: %{name}-cremona.patch +Patch10: %{name}-cremona.patch
# adapt to python 3 and cython running in python 3 mode -Patch12: %{name}-python3.patch +Patch11: %{name}-python3.patch
# correct path to the nauty geng program -Patch13: %{name}-nauty.patch +Patch12: %{name}-nauty.patch
# remove the buildroot path from Cython output -Patch14: %{name}-buildroot.patch +Patch13: %{name}-buildroot.patch
# update c++ standard to fix FTBFS -Patch15: %{name}-lcalc.patch +Patch14: %{name}-lcalc.patch
# avoid assertion in coin backend -Patch16: %{name}-cbc.patch +Patch15: %{name}-cbc.patch
# Use system gap directories -Patch17: %{name}-libgap.patch +Patch16: %{name}-libgap.patch
# Build fes -Patch18: %{name}-fes-build.patch +Patch17: %{name}-fes-build.patch # Disable fes -Patch19: %{name}-fes.patch +Patch18: %{name}-fes.patch
# Side effect of using distro packages # https://bugzilla.redhat.com/show_bug.cgi?id=974769 -Patch20: %{name}-sympy.patch +Patch19: %{name}-sympy.patch
# Correct unable to start QEPCAD within sage # https://bugzilla.redhat.com/show_bug.cgi?id=1243590 -Patch21: %{name}-qepcad.patch +Patch20: %{name}-qepcad.patch
# Correct path to arb headers -Patch22: %{name}-arb.patch +Patch21: %{name}-arb.patch
# Add missing include paths -Patch23: %{name}-includes.patch +Patch22: %{name}-includes.patch
# Use openblas -Patch24: %{name}-openblas.patch +Patch23: %{name}-openblas.patch
# Fix paths to latte-integrale binaries -Patch25: %{name}-latte.patch +Patch24: %{name}-latte.patch
# Upstream fixes for random SIGFPEs due to ecl messing with the fp state -Patch26: %{name}-sigfpe.patch +Patch25: %{name}-sigfpe.patch
# Add some missing #includes and types in the rubiks code -Patch27: %{name}-rubiks.patch +Patch26: %{name}-rubiks.patch
# Fix an indentation error in sagetex -Patch28: %{name}-sagetex.patch +Patch27: %{name}-sagetex.patch
# Fix some path settings in the sage environment -Patch29: %{name}-env.patch - -# Make notebook minimally function until upstream finally removes it -Patch30: %{name}-sagenb-python3.patch - -# Adapt to primecount 5.x -Patch31: %{name}-primecount.patch +Patch28: %{name}-env.patch
# Adapt to recent tdlib 0.9 -Patch32: %{name}-tdlib.patch +Patch29: %{name}-tdlib.patch
# Use local objects.inv for intersphinx since no network on koji builders -Patch33: %{name}-intersphinx.patch +Patch30: %{name}-intersphinx.patch
BuildRequires: 4ti2 BuildRequires: arb-devel @@ -275,7 +262,7 @@ BuildRequires: iml-devel BuildRequires: jmol BuildRequires: jsmath-fonts # To have a proper link -#BuildRequires: jsmol +BuildRequires: jsmol BuildRequires: L-function-devel BuildRequires: lapack-devel BuildRequires: latte-integrale @@ -319,10 +306,6 @@ BuildRequires: python3dist(brial) BuildRequires: python3dist(cvxopt) BuildRequires: python3dist(cython) BuildRequires: python3dist(docutils) -BuildRequires: python3dist(flask-autoindex) -BuildRequires: python3dist(flask-babel) -BuildRequires: python3dist(flask-openid) -BuildRequires: python3dist(flask-silk) BuildRequires: python3dist(fpylll) BuildRequires: python3dist(future) BuildRequires: python3dist(gmpy2) @@ -340,7 +323,6 @@ BuildRequires: python3dist(networkx) BuildRequires: python3dist(notebook) %if %{with bundled_ipython} BuildRequires: python3dist(path.py) -BuildRequires: python3dist(pathlib2) %endif %if %{without bundled_pexpect} BuildRequires: python3dist(pexpect) @@ -359,7 +341,6 @@ BuildRequires: python3dist(pyzmq) BuildRequires: python3dist(rpy2) BuildRequires: python3dist(scipy) BuildRequires: python3dist(scons) -BuildRequires: python3dist(send2trash) BuildRequires: python3dist(setuptools) %if %{with bundled_ipython} BuildRequires: python3dist(simplegeneric) @@ -368,7 +349,6 @@ BuildRequires: python3dist(six) BuildRequires: python3dist(speaklater) BuildRequires: python3dist(sphinx) BuildRequires: python3dist(sympy) -BuildRequires: python3dist(twisted) BuildRequires: python3dist(zodb3) BuildRequires: qepcad-B BuildRequires: R @@ -378,14 +358,14 @@ BuildRequires: rw-devel BuildRequires: sharedmeataxe-devel BuildRequires: Singular-devel BuildRequires: sirocco-devel -BuildRequires: stix-math-fonts +BuildRequires: stix-fonts +BuildRequires: suitesparse-devel BuildRequires: symmetrica-devel BuildRequires: sympow BuildRequires: tachyon BuildRequires: texlive BuildRequires: tex(anyfontsize.sty) BuildRequires: tex(makecmds.sty) -BuildRequires: vecmath # For _jsdir macro BuildRequires: web-assets-devel BuildRequires: xorg-x11-fonts-Type1 @@ -394,14 +374,14 @@ BuildRequires: zlib-devel BuildRequires: zn_poly-devel
Requires: hicolor-icon-theme -Requires: %{name}-core -Requires: %{name}-data +Requires: %{name}-core = %{version}-%{release} +Requires: %{name}-data = %{version}-%{release} %if %{with docs} -Requires: %{name}-doc-en +Requires: %{name}-doc-en = %{version}-%{release} %endif -Requires: %{name}-notebook -Requires: %{name}-rubiks -Requires: %{name}-sagetex +Requires: %{name}-jupyter = %{version}-%{release} +Requires: %{name}-rubiks = %{version}-%{release} +Requires: %{name}-sagetex = %{version}-%{release}
%if %{with bundled_thebe} Provides: bundled(thebe) = %{thebe_ver} @@ -479,7 +459,6 @@ Requires: python3dist(matplotlib) Requires: python3dist(networkx) %if %{with bundled_ipython} Requires: python3dist(path.py) -Requires: python3dist(pathlib2) %endif %if %{without bundled_pexpect} Requires: python3dist(pexpect) @@ -505,8 +484,8 @@ Requires: python3dist(sympy) Requires: python3dist(zodb3) Requires: qepcad-B Requires: Singular -# Required by widgetsnbextension and thebe; remove when they are unbundled -Requires: stix-math-fonts +# Required by thebe; remove when it is unbundled +Requires: stix-fonts Requires: sympow Requires: tachyon Requires: texlive @@ -701,17 +680,18 @@ This package contains the Turkish %{name} documentation. %endif
#------------------------------------------------------------------------ -%package notebook -Summary: The Sage Notebook +%package jupyter +Summary: Jupyter integration for sagemath Requires: %{name}%{?_isa} = %{version}-%{release} Requires: python-jupyter-filesystem -Requires: python3dist(flask-silk) -Requires: python3dist(send2trash) -Requires: vecmath
-%description notebook -The Sage Notebook is a web-based graphical user interface for -mathematical software. +# This can be removed when Fedora 31 reaches EOL +Obsoletes: sagemath-notebook < 9.0-1 +Provides: sagemath-notebook = %{version}-%{release} + +%description jupyter +This package contains a Jupyter integration for sagemath, replacing the +defunct notebook functionality.
#------------------------------------------------------------------------ %package rubiks @@ -835,11 +815,6 @@ pushd build/pkgs/rubiks popd popd
-pushd build/pkgs/sagenb - tar jxf ../../../upstream/%{sagenb_pkg}.tar.bz2 - mv %{sagenb_pkg} src -popd - pushd build/pkgs/sagetex tar zxf ../../../upstream/%{sagetex_pkg}.tar.gz mv %{sagetex_pkg} src @@ -901,14 +876,14 @@ popd %patch14 %patch15 %patch16 -%patch17
%if %{with fes} -%patch18 +%patch17 %else -%patch19 +%patch18 %endif
+%patch19 %patch20 %patch21 %patch22 @@ -920,9 +895,6 @@ popd %patch28 %patch29 %patch30 -%patch31 -%patch32 -%patch33
sed -e 's|@@SAGE_ROOT@@|%{SAGE_ROOT}|' \ -e 's|@@SAGE_DOC@@|%{SAGE_DOC}|' \ @@ -933,19 +905,10 @@ sed -e 's|@@CYSIGNALS@@|%{python3_sitearch}/cysignals|' \ -e 's|@@BUILDROOT@@|%{buildroot}|' \ -i src/setup.py
-sed -e "/flask-oldsessions/d" \ - -i build/pkgs/sagenb/src/setup.py - #------------------------------------------------------------------------ # some .c files are not (re)generated find src/sage ( -name *.pyx -o -name *.pxd ) -exec touch {} +
-# remove bundled jar files before build -rm build/pkgs/sagenb/src/sagenb/data/sage3d/lib/sage3d.jar - -# remove binary egg -rm -r build/pkgs/sagenb/src/sagenb.egg-info - # fix Singular paths singver=$(sed 's/.*-([.[:digit:]]*).*/\1/' <<< %{singular_pkg}) sed -e "s,SINGULARPATH=",&%{_datadir}/singular/LIB:," \ @@ -961,8 +924,8 @@ grep -FrlZ '#!%{_bindir}/env python' | \ xargs -0 sed -i 's,#!%{_bindir}/env python,#!%{__python3},g' grep -FrlZ '#!%{_bindir}/env sage-system-python' | \ xargs -0 sed -i 's,#!%{_bindir}/env sage-system-python,#!%{__python3},g' -grep -FrlZ '#!%{_bindir}/env sage-python23' | \ - xargs -0 sed -i 's,#!%{_bindir}/env sage-python23,#!%{__python3},g' +grep -FrlZ '#!%{_bindir}/env sage-python' | \ + xargs -0 sed -i 's,#!%{_bindir}/env sage-python,#!%{__python3},g' grep -FrlZ 'sage-python23' | xargs -0 sed -i 's,sage-python23,python3,g' grep -FrlZ '#!%{_bindir}/env' | \ xargs -0 sed -i 's,#!%{_bindir}/env ,#!%{_bindir}/,' @@ -1089,10 +1052,6 @@ pushd src popd
#------------------------------------------------------------------------ -pushd build/pkgs/sagenb/src - %__python3 ./setup.py build -popd - pushd build/pkgs/sagetex/src %__python3 ./setup.py build popd @@ -1182,22 +1141,6 @@ pushd src popd
#------------------------------------------------------------------------ -pushd build/pkgs/sagenb/src - rm -f %{buildroot}%{python3_sitearch}/sagenb/data/sage3d/sage3d - %py3_install "--install-purelib=%{python3_sitearch}" - # jsmol - ln -sf %{_jsdir}/jsmol $SAGE_SHARE/jsmol - # sage3d - rm -f %{buildroot}%{_bindir}/sage3d -%if %{with sage3d} - ln -sf %{SAGE_LOCAL}/bin/sage3d %{buildroot}%{python3_sitearch}/sagenb/data/sage3d/sage3d -%endif - ln -sf %{python3_sitearch}/sagenb %{buildroot}%{SAGE_SRC}/sagenb - # use system mathjax - ln -sf %{_jsdir}/mathjax %{buildroot}%{python3_sitearch}/sagenb/data/mathjax -popd - -#------------------------------------------------------------------------ %if %{with bundled_pexpect} pushd build/pkgs/pexpect/src cp -fa pexpect $SAGE_PYTHONPATH @@ -1408,16 +1351,6 @@ EOF chmod +x %{buildroot}%{_bindir}/sage
#------------------------------------------------------------------------ -%if %{with sage3d} -cat > %{buildroot}%{SAGE_LOCAL}/bin/sage3d << EOF -#!/bin/sh - -java -classpath %{SAGE_SRC}/sage/sagenb/data/sage3d/lib/sage3d.jar:%{_javadir}/j3dcore.jar:%{_javadir}/vecmath.jar:%{_javadir}/j3dutils.jar org.sagemath.sage3d.ObjectViewerApp "$1" -EOF -chmod +x %{buildroot}%{SAGE_LOCAL}/bin/sage3d -%endif - -#------------------------------------------------------------------------ # adjust cython interface: # o install csage headers # o install .pxi and .pxd files @@ -1546,13 +1479,6 @@ rm -fr %{buildroot}%{SAGE_DOC}/output/inventory find %{buildroot}%{SAGE_DOC} -type d -name _sources -exec rm -fr {} + %endif
-# remove .po files -rm %{buildroot}%{python3_sitearch}/sagenb/translations/*/LC_MESSAGES/*.po - -%if %{without sage3d} -rm -r %{buildroot}%{python3_sitearch}/sagenb/data/sage3d -%endif - # remove build directory in buildroot [ -d %{buildroot}%{SAGE_SRC}/build ] && rm -r %{buildroot}%{SAGE_SRC}/build @@ -1841,75 +1767,9 @@ rm -fr %{SAGE_LOCAL}/var/lib/sage/installed/database_cremona_ellcurve-%{cremona_ %endif
#------------------------------------------------------------------------ -%files notebook +%files jupyter %{SAGE_ETC}/notebook-ipython -# GPLv2+ -%{SAGE_SRC}/sagenb -%dir %{python3_sitearch}/sagenb -%{python3_sitearch}/sagenb/*.py* -%{python3_sitearch}/sagenb/__pycache__/ -%{python3_sitearch}/sagenb/data/__pycache__/ -%{python3_sitearch}/sagenb/testing/__pycache__/ -%{python3_sitearch}/sagenb-*.egg-info -%dir %{python3_sitearch}/sagenb/data -# BSD -%{python3_sitearch}/sagenb/data/codemirror -# MIT -%{python3_sitearch}/sagenb/data/graph_editor -# ASL 2.0 -%{python3_sitearch}/sagenb/data/highlight # LGPLv2+ -%{SAGE_SHARE}/jsmol -# (MIT or GPLv2) and (MIT and BSD and GPL) -%{python3_sitearch}/sagenb/data/jquery -# (MIT or GPLv2) and (MIT and BSD and GPL) -%{python3_sitearch}/sagenb/data/jqueryui -# Public Domain -%{python3_sitearch}/sagenb/data/json -# Symbolic link to $_jsdir/mathjax -%{python3_sitearch}/sagenb/data/mathjax -# Empty (do not run doctests flag file) -%{python3_sitearch}/sagenb/data/nodoctest.py* -# BSD -%{python3_sitearch}/sagenb/data/openid-realselector -# GPLv2+ -%{python3_sitearch}/sagenb/data/sage -%if %{with sage3d} -# GPLv2+ -%{python3_sitearch}/sagenb/data/sage3d -%endif -# LGPLv2+ -%{python3_sitearch}/sagenb/data/tiny_mce -# LGPLv2+ -%{python3_sitearch}/sagenb/data/zorn -# GPLv2+ -%{python3_sitearch}/sagenb/flask_version -# GPLv2+ -%{python3_sitearch}/sagenb/interfaces -# GPLv2+ -%{python3_sitearch}/sagenb/misc -# GPLv2+ -%{python3_sitearch}/sagenb/notebook -# GPLv2+ -%{python3_sitearch}/sagenb/simple -# GPLv2+ -%{python3_sitearch}/sagenb/storage -# GPLv2+ -%dir %{python3_sitearch}/sagenb/testing -%{python3_sitearch}/sagenb/testing/*.py* -%{python3_sitearch}/sagenb/testing/tests -# ASL 2.0 -%{python3_sitearch}/sagenb/testing/selenium -# GPLv2+ -%dir %{python3_sitearch}/sagenb/translations -%lang(cs_CZ) %{python3_sitearch}/sagenb/translations/cs_CZ -%lang(de_AT) %{python3_sitearch}/sagenb/translations/de_AT -%lang(de_AT) %{python3_sitearch}/sagenb/translations/en_US -%lang(de_AT) %{python3_sitearch}/sagenb/translations/es_ES -%lang(de_AT) %{python3_sitearch}/sagenb/translations/fr_FR -%lang(pt_BR) %{python3_sitearch}/sagenb/translations/pt_BR -%lang(ru_RU) %{python3_sitearch}/sagenb/translations/ru_RU -%lang(uk_UA) %{python3_sitearch}/sagenb/translations/uk_UA %if %{with bundled_widgetsnbextension} %config(noreplace) %{_sysconfdir}/jupyter/nbconfig/notebook.d/*.json %{_datadir}/jupyter/nbextensions/* @@ -1939,6 +1799,16 @@ rm -fr %{SAGE_LOCAL}/var/lib/sage/installed/database_cremona_ellcurve-%{cremona_
######################################################################## %changelog +* Fri Feb 28 2020 Jerry James loganjerry@gmail.com - 9.0-1 +- Version 9.0 (bz 1756780, 1770880) +- Drop upstreamed -ecm and -primecount patches +- Add -escape patch +- The old notebook (sagenb) is no longer shipped, so drop the -sagenb and + -sagenb-python3 patches, the -notebook subpackage, and some BRs +- New -jupyter subpackage +- Add suitesparse BR +- Drop pathlib2 BR (bz 1797116) + * Thu Jan 30 2020 Fedora Release Engineering releng@fedoraproject.org - 8.9-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
diff --git a/sources b/sources index 8e28ab9..a23c3dc 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (cremona-2016-10-17.tar.gz) = 61f55ec5c15e32b5fdaf1fe8f2f3d50ba9afa542d8634918ec9493d739127f8c06a44b3cb1227a2979522baf61951ac37a67ae2b12c920958b04f8198d07ff57 -SHA512 (sage-8.9.tar.gz) = 056646488f0b3fc092057c7ff807762c2f98d13748e14540ae9a67ceb3a3d62f8c0263c80c61a36c423353d7051e2dfae466a3f452f3910d9ba95ef26b385e94 +SHA512 (cremona-2019-10-29.tar.gz) = 32fbb828f26f87191e39123762cfbd796aac9abf346f0dc981e8e3f390435b22d281be3031ea92ae7e18f4ce41af8054784ca0d550a08f17b05c54ca08b4c9c8 +SHA512 (sage-9.0.tar.gz) = b0d3af3e8e9dd587314a33ec2f68e901dcd18cdd2cce4444fea5f04669dab6bb3e7db7642ff3e9ef1b1ffaf7a6f3c26272f889e1f5fb8fd63d5f5b68b5d168ed
arch-excludes@lists.fedoraproject.org