From 9a819e5da27dd8d775ee851837d69a6b1d5cd0df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Apitzsch?= Date: Sat, 30 May 2015 12:40:17 +0200 Subject: [PATCH 01/13] update sphinx package to 1.3.1 --- build/pkgs/sphinx/SPKG.txt | 9 ++++-- build/pkgs/sphinx/checksums.ini | 6 ++-- build/pkgs/sphinx/package-version.txt | 2 +- build/pkgs/sphinx/patches/Makefile.patch | 31 --------------------- build/pkgs/sphinx/patches/autodoc.patch | 10 +++---- build/pkgs/sphinx/patches/environment.patch | 4 +-- build/pkgs/sphinx/patches/setup.patch | 13 +++++++++ build/pkgs/sphinx/patches/theming.patch | 12 ++++++++ 8 files changed, 42 insertions(+), 45 deletions(-) create mode 100644 build/pkgs/sphinx/patches/setup.patch create mode 100644 build/pkgs/sphinx/patches/theming.patch diff --git a/build/pkgs/sphinx/SPKG.txt b/build/pkgs/sphinx/SPKG.txt index 0fa724f05b9..2d3d54255e8 100644 --- a/build/pkgs/sphinx/SPKG.txt +++ b/build/pkgs/sphinx/SPKG.txt @@ -20,9 +20,12 @@ Home Page: http://sphinx.pocoo.org, see also http://pypi.python.org/pypi/Sphinx == Dependencies == - * Jinja2 >= 2.2 - * Pygments >= 0.8 - * docutils >= 0.5 + * six >= 1.4 + * Jinja2 >= 2.3 + * Pygments >= 2.0 + * docutils >= 0.11 + * snowballstemmer >= 1.1 + * babel >= 1.3 * setuptools / distribute * Python * GNU patch (shipped with Sage) diff --git a/build/pkgs/sphinx/checksums.ini b/build/pkgs/sphinx/checksums.ini index 7eb5be5ea80..377579b9ebc 100644 --- a/build/pkgs/sphinx/checksums.ini +++ b/build/pkgs/sphinx/checksums.ini @@ -1,4 +1,4 @@ tarball=Sphinx-VERSION.tar.gz -sha1=9e424b03fe1f68e0326f3905738adcf27782f677 -md5=3dc73ccaa8d0bfb2d62fb671b1f7e8a4 -cksum=3972992129 +sha1=c2288193166ee1f276b5f35a960e1d1e49aa74d4 +md5=8786a194acf9673464c5455b11fd4332 +cksum=1519809399 diff --git a/build/pkgs/sphinx/package-version.txt b/build/pkgs/sphinx/package-version.txt index aae5f783ddf..3a3cd8cc8b0 100644 --- a/build/pkgs/sphinx/package-version.txt +++ b/build/pkgs/sphinx/package-version.txt @@ -1 +1 @@ -1.2.2.p0 +1.3.1 diff --git a/build/pkgs/sphinx/patches/Makefile.patch b/build/pkgs/sphinx/patches/Makefile.patch index 8dfd02f3ba1..d75c9848e92 100644 --- a/build/pkgs/sphinx/patches/Makefile.patch +++ b/build/pkgs/sphinx/patches/Makefile.patch @@ -9,34 +9,3 @@ diff -ur src/sphinx/texinputs/Makefile src.patched/sphinx/texinputs/Makefile all: $(ALLPDF) all-pdf: $(ALLPDF) -@@ -43,20 +44,20 @@ - # The number of LaTeX runs is quite conservative, but I don't expect it - # to get run often, so the little extra time won't hurt. - %.dvi: %.tex -- latex $(LATEXOPTS) '$<' -- latex $(LATEXOPTS) '$<' -- latex $(LATEXOPTS) '$<' -+ env =2.0', + 'docutils>=0.11', + 'snowballstemmer>=1.1', +- 'babel>=1.3', +- 'alabaster>=0.7,<0.8', +- 'sphinx_rtd_theme>=0.1,<0.2', ++ 'babel>=1.3' + ] + extras_require = { + # Environment Marker works for wheel 0.24 or later diff --git a/build/pkgs/sphinx/patches/theming.patch b/build/pkgs/sphinx/patches/theming.patch new file mode 100644 index 00000000000..a0e313a3380 --- /dev/null +++ b/build/pkgs/sphinx/patches/theming.patch @@ -0,0 +1,12 @@ +--- Sphinx-1.3.1/sphinx/theming.py 2014-03-02 20:38:09.000000000 +1300 ++++ Sphinx-1.3.1/sphinx/theming.py 2014-10-19 23:35:17.000000000 +1300 +@@ -26,9 +26,6 @@ + from sphinx import package_dir + from sphinx.errors import ThemeError + +-import alabaster +-import sphinx_rtd_theme +- + NODEFAULT = object() + THEMECONF = 'theme.conf' + From 1d1a55e6d16179a22dd4bdbc6129ec4bf28d6019 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Apitzsch?= Date: Sat, 30 May 2015 12:41:21 +0200 Subject: [PATCH 02/13] fix some deprecation warnings --- src/doc/common/conf.py | 4 ++-- src/doc/common/themes/sage/theme.conf | 2 +- src/doc/common/themes/sageref/theme.conf | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/doc/common/conf.py b/src/doc/common/conf.py index 540cf81561e..16fce39cd61 100644 --- a/src/doc/common/conf.py +++ b/src/doc/common/conf.py @@ -724,9 +724,9 @@ def find_sage_dangling_links(app, env, node, contnode): # link to the Python documentation several links where broken because there # where class listed as functions. Expand the list 'base_class_as_func' # above instead of marking the link as broken. -nitpick_ignore = ( +nitpick_ignore = [ ('py:class', 'twisted.web2.resource.Resource'), - ('py:class', 'twisted.web2.resource.PostableResource')) + ('py:class', 'twisted.web2.resource.PostableResource')] def nitpick_patch_config(app): """ diff --git a/src/doc/common/themes/sage/theme.conf b/src/doc/common/themes/sage/theme.conf index 4fbb8e4bb16..3d8462793bd 100644 --- a/src/doc/common/themes/sage/theme.conf +++ b/src/doc/common/themes/sage/theme.conf @@ -1,5 +1,5 @@ [theme] -inherit = default +inherit = classic stylesheet = sage.css pygments_style = sphinx diff --git a/src/doc/common/themes/sageref/theme.conf b/src/doc/common/themes/sageref/theme.conf index 4fbb8e4bb16..3d8462793bd 100644 --- a/src/doc/common/themes/sageref/theme.conf +++ b/src/doc/common/themes/sageref/theme.conf @@ -1,5 +1,5 @@ [theme] -inherit = default +inherit = classic stylesheet = sage.css pygments_style = sphinx From ad77f3270eca3c254cb43607fef839e7a4c99baa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Apitzsch?= Date: Sun, 28 Jun 2015 02:42:52 +0200 Subject: [PATCH 03/13] fix orphan setting --- src/sage_setup/docbuild/ext/multidocs.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sage_setup/docbuild/ext/multidocs.py b/src/sage_setup/docbuild/ext/multidocs.py index 5d23a17b8c8..16ae1e13055 100644 --- a/src/sage_setup/docbuild/ext/multidocs.py +++ b/src/sage_setup/docbuild/ext/multidocs.py @@ -74,8 +74,8 @@ def merge_environment(app, env): # needed by env.check_consistency (sphinx.environement, line 1734) for ind in newalldoc: # treat subdocument source as orphaned file and don't complain - md = env.metadata.get(ind, set()) - md.add('orphan') + md = env.metadata.get(ind, dict()) + md['orphan'] = 1 env.metadata[ind] = md # merge the citations newcite = {} From 0c2d32b91311978d12d29f40d7be7583b4613540 Mon Sep 17 00:00:00 2001 From: "John H. Palmieri" Date: Mon, 16 Nov 2015 19:51:23 -0800 Subject: [PATCH 04/13] Use exclude_patterns instead of exclude_trees --- src/doc/common/conf.py | 16 ++++++++-------- src/doc/en/reference/conf.py | 4 ++-- src/doc/en/reference/conf_sub.py | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/doc/common/conf.py b/src/doc/common/conf.py index 16fce39cd61..c75f95b014a 100644 --- a/src/doc/common/conf.py +++ b/src/doc/common/conf.py @@ -75,12 +75,11 @@ def sphinx_plot(plot): # Else, today_fmt is used as the format for a strftime call. #today_fmt = '%B %d, %Y' -# List of documents that shouldn't be included in the build. -#unused_docs = [] - -# List of directories, relative to source directory, that shouldn't be searched -# for source files. -exclude_trees = ['.build'] +# List of glob-style patterns that should be excluded when looking for +# source files. [1] They are matched against the source file names +# relative to the source directory, using slashes as directory +# separators on all platforms. +exclude_patterns = ['.build'] # The reST default role (used for this markup: `text`) to use for all documents. default_role = 'math' @@ -227,8 +226,9 @@ def set_intersphinx_mappings(app): mathjax_static = os.path.join(sagenb_path, mathjax_relative) html_static_path.append(mathjax_static) - exclude_patterns=['**/'+os.path.join(mathjax_relative, i) for i in ('docs', 'README*', 'test', - 'unpacked', 'LICENSE')] + exclude_patterns += ['**/'+os.path.join(mathjax_relative, i) + for i in ('docs', 'README*', 'test', + 'unpacked', 'LICENSE')] else: extensions.append('sphinx.ext.pngmath') diff --git a/src/doc/en/reference/conf.py b/src/doc/en/reference/conf.py index 261ded54e2b..9e557175453 100644 --- a/src/doc/en/reference/conf.py +++ b/src/doc/en/reference/conf.py @@ -53,7 +53,7 @@ ''' #Ignore all .rst in the _sage subdirectory -exclude_trees = exclude_trees + ['_sage'] +exclude_patterns = exclude_patterns + ['_sage'] multidocs_is_master = True @@ -67,6 +67,6 @@ # List of directories, relative to source directory, that shouldn't be # searched for source files. -exclude_trees += multidocs_subdoc_list + [ +exclude_patterns += multidocs_subdoc_list + [ 'sage', 'sagenb', 'options' ] diff --git a/src/doc/en/reference/conf_sub.py b/src/doc/en/reference/conf_sub.py index 15cc05564f0..078e0dc7de9 100644 --- a/src/doc/en/reference/conf_sub.py +++ b/src/doc/en/reference/conf_sub.py @@ -62,6 +62,6 @@ ] #Ignore all .rst in the _sage subdirectory -exclude_trees = exclude_trees + ['_sage'] +exclude_patterns = exclude_patterns + ['_sage'] multidocs_is_master = False From 8994b2ead5a960794bcf5800411b5de1511cc9bd Mon Sep 17 00:00:00 2001 From: Jeroen Demeyer Date: Wed, 6 Apr 2016 19:44:25 +0200 Subject: [PATCH 05/13] Upgrade to Sphinx 1.4.1 --- build/pkgs/alabaster/SPKG.txt | 13 ++++++ build/pkgs/alabaster/checksums.ini | 4 ++ build/pkgs/alabaster/dependencies | 5 +++ build/pkgs/alabaster/package-version.txt | 1 + build/pkgs/alabaster/spkg-install | 3 ++ build/pkgs/alabaster/type | 1 + build/pkgs/imagesize/SPKG.txt | 5 +++ build/pkgs/imagesize/checksums.ini | 4 ++ build/pkgs/imagesize/dependencies | 5 +++ build/pkgs/imagesize/package-version.txt | 1 + build/pkgs/imagesize/spkg-install | 3 ++ build/pkgs/imagesize/type | 1 + build/pkgs/snowballstemmer/SPKG.txt | 25 +++++++++++ build/pkgs/snowballstemmer/checksums.ini | 4 ++ build/pkgs/snowballstemmer/dependencies | 5 +++ .../pkgs/snowballstemmer/package-version.txt | 1 + build/pkgs/snowballstemmer/spkg-install | 3 ++ build/pkgs/snowballstemmer/type | 1 + build/pkgs/sphinx/SPKG.txt | 36 --------------- build/pkgs/sphinx/checksums.ini | 6 +-- build/pkgs/sphinx/dependencies | 2 +- build/pkgs/sphinx/package-version.txt | 2 +- build/pkgs/sphinx/patches/Makefile.patch | 28 ++++++++---- build/pkgs/sphinx/patches/autodoc.patch | 44 ------------------- build/pkgs/sphinx/patches/environment.patch | 2 + build/pkgs/sphinx/patches/inline-latex.patch | 40 ----------------- build/pkgs/sphinx/patches/latex_list.patch | 23 ++++++++++ .../{pngmath.patch => latex_utf8.patch} | 5 +++ build/pkgs/sphinx/patches/nested.patch | 20 --------- build/pkgs/sphinx/patches/setup.patch | 13 ------ build/pkgs/sphinx/patches/theming.patch | 12 ----- 31 files changed, 139 insertions(+), 179 deletions(-) create mode 100644 build/pkgs/alabaster/SPKG.txt create mode 100644 build/pkgs/alabaster/checksums.ini create mode 100644 build/pkgs/alabaster/dependencies create mode 100644 build/pkgs/alabaster/package-version.txt create mode 100755 build/pkgs/alabaster/spkg-install create mode 100644 build/pkgs/alabaster/type create mode 100644 build/pkgs/imagesize/SPKG.txt create mode 100644 build/pkgs/imagesize/checksums.ini create mode 100644 build/pkgs/imagesize/dependencies create mode 100644 build/pkgs/imagesize/package-version.txt create mode 100755 build/pkgs/imagesize/spkg-install create mode 100644 build/pkgs/imagesize/type create mode 100644 build/pkgs/snowballstemmer/SPKG.txt create mode 100644 build/pkgs/snowballstemmer/checksums.ini create mode 100644 build/pkgs/snowballstemmer/dependencies create mode 100644 build/pkgs/snowballstemmer/package-version.txt create mode 100755 build/pkgs/snowballstemmer/spkg-install create mode 100644 build/pkgs/snowballstemmer/type delete mode 100644 build/pkgs/sphinx/patches/autodoc.patch delete mode 100644 build/pkgs/sphinx/patches/inline-latex.patch create mode 100644 build/pkgs/sphinx/patches/latex_list.patch rename build/pkgs/sphinx/patches/{pngmath.patch => latex_utf8.patch} (65%) delete mode 100644 build/pkgs/sphinx/patches/nested.patch delete mode 100644 build/pkgs/sphinx/patches/setup.patch delete mode 100644 build/pkgs/sphinx/patches/theming.patch diff --git a/build/pkgs/alabaster/SPKG.txt b/build/pkgs/alabaster/SPKG.txt new file mode 100644 index 00000000000..b6f8231441d --- /dev/null +++ b/build/pkgs/alabaster/SPKG.txt @@ -0,0 +1,13 @@ += alabaster = + +== Description == + +Alabaster is a visually (c)lean, responsive, configurable theme for the Sphinx +documentation system. It is Python 2+3 compatible. + +It began as a third-party theme, and is still maintained separately, but as of +Sphinx 1.3, Alabaster is an install-time dependency of Sphinx and is selected +as the default theme. + +Live examples of this theme can be seen on paramiko.org, fabfile.org and +pyinvoke.org. diff --git a/build/pkgs/alabaster/checksums.ini b/build/pkgs/alabaster/checksums.ini new file mode 100644 index 00000000000..85eadfd1bd5 --- /dev/null +++ b/build/pkgs/alabaster/checksums.ini @@ -0,0 +1,4 @@ +tarball=alabaster-VERSION.tar.gz +sha1=ff3e575ee7eb4ba1721f17d91ec5a54b16283603 +md5=957c665d7126dea8121f98038debcba7 +cksum=738605178 diff --git a/build/pkgs/alabaster/dependencies b/build/pkgs/alabaster/dependencies new file mode 100644 index 00000000000..d5dab729e18 --- /dev/null +++ b/build/pkgs/alabaster/dependencies @@ -0,0 +1,5 @@ +$(PYTHON) | pip + +---------- +All lines of this file are ignored except the first. +It is copied by SAGE_ROOT/build/make/install into SAGE_ROOT/build/make/Makefile. diff --git a/build/pkgs/alabaster/package-version.txt b/build/pkgs/alabaster/package-version.txt new file mode 100644 index 00000000000..879be8a98fc --- /dev/null +++ b/build/pkgs/alabaster/package-version.txt @@ -0,0 +1 @@ +0.7.7 diff --git a/build/pkgs/alabaster/spkg-install b/build/pkgs/alabaster/spkg-install new file mode 100755 index 00000000000..afb3f302fd1 --- /dev/null +++ b/build/pkgs/alabaster/spkg-install @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +cd src && python setup.py install diff --git a/build/pkgs/alabaster/type b/build/pkgs/alabaster/type new file mode 100644 index 00000000000..a6a7b9cd726 --- /dev/null +++ b/build/pkgs/alabaster/type @@ -0,0 +1 @@ +standard diff --git a/build/pkgs/imagesize/SPKG.txt b/build/pkgs/imagesize/SPKG.txt new file mode 100644 index 00000000000..2ec0272eda7 --- /dev/null +++ b/build/pkgs/imagesize/SPKG.txt @@ -0,0 +1,5 @@ += imagesize = + +== Description == + +It parses image files' header and return image size. diff --git a/build/pkgs/imagesize/checksums.ini b/build/pkgs/imagesize/checksums.ini new file mode 100644 index 00000000000..c4b13a984c2 --- /dev/null +++ b/build/pkgs/imagesize/checksums.ini @@ -0,0 +1,4 @@ +tarball=imagesize-VERSION.tar.gz +sha1=cf95cf234c88d5400acfa922cdc3c1f5b6a7e713 +md5=23cb4b0b5ec76fb26942d6cc0b1cf31c +cksum=40173098 diff --git a/build/pkgs/imagesize/dependencies b/build/pkgs/imagesize/dependencies new file mode 100644 index 00000000000..d5dab729e18 --- /dev/null +++ b/build/pkgs/imagesize/dependencies @@ -0,0 +1,5 @@ +$(PYTHON) | pip + +---------- +All lines of this file are ignored except the first. +It is copied by SAGE_ROOT/build/make/install into SAGE_ROOT/build/make/Makefile. diff --git a/build/pkgs/imagesize/package-version.txt b/build/pkgs/imagesize/package-version.txt new file mode 100644 index 00000000000..faef31a4357 --- /dev/null +++ b/build/pkgs/imagesize/package-version.txt @@ -0,0 +1 @@ +0.7.0 diff --git a/build/pkgs/imagesize/spkg-install b/build/pkgs/imagesize/spkg-install new file mode 100755 index 00000000000..afb3f302fd1 --- /dev/null +++ b/build/pkgs/imagesize/spkg-install @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +cd src && python setup.py install diff --git a/build/pkgs/imagesize/type b/build/pkgs/imagesize/type new file mode 100644 index 00000000000..a6a7b9cd726 --- /dev/null +++ b/build/pkgs/imagesize/type @@ -0,0 +1 @@ +standard diff --git a/build/pkgs/snowballstemmer/SPKG.txt b/build/pkgs/snowballstemmer/SPKG.txt new file mode 100644 index 00000000000..8a649d28043 --- /dev/null +++ b/build/pkgs/snowballstemmer/SPKG.txt @@ -0,0 +1,25 @@ += snowballstemmer = + +== Description == + +This package provides 16 stemmer algorithms (15 + Poerter English stemmer) generated from Snowball algorithms. + +It includes following language algorithms: + + Danish + Dutch + English (Standard, Porter) + Finnish + French + German + Hungarian + Italian + Norwegian + Portuguese + Romanian + Russian + Spanish + Swedish + Turkish + +This is a pure Python stemming library. If PyStemmer is available, this module uses it to accelerate. diff --git a/build/pkgs/snowballstemmer/checksums.ini b/build/pkgs/snowballstemmer/checksums.ini new file mode 100644 index 00000000000..6068faf5d09 --- /dev/null +++ b/build/pkgs/snowballstemmer/checksums.ini @@ -0,0 +1,4 @@ +tarball=snowballstemmer-VERSION.tar.gz +sha1=377be08ed935d401a53cba79319d1812cfe46b81 +md5=643b019667a708a922172e33a99bf2fa +cksum=4243688392 diff --git a/build/pkgs/snowballstemmer/dependencies b/build/pkgs/snowballstemmer/dependencies new file mode 100644 index 00000000000..d5dab729e18 --- /dev/null +++ b/build/pkgs/snowballstemmer/dependencies @@ -0,0 +1,5 @@ +$(PYTHON) | pip + +---------- +All lines of this file are ignored except the first. +It is copied by SAGE_ROOT/build/make/install into SAGE_ROOT/build/make/Makefile. diff --git a/build/pkgs/snowballstemmer/package-version.txt b/build/pkgs/snowballstemmer/package-version.txt new file mode 100644 index 00000000000..6085e946503 --- /dev/null +++ b/build/pkgs/snowballstemmer/package-version.txt @@ -0,0 +1 @@ +1.2.1 diff --git a/build/pkgs/snowballstemmer/spkg-install b/build/pkgs/snowballstemmer/spkg-install new file mode 100755 index 00000000000..afb3f302fd1 --- /dev/null +++ b/build/pkgs/snowballstemmer/spkg-install @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +cd src && python setup.py install diff --git a/build/pkgs/snowballstemmer/type b/build/pkgs/snowballstemmer/type new file mode 100644 index 00000000000..a6a7b9cd726 --- /dev/null +++ b/build/pkgs/snowballstemmer/type @@ -0,0 +1 @@ +standard diff --git a/build/pkgs/sphinx/SPKG.txt b/build/pkgs/sphinx/SPKG.txt index 2d3d54255e8..fce17ba0963 100644 --- a/build/pkgs/sphinx/SPKG.txt +++ b/build/pkgs/sphinx/SPKG.txt @@ -32,42 +32,6 @@ Home Page: http://sphinx.pocoo.org, == Special Update/Build Instructions == - * Here is a description of patches on top of upstream Sphinx: - - - patches/autodoc.patch: This patches - src/sphinx/ext/autodoc.py. This adds an option to Sphinx to - provide a function to get the argspecs of built-in functions. - - - patches/environment.patch: This patches the file - src/sphinx/environment.py. Patching it should prevent Sphinx - from rebuilding documentation that is already built. - - - patches/highlighting.patch: This patches the file - src/sphinx/highlighting.py. The patch should allow Sphinx to - recognize the Sage prompt "sage:" the same way it recognizes the - ">>>" from Python. - - - patches/inline-latex.patch: see Trac #16396 and - https://bitbucket.org/birkenfeld/sphinx/issue/1480/latex-math-output-is-broken-for-inline - - - patches/pngmath.patch: This replaces \usepackage[utf8x]{inputenc} - by \usepackage[utf8]{inputenc} in the LaTeX preamble for building - images in the HTML documentation. This change is done because - some LaTeX installations have only utf8, not utf8x (utf8x adds - support for much more Unicode characters, but these are not - needed to typeset the mathematics in the Sage documentation). - - - patches/Makefile.patch: This patches the file - src/sphinx/texinputs/Makefile to increase the memory sizes for - LaTeX. These increased stack sizes should be sufficient for LaTeX - to handle the huge index of the Sage reference manual when - building the PDF version of that manual. - - - patches/nested.patch (submitted upstream: pull request #250, issue #777): - This changes the sphinx's customized Verbatim environment to use - \trivlist instead of \list. This fixes the pdf docbuild for - deeply nested classes/methods revealed in #9107. - * The script create_grammar_pickle.py creates the file Grammar2.7.pickle in site-packages/Sphinx-.../sphinx/pycode/. This helps to avoid race conditions when building the documentation in diff --git a/build/pkgs/sphinx/checksums.ini b/build/pkgs/sphinx/checksums.ini index 377579b9ebc..70b234a26bf 100644 --- a/build/pkgs/sphinx/checksums.ini +++ b/build/pkgs/sphinx/checksums.ini @@ -1,4 +1,4 @@ tarball=Sphinx-VERSION.tar.gz -sha1=c2288193166ee1f276b5f35a960e1d1e49aa74d4 -md5=8786a194acf9673464c5455b11fd4332 -cksum=1519809399 +sha1=d18b856710b22ae9740147e21754ca5b851af9b2 +md5=4c4988e0306a04cef8dccc384281e585 +cksum=282370994 diff --git a/build/pkgs/sphinx/dependencies b/build/pkgs/sphinx/dependencies index c7304ef9c38..cc22818e6d1 100644 --- a/build/pkgs/sphinx/dependencies +++ b/build/pkgs/sphinx/dependencies @@ -1,4 +1,4 @@ -$(PYTHON) setuptools docutils jinja2 pygments +$(PYTHON) | setuptools docutils jinja2 pygments six snowballstemmer imagesize babel alabaster ---------- All lines of this file are ignored except the first. diff --git a/build/pkgs/sphinx/package-version.txt b/build/pkgs/sphinx/package-version.txt index 3a3cd8cc8b0..cc6f9934c2e 100644 --- a/build/pkgs/sphinx/package-version.txt +++ b/build/pkgs/sphinx/package-version.txt @@ -1 +1 @@ -1.3.1 +1.4.1.p0 diff --git a/build/pkgs/sphinx/patches/Makefile.patch b/build/pkgs/sphinx/patches/Makefile.patch index d75c9848e92..8b695e32a57 100644 --- a/build/pkgs/sphinx/patches/Makefile.patch +++ b/build/pkgs/sphinx/patches/Makefile.patch @@ -1,11 +1,21 @@ -diff -ur src/sphinx/texinputs/Makefile src.patched/sphinx/texinputs/Makefile ---- src/sphinx/texinputs/Makefile 2011-11-01 08:38:44.000000000 +0100 -+++ src.patched/sphinx/texinputs/Makefile 2012-02-28 22:04:56.438373064 +0100 -@@ -8,6 +8,7 @@ - ARCHIVEPRREFIX = - # Additional LaTeX options - LATEXOPTS = -+LATEXENV = pool_size=4000000 save_size=50000 extra_mem_top=2000000 +Increase the memory sizes for LaTeX + +These increased stack sizes should be sufficient for LaTeX to handle the +huge index of the Sage PDF reference manual. + +diff -ru a/sphinx/texinputs/Makefile b/sphinx/texinputs/Makefile +--- a/sphinx/texinputs/Makefile 2016-03-06 06:25:30.000000000 +0100 ++++ b/sphinx/texinputs/Makefile 2016-04-06 19:33:07.248103397 +0200 +@@ -11,8 +11,10 @@ + # format: pdf or dvi + FMT = pdf + +-LATEX = latex +-PDFLATEX = pdflatex ++LATEXENV = env pool_size=4000000 save_size=50000 extra_mem_top=2000000 ++ ++LATEX = $(LATEXENV) latex ++PDFLATEX = $(LATEXENV) pdflatex + MAKEINDEX = makeindex all: $(ALLPDF) - all-pdf: $(ALLPDF) diff --git a/build/pkgs/sphinx/patches/autodoc.patch b/build/pkgs/sphinx/patches/autodoc.patch deleted file mode 100644 index 1ed24280667..00000000000 --- a/build/pkgs/sphinx/patches/autodoc.patch +++ /dev/null @@ -1,44 +0,0 @@ ---- Sphinx-1.2.2/sphinx/ext/autodoc.py.orig 2014-03-02 20:38:09.000000000 +1300 -+++ Sphinx-1.2.2/sphinx/ext/autodoc.py 2014-10-19 23:02:09.000000000 +1300 -@@ -1043,8 +1043,13 @@ - def format_args(self): - if inspect.isbuiltin(self.object) or \ - inspect.ismethoddescriptor(self.object): -- # cannot introspect arguments of a C function or method -- return None -+ # can never get arguments of a C function or method unless -+ # a function to do so is supplied -+ if self.env.config.autodoc_builtin_argspec: -+ argspec = self.env.config.autodoc_builtin_argspec(self.object) -+ return inspect.formatargspec(*argspec) -+ else: -+ return None - try: - argspec = getargspec(self.object) - except TypeError: -@@ -1278,9 +1283,14 @@ - def format_args(self): - if inspect.isbuiltin(self.object) or \ - inspect.ismethoddescriptor(self.object): -- # can never get arguments of a C function or method -- return None -- argspec = getargspec(self.object) -+ # can never get arguments of a C function or method unless -+ # a function to do so is supplied -+ if self.env.config.autodoc_builtin_argspec: -+ argspec = self.env.config.autodoc_builtin_argspec(self.object) -+ else: -+ return None -+ else: -+ argspec = getargspec(self.object) - if argspec[0] and argspec[0][0] in ('cls', 'self'): - del argspec[0][0] - return inspect.formatargspec(*argspec) -@@ -1518,6 +1528,7 @@ - - app.add_config_value('autoclass_content', 'class', True) - app.add_config_value('autodoc_member_order', 'alphabetic', True) -+ app.add_config_value('autodoc_builtin_argspec', None, True) - app.add_config_value('autodoc_default_flags', [], True) - app.add_config_value('autodoc_docstring_signature', True, True) - app.add_event('autodoc-process-docstring') diff --git a/build/pkgs/sphinx/patches/environment.patch b/build/pkgs/sphinx/patches/environment.patch index 1a78a8d137b..d14ae5d7920 100644 --- a/build/pkgs/sphinx/patches/environment.patch +++ b/build/pkgs/sphinx/patches/environment.patch @@ -1,3 +1,5 @@ +Prevent Sphinx from rebuilding documentation that is already built + --- Sphinx-1.2.2/sphinx/environment.py.orig 2014-03-02 20:38:09.000000000 +1300 +++ Sphinx-1.2.2/sphinx/environment.py 2014-10-19 23:31:15.000000000 +1300 @@ -540,10 +540,13 @@ diff --git a/build/pkgs/sphinx/patches/inline-latex.patch b/build/pkgs/sphinx/patches/inline-latex.patch deleted file mode 100644 index fb292858682..00000000000 --- a/build/pkgs/sphinx/patches/inline-latex.patch +++ /dev/null @@ -1,40 +0,0 @@ ---- src/sphinx/writers/latex.py.orig 2014-06-05 23:38:03.808669401 -0500 -+++ src/sphinx/writers/latex.py 2014-06-05 23:27:22.752376713 -0500 -@@ -264,6 +264,7 @@ - self.next_figure_ids = set() - self.next_table_ids = set() - # flags -+ self.verbatim = False - self.in_title = 0 - self.in_production_list = 0 - self.in_footnote = 0 -@@ -1319,6 +1320,7 @@ - (self.curfilestack[-1], node.line)) - if node.rawsource != node.astext(): - # most probably a parsed-literal block -- don't highlight -+ self.verbatim = True - self.body.append('\\begin{alltt}\n') - else: - code = node.astext().rstrip('\n') -@@ -1351,6 +1353,7 @@ - raise nodes.SkipNode - def depart_literal_block(self, node): - self.body.append('\n\\end{alltt}\n') -+ self.verbatim = False - visit_doctest_block = visit_literal_block - depart_doctest_block = depart_literal_block - ---- src/sphinx/ext/mathbase.py.orig 2014-06-05 23:39:36.773293241 -0500 -+++ src/sphinx/ext/mathbase.py 2014-06-05 23:18:53.949020605 -0500 -@@ -88,7 +88,10 @@ - - - def latex_visit_math(self, node): -- self.body.append('\\(' + node['latex'] + '\\)') -+ if self.verbatim: -+ self.body.append('\\(' + node['latex'] + '\\)') -+ else: -+ self.body.append('$' + node['latex'] + '$') - raise nodes.SkipNode - - def latex_visit_displaymath(self, node): diff --git a/build/pkgs/sphinx/patches/latex_list.patch b/build/pkgs/sphinx/patches/latex_list.patch new file mode 100644 index 00000000000..b5b7e87998b --- /dev/null +++ b/build/pkgs/sphinx/patches/latex_list.patch @@ -0,0 +1,23 @@ +Fix https://github.com/sphinx-doc/sphinx/issues/777 + +diff -ru a/sphinx/texinputs/sphinx.sty b/sphinx/texinputs/sphinx.sty +--- a/sphinx/texinputs/sphinx.sty 2016-04-12 15:07:10.000000000 +0200 ++++ b/sphinx/texinputs/sphinx.sty 2016-04-22 22:24:13.671897443 +0200 +@@ -264,7 +264,7 @@ + \global\Sphinx@myfirstframedpasstrue + % The list environement is needed to control perfectly the vertical + % space. +- \list{}{% ++ \trivlist{}{% + \setlength\parskip{0pt}% + \setlength\itemsep{0ex}% + \setlength\topsep{0ex}% +@@ -278,7 +278,7 @@ + \renewcommand{\endVerbatim}{% + \endOriginalVerbatim + \endMakeFramed +- \endlist ++ \endtrivlist + % LaTeX environments always revert local changes on exit, here e.g. \parskip + } + diff --git a/build/pkgs/sphinx/patches/pngmath.patch b/build/pkgs/sphinx/patches/latex_utf8.patch similarity index 65% rename from build/pkgs/sphinx/patches/pngmath.patch rename to build/pkgs/sphinx/patches/latex_utf8.patch index 1356e67d6a4..63d266192a3 100644 --- a/build/pkgs/sphinx/patches/pngmath.patch +++ b/build/pkgs/sphinx/patches/latex_utf8.patch @@ -1,3 +1,8 @@ +Some LaTeX installations have only utf8, not utf8x + +utf8x adds support for much more Unicode characters, but these are not +needed to typeset the mathematics in the Sage documentation + --- Sphinx-1.2.2/sphinx/ext/pngmath.py.orig 2014-03-02 20:38:09.000000000 +1300 +++ Sphinx-1.2.2/sphinx/ext/pngmath.py 2014-10-19 23:35:17.000000000 +1300 @@ -42,7 +42,7 @@ diff --git a/build/pkgs/sphinx/patches/nested.patch b/build/pkgs/sphinx/patches/nested.patch deleted file mode 100644 index 1866110e38a..00000000000 --- a/build/pkgs/sphinx/patches/nested.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- Sphinx-1.2.2/sphinx/texinputs/sphinx.sty.orig 2014-01-12 02:52:54.000000000 +1300 -+++ Sphinx-1.2.2/sphinx/texinputs/sphinx.sty 2014-10-19 23:34:18.000000000 +1300 -@@ -167,7 +167,7 @@ - \smallskip% - % The list environement is needed to control perfectly the vertical - % space. -- \list{}{% -+ \trivlist{}{% using trivlist rather than list fixes #777 (too deeply nested error) - \setlength\parskip{0pt}% - \setlength\itemsep{0ex}% - \setlength\topsep{0ex}% -@@ -181,7 +181,7 @@ - \renewcommand{\endVerbatim}{% - \endOriginalVerbatim% - \endMakeFramed% -- \endlist% -+ \endtrivlist% - % close group to restore \parskip - \egroup% - } diff --git a/build/pkgs/sphinx/patches/setup.patch b/build/pkgs/sphinx/patches/setup.patch deleted file mode 100644 index d95fd42ec56..00000000000 --- a/build/pkgs/sphinx/patches/setup.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- Sphinx-1.3.1/setup.py 2014-03-02 20:38:09.000000000 +1300 -+++ Sphinx-1.3.1/setup.py 2014-10-19 23:35:17.000000000 +1300 -@@ -51,9 +51,7 @@ - 'Pygments>=2.0', - 'docutils>=0.11', - 'snowballstemmer>=1.1', -- 'babel>=1.3', -- 'alabaster>=0.7,<0.8', -- 'sphinx_rtd_theme>=0.1,<0.2', -+ 'babel>=1.3' - ] - extras_require = { - # Environment Marker works for wheel 0.24 or later diff --git a/build/pkgs/sphinx/patches/theming.patch b/build/pkgs/sphinx/patches/theming.patch deleted file mode 100644 index a0e313a3380..00000000000 --- a/build/pkgs/sphinx/patches/theming.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- Sphinx-1.3.1/sphinx/theming.py 2014-03-02 20:38:09.000000000 +1300 -+++ Sphinx-1.3.1/sphinx/theming.py 2014-10-19 23:35:17.000000000 +1300 -@@ -26,9 +26,6 @@ - from sphinx import package_dir - from sphinx.errors import ThemeError - --import alabaster --import sphinx_rtd_theme -- - NODEFAULT = object() - THEMECONF = 'theme.conf' - From d8bd358682d6f207776dd7ffde37460a3270d6d0 Mon Sep 17 00:00:00 2001 From: Jeroen Demeyer Date: Fri, 22 Apr 2016 18:36:53 +0200 Subject: [PATCH 06/13] Use object_description() instead of safe_repr() --- src/sage_setup/docbuild/ext/sage_autodoc.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/sage_setup/docbuild/ext/sage_autodoc.py b/src/sage_setup/docbuild/ext/sage_autodoc.py index e90fe11a3d8..392b7aa50a4 100644 --- a/src/sage_setup/docbuild/ext/sage_autodoc.py +++ b/src/sage_setup/docbuild/ext/sage_autodoc.py @@ -41,7 +41,7 @@ from sphinx.util.nodes import nested_parse_with_titles from sphinx.util.compat import Directive from sphinx.util.inspect import getargspec, isdescriptor, safe_getmembers, \ - safe_getattr, safe_repr, is_builtin_class_method + safe_getattr, object_description, is_builtin_class_method from sphinx.util.docstrings import prepare_docstring from sage.misc.sageinspect import (sage_getdoc_original, @@ -49,11 +49,6 @@ from sage.misc.lazy_import import LazyImport -_re_address = re.compile(" *at 0x[0-9a-fA-F]+") -def object_description(*args): - return _re_address.sub("", safe_repr(*args)) - - #: extended signature RE: with explicit module name separated by :: py_ext_sig_re = re.compile( r'''^ ([\w.]+::)? # explicit module name From eb4b2639a33868445db100cc4698dcbaf2f8cf66 Mon Sep 17 00:00:00 2001 From: Jeroen Demeyer Date: Fri, 8 Apr 2016 10:54:42 +0200 Subject: [PATCH 07/13] Fix frompickle() call --- src/sage_setup/docbuild/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sage_setup/docbuild/__init__.py b/src/sage_setup/docbuild/__init__.py index 6bfe38eb828..069c0a9123e 100644 --- a/src/sage_setup/docbuild/__init__.py +++ b/src/sage_setup/docbuild/__init__.py @@ -767,7 +767,7 @@ class Foo(object): env_pickle = os.path.join(self._doctrees_dir(), 'environment.pickle') try: - env = BuildEnvironment.frompickle(config, env_pickle) + env = BuildEnvironment.frompickle(self.dir, config, env_pickle) logger.debug("Opened Sphinx environment: %s", env_pickle) return env except IOError as err: From 496b2849fe0cd1eb96b1eb94453e2b935cd96473 Mon Sep 17 00:00:00 2001 From: Jeroen Demeyer Date: Fri, 8 Apr 2016 16:43:44 +0200 Subject: [PATCH 08/13] Use ref_context instead of temp_data --- src/sage_setup/docbuild/ext/sage_autodoc.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/sage_setup/docbuild/ext/sage_autodoc.py b/src/sage_setup/docbuild/ext/sage_autodoc.py index 392b7aa50a4..b26c47aeee3 100644 --- a/src/sage_setup/docbuild/ext/sage_autodoc.py +++ b/src/sage_setup/docbuild/ext/sage_autodoc.py @@ -889,7 +889,7 @@ def resolve_name(self, modname, parents, path, base): modname = self.env.temp_data.get('autodoc:module') # ... or in the scope of a module directive if not modname: - modname = self.env.temp_data.get('py:module') + modname = self.env.ref_context.get('py:module') # ... else, it stays None, which means invalid return modname, parents + [base] @@ -911,7 +911,7 @@ def resolve_name(self, modname, parents, path, base): mod_cls = self.env.temp_data.get('autodoc:class') # ... or from a class directive if mod_cls is None: - mod_cls = self.env.temp_data.get('py:class') + mod_cls = self.env.ref_context.get('py:class') # ... if still None, there's no way to know if mod_cls is None: return None, [] @@ -921,7 +921,7 @@ def resolve_name(self, modname, parents, path, base): if not modname: modname = self.env.temp_data.get('autodoc:module') if not modname: - modname = self.env.temp_data.get('py:module') + modname = self.env.ref_context.get('py:module') # ... else, it stays None, which means invalid return modname, parents + [base] From e16162f6d5a55a0fcb5813fac084dcab061e5a1c Mon Sep 17 00:00:00 2001 From: Jeroen Demeyer Date: Fri, 22 Apr 2016 18:11:44 +0200 Subject: [PATCH 09/13] Merge titles --- src/sage_setup/docbuild/ext/multidocs.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/sage_setup/docbuild/ext/multidocs.py b/src/sage_setup/docbuild/ext/multidocs.py index 16ae1e13055..2f83dc427e7 100644 --- a/src/sage_setup/docbuild/ext/multidocs.py +++ b/src/sage_setup/docbuild/ext/multidocs.py @@ -34,6 +34,7 @@ def merge_environment(app, env): """ Merges the following attributes of the sub-docs environment into the main environment: + - titles # Titles - todo_all_todos # ToDo's - indexentries # global python index - all_docs # needed by the js index @@ -53,23 +54,25 @@ def merge_environment(app, env): len(docenv.citations) ), nonl=1) + # merge titles + for t in docenv.titles: + env.titles[fixpath(t)] = docenv.titles[t] # merge the todo links for dct in docenv.todo_all_todos: - dct['docname']=fixpath(dct['docname']) + dct['docname'] = fixpath(dct['docname']) env.todo_all_todos += docenv.todo_all_todos # merge the html index links newindex = {} for ind in docenv.indexentries: if ind.startswith('sage/'): - newind = fixpath(ind) - newindex[newind] = docenv.indexentries[ind] + newindex[fixpath(ind)] = docenv.indexentries[ind] else: newindex[ind] = docenv.indexentries[ind] env.indexentries.update(newindex) # merge the all_docs links, needed by the js index newalldoc = {} for ind in docenv.all_docs: - newalldoc[fixpath(ind)]=docenv.all_docs[ind] + newalldoc[fixpath(ind)] = docenv.all_docs[ind] env.all_docs.update(newalldoc) # needed by env.check_consistency (sphinx.environement, line 1734) for ind in newalldoc: @@ -81,7 +84,7 @@ def merge_environment(app, env): newcite = {} for ind, (path, tag) in docenv.citations.iteritems(): # TODO: Warn on conflicts - newcite[ind]=(fixpath(path), tag) + newcite[ind] = (fixpath(path), tag) env.citations.update(newcite) # merge the py:module indexes newmodules = {} From 039dd290cade43d15a632c00f87553037300a607 Mon Sep 17 00:00:00 2001 From: Jeroen Demeyer Date: Fri, 22 Apr 2016 18:12:17 +0200 Subject: [PATCH 10/13] Remove some warnings --- src/sage_setup/docbuild/sphinxbuild.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/sage_setup/docbuild/sphinxbuild.py b/src/sage_setup/docbuild/sphinxbuild.py index 344bc7ea767..c68292ceb3c 100644 --- a/src/sage_setup/docbuild/sphinxbuild.py +++ b/src/sage_setup/docbuild/sphinxbuild.py @@ -53,6 +53,8 @@ def _init_chatter(self): re.compile('^loading cross citations... done \([0-9]* citations\).'), re.compile('WARNING: favicon file \'favicon.ico\' does not exist'), re.compile('WARNING: html_static_path entry .* does not exist'), + re.compile('WARNING: while setting up extension'), + re.compile('WARNING: Any IDs not assiend for figure node'), ) # replacements: pairs of regular expressions and their replacements, From 7c2d9d570966b59fd449eb50273242a627eb50f5 Mon Sep 17 00:00:00 2001 From: Jeroen Demeyer Date: Fri, 22 Apr 2016 22:34:56 +0200 Subject: [PATCH 11/13] Fix syntax highlighting --- build/pkgs/sphinx/patches/highlighting.patch | 30 +++++++++++++++----- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/build/pkgs/sphinx/patches/highlighting.patch b/build/pkgs/sphinx/patches/highlighting.patch index 1b4db449a46..5f0bad34e05 100644 --- a/build/pkgs/sphinx/patches/highlighting.patch +++ b/build/pkgs/sphinx/patches/highlighting.patch @@ -1,11 +1,27 @@ ---- Sphinx-1.2.2/sphinx/highlighting.py.orig 2014-03-02 20:38:09.000000000 +1300 -+++ Sphinx-1.2.2/sphinx/highlighting.py 2014-10-19 23:32:23.000000000 +1300 -@@ -167,7 +167,7 @@ +Allow Sphinx to recognize the Sage prompt "sage:" +the same way it recognizes the ">>>" from Python + +diff -ru a/sphinx/highlighting.py b/sphinx/highlighting.py +--- a/sphinx/highlighting.py 2016-03-28 15:16:34.000000000 +0200 ++++ b/sphinx/highlighting.py 2016-04-22 22:34:29.642929758 +0200 +@@ -96,15 +96,19 @@ + source = source.decode() # find out which lexer to use - if lang in ('py', 'python'): -- if source.startswith('>>>'): -+ if source.startswith('>>>') or source.startswith('sage: '): +- if lang in ('py', 'python'): ++ elif lang in ('py', 'python'): + if source.startswith('>>>'): # interactive session lexer = lexers['pycon'] - elif not force: ++ elif source.startswith('sage: '): ++ lexer = lexers['pycon'] + else: + lexer = lexers['python'] + elif lang in ('py3', 'python3', 'default'): + if source.startswith('>>>'): + lexer = lexers['pycon3'] ++ elif source.startswith('sage: '): ++ lexer = lexers['pycon'] + else: + lexer = lexers['python3'] + elif lang == 'guess': From f1ae5e679cba7b7873c2c2654694e9d04c3e0c81 Mon Sep 17 00:00:00 2001 From: Jeroen Demeyer Date: Sun, 24 Apr 2016 23:14:50 +0200 Subject: [PATCH 12/13] Fix doctest failures with Sphinx 1.4.1 --- src/doc/common/conf.py | 2 +- src/sage/misc/sagedoc.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/doc/common/conf.py b/src/doc/common/conf.py index c75f95b014a..ee3f23ae1c1 100644 --- a/src/doc/common/conf.py +++ b/src/doc/common/conf.py @@ -615,7 +615,7 @@ def call_intersphinx(app, env, node, contnode): sage: for line in open(thematic_index).readlines(): ....: if "padics" in line: ....: sys.stdout.write(line) -
  • Introduction to the -adics
  • +
  • Introduction to the -adics
  • """ debug_inf(app, "???? Trying intersphinx for %s"%node['reftarget']) builder = app.builder diff --git a/src/sage/misc/sagedoc.py b/src/sage/misc/sagedoc.py index 174d3756af0..5d52bdee308 100644 --- a/src/sage/misc/sagedoc.py +++ b/src/sage/misc/sagedoc.py @@ -23,7 +23,7 @@ sage: for line in open(docfilename): ....: if "#sage.symbolic.expression.Expression.N" in line: ....: print line - N(prec=None, digits=None, algorithm=None)... + N(prec=None, digits=None, algorithm=None)... Check that sphinx is not imported at Sage start-up:: From e88c802d410411061c8e3972bbb5e2e2ed72cdfe Mon Sep 17 00:00:00 2001 From: Jeroen Demeyer Date: Mon, 25 Apr 2016 17:30:54 +0200 Subject: [PATCH 13/13] Fix malformatted mathematics --- src/sage/symbolic/expression.pyx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sage/symbolic/expression.pyx b/src/sage/symbolic/expression.pyx index 3f2e862eed1..a03b55296f6 100644 --- a/src/sage/symbolic/expression.pyx +++ b/src/sage/symbolic/expression.pyx @@ -8827,8 +8827,8 @@ cdef class Expression(CommutativeRingElement): TESTS: - There are two square roots of `$(x + 1)^2$`, so this should - not be simplified to `$x + 1$`, :trac:`12737`:: + There are two square roots of `(x + 1)^2`, so this should + not be simplified to `x + 1`, see :trac:`12737`:: sage: f = sqrt((x + 1)^2) sage: f.simplify_full()