Skip to content

Commit

Permalink
Trac #28856: Update to sphinx 3
Browse files Browse the repository at this point in the history
Migrate to sphinx 3.

The attributes `todo_all_todos` and `citations` were previously
implicitly initialized by sphinx. That changed in sphinx 2.1 due to some
refactoring:

https://github.com/sphinx-
doc/sphinx/commit/9abb4820b18201f63d77fdccb4ef394a21442f7a
https://github.com/sphinx-
doc/sphinx/commit/885d35e374b56d1d17f5036fe07b74229cdbec7f

So now we need to check for the case where they are not initialized yet.
We can't actually update to sphinx 2.1 yet, since it's python3 only.
This
is mostly intended to make things easier for distros and allow us to
update in the future.

Another issue occurs with intersphinx. Since a refactoring
(sphinx-doc/sphinx#5826) the build fails with

{{{
[manifolds] Exception occurred:
[manifolds]   File "/nix/store/ldl3rb92yvl070c7q3nnjgwl5mdx2wvb-
python3.7-sphinx-2.0.0/lib/python3.7/site-
packages/sphinx/ext/intersphinx.py", line 207, in load_mappings
[manifolds]     for key, (name, (uri, invs)) in
app.config.intersphinx_mapping.items():
[manifolds] ValueError: too many values to unpack (expected 2)
[manifolds] The full traceback has been saved in /build/sphinx-err-
e6h8o39l.log, if you want to report the issue to the developers.
[manifolds] Please also report this if it was a user error, so that a
better error message can be provided next time.
[manifolds] A bug report can be filed in the tracker at
<https://github.com/sphinx-doc/sphinx/issues>. Thanks!
Traceback (most recent call last):
  File "/nix/store/9894fxjpg8v99j14kip6b13rdfgf4m5k-
python3-3.7.5/lib/python3.7/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/nix/store/9894fxjpg8v99j14kip6b13rdfgf4m5k-
python3-3.7.5/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/nix/store/i0gjbmskaxkmj2qif96ayvb803l6hm4k-
python3.7-sagelib-9.0.beta6/lib/python3.7/site-
packages/sage_setup/docbuild/sphinxbuild.py", line 328, in <module>
    runsphinx()
  File "/nix/store/i0gjbmskaxkmj2qif96ayvb803l6hm4k-
python3.7-sagelib-9.0.beta6/lib/python3.7/site-
packages/sage_setup/docbuild/sphinxbuild.py", line 317, in runsphinx
    sys.stderr.raise_errors()
  File "/nix/store/i0gjbmskaxkmj2qif96ayvb803l6hm4k-
python3.7-sagelib-9.0.beta6/lib/python3.7/site-
packages/sage_setup/docbuild/sphinxbuild.py", line 252, in raise_errors
    raise OSError(self._error)
OSError: Exception occurred:
Error building the documentation.
Traceback (most recent call last):
  File "/nix/store/9894fxjpg8v99j14kip6b13rdfgf4m5k-
python3-3.7.5/lib/python3.7/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/nix/store/9894fxjpg8v99j14kip6b13rdfgf4m5k-
python3-3.7.5/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/nix/store/i0gjbmskaxkmj2qif96ayvb803l6hm4k-
python3.7-sagelib-9.0.beta6/lib/python3.7/site-
packages/sage_setup/docbuild/__main__.py", line 2, in <module>
    main()
  File "/nix/store/i0gjbmskaxkmj2qif96ayvb803l6hm4k-
python3.7-sagelib-9.0.beta6/lib/python3.7/site-
packages/sage_setup/docbuild/__init__.py", line 1671, in main
    builder()
  File "/nix/store/i0gjbmskaxkmj2qif96ayvb803l6hm4k-
python3.7-sagelib-9.0.beta6/lib/python3.7/site-
packages/sage_setup/docbuild/__init__.py", line 310, in _wrapper
    getattr(get_builder(document), name)(*args, **kwds)
  File "/nix/store/i0gjbmskaxkmj2qif96ayvb803l6hm4k-
python3.7-sagelib-9.0.beta6/lib/python3.7/site-
packages/sage_setup/docbuild/__init__.py", line 504, in _wrapper
    build_many(build_ref_doc, L)
  File "/nix/store/i0gjbmskaxkmj2qif96ayvb803l6hm4k-
python3.7-sagelib-9.0.beta6/lib/python3.7/site-
packages/sage_setup/docbuild/__init__.py", line 258, in build_many
    _build_many(target, args, processes=NUM_THREADS)
  File "/nix/store/i0gjbmskaxkmj2qif96ayvb803l6hm4k-
python3.7-sagelib-9.0.beta6/lib/python3.7/site-
packages/sage_setup/docbuild/utils.py", line 283, in build_many
    raise worker_exc.original_exception
}}}

which seems to suggest that the normalization hook added in the
refactoring PR is not called.

Tarballs:
* [https://files.pythonhosted.org/packages/a4/4a/0d48d133675eafb602714b3
472b214e63d438e7e6985d41977e617b81f7a/Sphinx-3.0.2.tar.gz]
* [https://files.pythonhosted.org/packages/98/33/dc28393f16385f722c893cb
55539c641c9aaec8d1bc1c15b69ce0ac2dbb3/sphinxcontrib-
devhelp-1.0.2.tar.gz]
* [https://files.pythonhosted.org/packages/60/65/78e1514be951a3584df2e27
b1b86e22609dd73312461e1af2afb9a53152c/sphinxcontrib-
websupport-1.2.1.tar.gz]
* [https://files.pythonhosted.org/packages/9f/01/ad9d4ebbceddbed9979ab4a
89ddb78c9760e74e6757b1880f1b2760e8295/sphinxcontrib-
applehelp-1.0.2.tar.gz]
* [https://files.pythonhosted.org/packages/ac/86/021876a9dd4eac9dae0b1d4
54d848acbd56d5574d350d0f835043b5ac2cd/sphinxcontrib-
serializinghtml-1.1.4.tar.gz]
* [https://files.pythonhosted.org/packages/b2/e8/9ed3830aeed71f17c026a07
a5097edcf44b692850ef215b161b8ad875729/sphinxcontrib-jsmath-1.0.1.tar.gz]
* [https://files.pythonhosted.org/packages/b1/8e/c4846e59f38a5f2b4a0e3b2
7af38f2fcf904d4bfd82095bf92de0b114ebd/sphinxcontrib-qthelp-1.0.3.tar.gz]
* [https://files.pythonhosted.org/packages/c9/2e/a7a5fef38327b7f643ed136
46321d19903a2f54b0a05868e4bc34d729e1f/sphinxcontrib-
htmlhelp-1.0.3.tar.gz]

URL: https://trac.sagemath.org/28856
Reported by: gh-timokau
Ticket author(s): Timo Kaufmann, John Palmieri, François Bissey, Antonio
Rojas
Reviewer(s): Timo Kaufmann, John Palmieri, François Bissey, Antonio
Rojas
  • Loading branch information
Release Manager committed Jun 21, 2020
2 parents b4708f0 + bd99462 commit afedaa5
Show file tree
Hide file tree
Showing 63 changed files with 211 additions and 77 deletions.
7 changes: 4 additions & 3 deletions build/pkgs/sphinx/checksums.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
tarball=Sphinx-VERSION.tar.gz
sha1=93e715cb5d16d981698caa2d54b3b58596798f5d
md5=554f7a4e752f48b2601e5ef5ab463346
cksum=2134440192
sha1=deec61ab1240d359d24f6d08b28724b4f2547448
md5=d998c1884c00cc93e9eede88e7864524
cksum=4289730124
upstream_url=https://pypi.io/packages/source/s/sphinx/Sphinx-VERSION.tar.gz
2 changes: 1 addition & 1 deletion build/pkgs/sphinx/dependencies
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
$(PYTHON) | $(PYTHON_TOOLCHAIN) docutils jinja2 pygments six snowballstemmer imagesize babel alabaster requests typing sphinxcontrib_websupport packaging
$(PYTHON) | $(PYTHON_TOOLCHAIN) docutils jinja2 pygments six snowballstemmer imagesize babel alabaster requests typing sphinxcontrib_websupport sphinxcontrib_applehelp sphinxcontrib_devhelp sphinxcontrib_htmlhelp sphinxcontrib_jsmath sphinxcontrib_qthelp sphinxcontrib_serializinghtml packaging

----------
All lines of this file are ignored except the first.
Expand Down
2 changes: 1 addition & 1 deletion build/pkgs/sphinx/package-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.8.5.p0
3.0.4.p0
9 changes: 9 additions & 0 deletions build/pkgs/sphinxcontrib_applehelp/SPKG.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
= sphinxcontrib-applehelp =

== Description ==

Sphinx extension which outputs Apple help book

== License ==

BSD
5 changes: 5 additions & 0 deletions build/pkgs/sphinxcontrib_applehelp/checksums.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
tarball=sphinxcontrib-applehelp-VERSION.tar.gz
sha1=adfd47917f82a86f30bdf356497baf68b47380bc
md5=3f2de7681e12dde031acee0497c3cc2b
cksum=1142149867
upstream_url=https://pypi.io/packages/source/s/sphinxcontrib-applehelp/sphinxcontrib-applehelp-VERSION.tar.gz
5 changes: 5 additions & 0 deletions build/pkgs/sphinxcontrib_applehelp/dependencies
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
$(PYTHON) | $(PYTHON_TOOLCHAIN)

----------
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.
1 change: 1 addition & 0 deletions build/pkgs/sphinxcontrib_applehelp/package-version.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1.0.2
1 change: 1 addition & 0 deletions build/pkgs/sphinxcontrib_applehelp/spkg-install.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
cd src && sdh_pip_install .
1 change: 1 addition & 0 deletions build/pkgs/sphinxcontrib_applehelp/type
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
standard
9 changes: 9 additions & 0 deletions build/pkgs/sphinxcontrib_devhelp/SPKG.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
= sphinxcontrib-devhelp =

== Description ==

Sphinx extension which outputs Devhelp documents

== License ==

BSD
5 changes: 5 additions & 0 deletions build/pkgs/sphinxcontrib_devhelp/checksums.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
tarball=sphinxcontrib-devhelp-VERSION.tar.gz
sha1=3782815be9e11190fe7c7d697e73369432c56fd6
md5=94069c5cdb5079c445f5477fa6107016
cksum=4072264365
upstream_url=https://pypi.io/packages/source/s/sphinxcontrib-devhelp/sphinxcontrib-devhelp-VERSION.tar.gz
5 changes: 5 additions & 0 deletions build/pkgs/sphinxcontrib_devhelp/dependencies
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
$(PYTHON) | $(PYTHON_TOOLCHAIN)

----------
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.
1 change: 1 addition & 0 deletions build/pkgs/sphinxcontrib_devhelp/package-version.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1.0.2
1 change: 1 addition & 0 deletions build/pkgs/sphinxcontrib_devhelp/spkg-install.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
cd src && sdh_pip_install .
1 change: 1 addition & 0 deletions build/pkgs/sphinxcontrib_devhelp/type
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
standard
9 changes: 9 additions & 0 deletions build/pkgs/sphinxcontrib_htmlhelp/SPKG.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
= sphinxcontrib-htmlhelp =

== Description ==

Sphinx extension which outputs HTML help book

== License ==

BSD
5 changes: 5 additions & 0 deletions build/pkgs/sphinxcontrib_htmlhelp/checksums.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
tarball=sphinxcontrib-htmlhelp-VERSION.tar.gz
sha1=fc695250bc781777203b3a97a7aa7b0eab8a2c51
md5=f1db7db2a467f08f6292ab0d76e38584
cksum=1195324208
upstream_url=https://pypi.io/packages/source/s/sphinxcontrib-htmlhelp/sphinxcontrib-htmlhelp-VERSION.tar.gz
5 changes: 5 additions & 0 deletions build/pkgs/sphinxcontrib_htmlhelp/dependencies
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
$(PYTHON) | $(PYTHON_TOOLCHAIN)

----------
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.
1 change: 1 addition & 0 deletions build/pkgs/sphinxcontrib_htmlhelp/package-version.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1.0.3
1 change: 1 addition & 0 deletions build/pkgs/sphinxcontrib_htmlhelp/spkg-install.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
cd src && sdh_pip_install .
1 change: 1 addition & 0 deletions build/pkgs/sphinxcontrib_htmlhelp/type
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
standard
9 changes: 9 additions & 0 deletions build/pkgs/sphinxcontrib_jsmath/SPKG.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
= sphinxcontrib-jsmath =

== Description ==

Sphinx extension which renders display math in HTML via JavaScript

== License ==

BSD
5 changes: 5 additions & 0 deletions build/pkgs/sphinxcontrib_jsmath/checksums.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
tarball=sphinxcontrib-jsmath-VERSION.tar.gz
sha1=70348505f159dca801522d6df68230e3c5e749c7
md5=e45179f0a3608b6766862e0f34c23b62
cksum=3778623264
upstream_url=https://pypi.io/packages/source/s/sphinxcontrib-jsmath/sphinxcontrib-jsmath-VERSION.tar.gz
5 changes: 5 additions & 0 deletions build/pkgs/sphinxcontrib_jsmath/dependencies
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
$(PYTHON) | $(PYTHON_TOOLCHAIN)

----------
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.
1 change: 1 addition & 0 deletions build/pkgs/sphinxcontrib_jsmath/package-version.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1.0.1
1 change: 1 addition & 0 deletions build/pkgs/sphinxcontrib_jsmath/spkg-install.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
cd src && sdh_pip_install .
1 change: 1 addition & 0 deletions build/pkgs/sphinxcontrib_jsmath/type
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
standard
9 changes: 9 additions & 0 deletions build/pkgs/sphinxcontrib_qthelp/SPKG.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
= sphinxcontrib-qthelp =

== Description ==

Sphinx extension which outputs QtHelp documents

== License ==

BSD
5 changes: 5 additions & 0 deletions build/pkgs/sphinxcontrib_qthelp/checksums.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
tarball=sphinxcontrib-qthelp-VERSION.tar.gz
sha1=3f0d3b111e2a57ae24afc51c518ebc2e9e377cd5
md5=93216721f3e154cce12d1e9c3307b415
cksum=3260884791
upstream_url=https://pypi.io/packages/source/s/sphinxcontrib-qthelp/sphinxcontrib-qthelp-VERSION.tar.gz
5 changes: 5 additions & 0 deletions build/pkgs/sphinxcontrib_qthelp/dependencies
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
$(PYTHON) | $(PYTHON_TOOLCHAIN)

----------
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.
1 change: 1 addition & 0 deletions build/pkgs/sphinxcontrib_qthelp/package-version.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1.0.3
1 change: 1 addition & 0 deletions build/pkgs/sphinxcontrib_qthelp/spkg-install.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
cd src && sdh_pip_install .
1 change: 1 addition & 0 deletions build/pkgs/sphinxcontrib_qthelp/type
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
standard
9 changes: 9 additions & 0 deletions build/pkgs/sphinxcontrib_serializinghtml/SPKG.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
= sphinxcontrib-serializinghtml =

== Description ==

Sphinx extension which outputs serialized HTML files

== License ==

BSD
5 changes: 5 additions & 0 deletions build/pkgs/sphinxcontrib_serializinghtml/checksums.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
tarball=sphinxcontrib-serializinghtml-VERSION.tar.gz
sha1=7d782d9f8fef0a5663fc7732d72847e711f0f18b
md5=518ff437dcb05a74ed32ba19c892ce05
cksum=3002072803
upstream_url=https://pypi.io/packages/source/s/sphinxcontrib-serializinghtml/sphinxcontrib-serializinghtml-VERSION.tar.gz
5 changes: 5 additions & 0 deletions build/pkgs/sphinxcontrib_serializinghtml/dependencies
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
$(PYTHON) | $(PYTHON_TOOLCHAIN)

----------
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.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1.1.4
1 change: 1 addition & 0 deletions build/pkgs/sphinxcontrib_serializinghtml/spkg-install.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
cd src && sdh_pip_install .
1 change: 1 addition & 0 deletions build/pkgs/sphinxcontrib_serializinghtml/type
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
standard
7 changes: 4 additions & 3 deletions build/pkgs/sphinxcontrib_websupport/checksums.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
tarball=sphinxcontrib-websupport-VERSION.tar.gz
sha1=03216c11167b75d2c1b08e34041ad2019c3e7dc9
md5=ca6435e7b4eb9408df4f54972361e9d3
cksum=1372914473
sha1=313f4b764872d36f890e76579985e6aaa732f4ca
md5=4fe4d07afe1556c65182d0437228d7bb
cksum=1830011133
upstream_url=https://pypi.io/packages/source/s/sphinxcontrib-websupport/sphinxcontrib-websupport-VERSION.tar.gz
2 changes: 1 addition & 1 deletion build/pkgs/sphinxcontrib_websupport/package-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.1.0
1.2.1
2 changes: 0 additions & 2 deletions src/doc/en/thematic_tutorials/structures_in_coding_theory.rst
Original file line number Diff line number Diff line change
Expand Up @@ -721,8 +721,6 @@ derive from the one that follows.

.. CODE-BLOCK:: python
:class:`sage.coding.repetition_code.BinaryRepetitionCode <sage.coding.repetition_code.BinaryRepetitionCode>`
#the line above creates a link to the class in the html documentation of coding theory library
from sage.coding.repetition_code import BinaryRepetitionCode
``encoders_catalog.py`` (continued):
Expand Down
8 changes: 4 additions & 4 deletions src/sage/categories/semigroups.py
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,7 @@ def LTrivial(self):
.. SEEALSO::
- :wikipedia:`Green's_relations`
- :wikipedia:`Green%27s_relations`
- :class:`Semigroups.SubcategoryMethods.RTrivial`
- :class:`Semigroups.SubcategoryMethods.JTrivial`
- :class:`Semigroups.SubcategoryMethods.HTrivial`
Expand Down Expand Up @@ -588,7 +588,7 @@ def RTrivial(self):
.. SEEALSO::
- :wikipedia:`Green's_relations`
- :wikipedia:`Green%27s_relations`
- :class:`Semigroups.SubcategoryMethods.LTrivial`
- :class:`Semigroups.SubcategoryMethods.JTrivial`
- :class:`Semigroups.SubcategoryMethods.HTrivial`
Expand Down Expand Up @@ -644,7 +644,7 @@ def JTrivial(self):
.. SEEALSO::
- :wikipedia:`Green's_relations`
- :wikipedia:`Green%27s_relations`
- :class:`Semigroups.SubcategoryMethods.LTrivial`
- :class:`Semigroups.SubcategoryMethods.RTrivial`
- :class:`Semigroups.SubcategoryMethods.HTrivial`
Expand Down Expand Up @@ -680,7 +680,7 @@ def HTrivial(self):
.. SEEALSO::
- :wikipedia:`Green's_relations`
- :wikipedia:`Green%27s_relations`
- :class:`Semigroups.SubcategoryMethods.RTrivial`
- :class:`Semigroups.SubcategoryMethods.LTrivial`
- :class:`Semigroups.SubcategoryMethods.JTrivial`
Expand Down
2 changes: 1 addition & 1 deletion src/sage/combinat/partition.py
Original file line number Diff line number Diff line change
Expand Up @@ -1243,7 +1243,7 @@ def sign(self):
REFERENCES:
- :wikipedia:`Zolotarev's_lemma`
- :wikipedia:`Zolotarev%27s_lemma`
"""
return (-1)**(self.size()-self.length())

Expand Down
3 changes: 0 additions & 3 deletions src/sage/combinat/permutation.py
Original file line number Diff line number Diff line change
Expand Up @@ -412,9 +412,6 @@ class Permutation(CombinatorialElement):
[]
sage: Permutation( [[], []] )
[]
.. automethod:: Permutation.left_action_product
.. automethod:: Permutation.right_action_product
"""
@staticmethod
def __classcall_private__(cls, l, check_input = True):
Expand Down
4 changes: 2 additions & 2 deletions src/sage/combinat/posets/posets.py
Original file line number Diff line number Diff line change
Expand Up @@ -4221,7 +4221,7 @@ def width(self, certificate=False):
Return the width of the poset (the size of its longest antichain).
It is computed through a matching in a bipartite graph; see
:wikipedia:`Dilworth's_theorem` for more information. The width is
:wikipedia:`Dilworth%27s_theorem` for more information. The width is
also called Dilworth number.
INPUT:
Expand Down Expand Up @@ -4273,7 +4273,7 @@ def dilworth_decomposition(self):
partitioned into `\alpha` chains, where `\alpha` is the cardinality of
its largest antichain. This method returns such a partition.
See :wikipedia:`Dilworth's_theorem`.
See :wikipedia:`Dilworth%27s_theorem`.
ALGORITHM:
Expand Down
2 changes: 1 addition & 1 deletion src/sage/combinat/root_system/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@
One can also customize the projection by specifying a function. Here,
we display all the roots for type `E_8` using the projection from its
eight dimensional ambient space onto 3D described on
:wikipedia:`Wikipedia's E8 3D picture <File:E8_3D.png>`::
:wikipedia:`Wikipedia%27s E8 3D picture <File:E8_3D.png>`::
sage: M = matrix([[0., -0.556793440452, 0.19694925177, -0.19694925177, 0.0805477263944, -0.385290876171, 0., 0.385290876171],
....: [0.180913155536, 0., 0.160212955043, 0.160212955043, 0., 0.0990170516545, 0.766360424875, 0.0990170516545],
Expand Down
24 changes: 12 additions & 12 deletions src/sage/docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from docutils.transforms import Transform
from sphinx.ext.doctest import blankline_re
from sphinx import highlighting
import sphinx.ext.intersphinx as intersphinx
from IPython.lib.lexers import IPythonConsoleLexer, IPyLexer

# If your extensions are in another directory, add it here.
Expand Down Expand Up @@ -172,13 +173,8 @@ def sphinx_plot(graphics, **kwds):

# Cross-links to other project's online documentation.
python_version = sys.version_info.major
intersphinx_mapping = {
'python': ('https://docs.python.org/',
os.path.join(SAGE_DOC_SRC, "common",
"python{}.inv".format(python_version))),
'pplpy': (PPLPY_DOCS, None)}

def set_intersphinx_mappings(app):
def set_intersphinx_mappings(app, config):
"""
Add precompiled inventory (the objects.inv)
"""
Expand All @@ -189,7 +185,11 @@ def set_intersphinx_mappings(app):
app.config.intersphinx_mapping = {}
return

app.config.intersphinx_mapping = intersphinx_mapping
app.config.intersphinx_mapping = {
'python': ('https://docs.python.org/',
os.path.join(SAGE_DOC_SRC, "common",
"python{}.inv".format(python_version))),
'pplpy': (PPLPY_DOCS, None)}

# Add master intersphinx mapping
dst = os.path.join(invpath, 'objects.inv')
Expand All @@ -204,6 +204,7 @@ def set_intersphinx_mappings(app):
dst = os.path.join(invpath, directory, 'objects.inv')
app.config.intersphinx_mapping[src] = dst

intersphinx.normalize_intersphinx_mapping(app, config)

# By default document are not master.
multidocs_is_master = True
Expand Down Expand Up @@ -674,11 +675,11 @@ def call_intersphinx(app, env, node, contnode):
sage: for line in open(thematic_index).readlines(): # optional - dochtml
....: if "padics" in line:
....: _ = sys.stdout.write(line)
<li><a class="reference external" href="../reference/padics/sage/rings/padics/tutorial.html#sage-rings-padics-tutorial" title="(in Sage... Reference Manual: p-Adics v...)"><span>Introduction to the p-adics</span></a></li>
<li><p><a class="reference external" href="../reference/padics/sage/rings/padics/tutorial.html#sage-rings-padics-tutorial" title="(in Sage... Reference Manual: p-Adics v...)"><span>Introduction to the p-adics</span></a></p></li>
"""
debug_inf(app, "???? Trying intersphinx for %s" % node['reftarget'])
builder = app.builder
res = sphinx.ext.intersphinx.missing_reference(
res = intersphinx.missing_reference(
app, env, node, contnode)
if res:
# Replace absolute links to $SAGE_DOC by relative links: this
Expand Down Expand Up @@ -861,11 +862,10 @@ def setup(app):
if app.srcdir.startswith(SAGE_DOC_SRC):
app.add_config_value('intersphinx_mapping', {}, False)
app.add_config_value('intersphinx_cache_limit', 5, False)
app.connect('config-inited', set_intersphinx_mappings)
app.connect('builder-inited', intersphinx.load_mappings)
# We do *not* fully initialize intersphinx since we call it by hand
# in find_sage_dangling_links.
# app.connect('missing-reference', missing_reference)
app.connect('missing-reference', find_sage_dangling_links)
import sphinx.ext.intersphinx
app.connect('builder-inited', set_intersphinx_mappings)
app.connect('builder-inited', sphinx.ext.intersphinx.load_mappings)
app.connect('builder-inited', nitpick_patch_config)
2 changes: 1 addition & 1 deletion src/sage/functions/jacobi.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@
REFERENCES:
- :wikipedia:`Jacobi's_elliptic_functions`
- :wikipedia:`Jacobi%27s_elliptic_functions`
- [KS2002]_
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def Dini(a=1, b=1, name="Dini's surface"):
- ``name`` -- string. Name of the surface.
For more information, see :wikipedia:`Dini's_surface`.
For more information, see :wikipedia:`Dini%27s_surface`.
EXAMPLES::
Expand Down
2 changes: 1 addition & 1 deletion src/sage/graphs/base/static_sparse_graph.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -682,7 +682,7 @@ def tarjan_strongly_connected_components(G):
the lowlink of `v`, that whole subtree is a new SCC.
For more information, see the
:wikipedia:`Tarjan's_strongly_connected_components_algorithm`.
:wikipedia:`Tarjan%27s_strongly_connected_components_algorithm`.
EXAMPLES::
Expand Down
2 changes: 1 addition & 1 deletion src/sage/graphs/bipartite_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -1631,7 +1631,7 @@ def vertex_cover(self, algorithm="Konig", value_only=False,
among:
- ``"Konig"`` will compute a minimum vertex cover using Konig's
algorithm (:wikipedia:`Kőnig's_theorem_(graph_theory)`)
algorithm (:wikipedia:`Kőnig%27s_theorem_(graph_theory)`)
- ``"Cliquer"`` will compute a minimum vertex cover
using the Cliquer package
Expand Down
Loading

0 comments on commit afedaa5

Please sign in to comment.