Skip to content

Commit 1ee61aa

Browse files
committed
Set the default RST role in Sphinx to 'any'
This change allows to autolink refs with anonymous roles to anything linkable.
1 parent fc90b9b commit 1ee61aa

11 files changed

Lines changed: 71 additions & 70 deletions

source/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,8 @@
9999

100100
# The reST default role (used for this markup: `text`) to use for all
101101
# documents.
102-
#
103-
# default_role = None
102+
# Ref: python-attrs/attrs#571
103+
default_role = 'any' # makes single backticks autofind targets
104104

105105
# If true, '()' will be appended to :func: etc. cross-reference text.
106106
#

source/discussions/pip-vs-easy-install.rst

Lines changed: 39 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -21,45 +21,45 @@ environments.
2121

2222
Here's a breakdown of the important differences between pip and easy_install now:
2323

24-
+------------------------------+----------------------------------+-------------------------------+
25-
| | **pip** | **easy_install** |
26-
+------------------------------+----------------------------------+-------------------------------+
27-
|Installs from :term:`Wheels |Yes |No |
28-
|<Wheel>` | | |
29-
+------------------------------+----------------------------------+-------------------------------+
30-
|Uninstall Packages |Yes (``pip uninstall``) |No |
31-
+------------------------------+----------------------------------+-------------------------------+
32-
|Dependency Overrides |Yes (:ref:`Requirements Files |No |
33-
| |<pip:Requirements Files>`) | |
34-
+------------------------------+----------------------------------+-------------------------------+
35-
|List Installed Packages |Yes (``pip list`` and ``pip |No |
36-
| |freeze``) | |
37-
+------------------------------+----------------------------------+-------------------------------+
38-
|:pep:`438` |Yes |No |
39-
|Support | | |
40-
+------------------------------+----------------------------------+-------------------------------+
41-
|Installation format |'Flat' packages with `egg-info` | Encapsulated Egg format |
42-
| |metadata. | |
43-
+------------------------------+----------------------------------+-------------------------------+
44-
|sys.path modification |No |Yes |
45-
| | | |
46-
| | | |
47-
+------------------------------+----------------------------------+-------------------------------+
48-
|Installs from :term:`Eggs |No |Yes |
49-
|<Egg>` | | |
50-
+------------------------------+----------------------------------+-------------------------------+
51-
|`pylauncher support`_ |No |Yes [1]_ |
52-
| | | |
53-
+------------------------------+----------------------------------+-------------------------------+
54-
|:ref:`Multi-version Installs` |No |Yes |
55-
| | | |
56-
+------------------------------+----------------------------------+-------------------------------+
57-
|Exclude scripts during install|No |Yes |
58-
| | | |
59-
+------------------------------+----------------------------------+-------------------------------+
60-
|per project index |Only in virtualenv |Yes, via setup.cfg |
61-
| | | |
62-
+------------------------------+----------------------------------+-------------------------------+
24+
+------------------------------+--------------------------------------+-------------------------------+
25+
| | **pip** | **easy_install** |
26+
+------------------------------+--------------------------------------+-------------------------------+
27+
|Installs from :term:`Wheels |Yes |No |
28+
|<Wheel>` | | |
29+
+------------------------------+--------------------------------------+-------------------------------+
30+
|Uninstall Packages |Yes (``pip uninstall``) |No |
31+
+------------------------------+--------------------------------------+-------------------------------+
32+
|Dependency Overrides |Yes (:ref:`Requirements Files |No |
33+
| |<pip:Requirements Files>`) | |
34+
+------------------------------+--------------------------------------+-------------------------------+
35+
|List Installed Packages |Yes (``pip list`` and ``pip |No |
36+
| |freeze``) | |
37+
+------------------------------+--------------------------------------+-------------------------------+
38+
|:pep:`438` |Yes |No |
39+
|Support | | |
40+
+------------------------------+--------------------------------------+-------------------------------+
41+
|Installation format |'Flat' packages with :file:`egg-info` | Encapsulated Egg format |
42+
| |metadata. | |
43+
+------------------------------+--------------------------------------+-------------------------------+
44+
|sys.path modification |No |Yes |
45+
| | | |
46+
| | | |
47+
+------------------------------+--------------------------------------+-------------------------------+
48+
|Installs from :term:`Eggs |No |Yes |
49+
|<Egg>` | | |
50+
+------------------------------+--------------------------------------+-------------------------------+
51+
|`pylauncher support`_ |No |Yes [1]_ |
52+
| | | |
53+
+------------------------------+--------------------------------------+-------------------------------+
54+
|:ref:`Multi-version Installs` |No |Yes |
55+
| | | |
56+
+------------------------------+--------------------------------------+-------------------------------+
57+
|Exclude scripts during install|No |Yes |
58+
| | | |
59+
+------------------------------+--------------------------------------+-------------------------------+
60+
|per project index |Only in virtualenv |Yes, via setup.cfg |
61+
| | | |
62+
+------------------------------+--------------------------------------+-------------------------------+
6363

6464
----
6565

source/glossary.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,8 @@ Glossary
121121

122122
Pure Module
123123

124-
A :term:`module` written in Python and contained in a single `.py` file (and
125-
possibly associated `.pyc` and/or `.pyo` files).
124+
A :term:`module` written in Python and contained in a single ``.py`` file (and
125+
possibly associated ``.pyc`` and/or ``.pyo`` files).
126126

127127

128128
Python Packaging Authority (PyPA)
@@ -147,7 +147,7 @@ Glossary
147147

148148
`pypi.org <https://pypi.org>`_ is the domain name for the
149149
:term:`Python Package Index (PyPI)`. It replaced the legacy index
150-
domain name, `pypi.python.org`, in 2017. It is powered by
150+
domain name, ``pypi.python.org``, in 2017. It is powered by
151151
:ref:`warehouse`.
152152

153153
pyproject.toml

source/guides/distributing-packages-using-setuptools.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -815,10 +815,10 @@ To build the wheel:
815815
python setup.py bdist_wheel
816816

817817

818-
`bdist_wheel` will detect that the code is pure Python, and build a wheel that's
819-
named such that it's usable on any Python installation with the same major
820-
version (Python 2 or Python 3) as the version you used to build the wheel. For
821-
details on the naming of wheel files, see :pep:`425`.
818+
``bdist_wheel`` will detect that the code is pure Python, and build a wheel
819+
that's named such that it's usable on any Python installation with the same
820+
major version (Python 2 or Python 3) as the version you used to build the
821+
wheel. For details on the naming of wheel files, see :pep:`425`.
822822

823823
If your code supports both Python 2 and 3, but with different code (e.g., you
824824
use `"2to3" <https://docs.python.org/2/library/2to3.html>`_) you can run
@@ -842,9 +842,9 @@ To build the wheel:
842842
python setup.py bdist_wheel
843843

844844

845-
`bdist_wheel` will detect that the code is not pure Python, and build a wheel
846-
that's named such that it's only usable on the platform that it was built
847-
on. For details on the naming of wheel files, see :pep:`425`.
845+
:command:`bdist_wheel` will detect that the code is not pure Python, and build
846+
a wheel that's named such that it's only usable on the platform that it was
847+
built on. For details on the naming of wheel files, see :pep:`425`.
848848

849849
.. note::
850850

source/guides/dropping-older-python-versions.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,9 @@ Examples::
4646
Requires-Python: ">=3"
4747
Requires-Python: ">2.7,!=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*"
4848

49-
The way to set those values is within the call to `setup` within your setup.py script. This will insert the Requires-Python
50-
metadata values based on the argument you provide in `python_requires`.
49+
The way to set those values is within the call to ``setup`` within your
50+
:file:`setup.py` script. This will insert the ``Requires-Python``
51+
metadata values based on the argument you provide in ``python_requires``.
5152

5253
.. code-block:: python
5354

source/guides/installing-scientific-packages.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Starting with version 1.10.4 of NumPy and version 1.0.0 of SciPy, pre-built
2323
32-bit and 64-bit binaries in the ``wheel`` format are available for all major
2424
operating systems (Windows, macOS, and Linux) on PyPI. Note, however, that on
2525
Windows, NumPy binaries are linked against the `ATLAS
26-
<http://www.netlib.org/atlas/>` BLAS/LAPACK library, restricted to SSE2
26+
<http://www.netlib.org/atlas/>`__ BLAS/LAPACK library, restricted to SSE2
2727
instructions, so they may not provide optimal linear algebra performance.
2828

2929
There are a number of alternative options for obtaining scientific Python
@@ -76,8 +76,8 @@ environments. Allowing access to distributions installed into the system Python
7676
when using virtual environments is a common approach to working around this
7777
limitation.
7878

79-
The `wheel` project also provides a `wheel convert` subcommand that can
80-
convert a Windows `bdist_wininst` installer to a wheel.
79+
The :term:`wheel` project also provides a :command:`wheel convert` subcommand that can
80+
convert a Windows :command:`bdist_wininst` installer to a wheel.
8181

8282
.. preserve old links to this heading
8383
.. _mac-os-x-installers-and-package-managers:
@@ -142,6 +142,6 @@ packages, it is not limited to just Python packages. It has full support for
142142
native virtual environments. Conda makes environments first-class citizens,
143143
making it easy to create independent environments even for C libraries. It is
144144
written in Python, but is Python-agnostic. Conda manages Python itself as a
145-
package, so that `conda update python` is possible, in contrast to pip, which
146-
only manages Python packages. Conda is available in Anaconda and Miniconda (an
147-
easy-to-install download with just Python and conda).
145+
package, so that :command:`conda update python` is possible, in contrast to
146+
pip, which only manages Python packages. Conda is available in Anaconda and
147+
Miniconda (an easy-to-install download with just Python and conda).

source/guides/using-testpypi.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
Using TestPyPI
55
==============
66

7-
`TestPyPI` is a separate instance of the :term:`Python Package Index (PyPI)`
7+
``TestPyPI`` is a separate instance of the :term:`Python Package Index (PyPI)`
88
that allows you to try out the distribution tools and process without worrying
99
about affecting the real index. TestPyPI is hosted at
1010
`test.pypi.org <https://test.pypi.org>`_

source/news.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ September 2017
164164

165165
- Encouraged using ``readme_renderer`` to validate :file:`README.rst`.
166166
(:pr:`379`)
167-
- Recommended using the `--user-base` option. (:pr:`374`)
167+
- Recommended using the ``--user-base`` option. (:pr:`374`)
168168

169169
August 2017
170170
-----------

source/specifications/core-metadata.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -562,7 +562,7 @@ Example::
562562
Requires-Dist: beaglevote[pdf]
563563
Requires-Dist: libexample[test, doc]
564564

565-
Two feature names `test` and `doc` are reserved to mark dependencies that
565+
Two feature names ``test`` and ``doc`` are reserved to mark dependencies that
566566
are needed for running automated tests and generating documentation,
567567
respectively.
568568

source/tutorials/installing-packages.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -212,14 +212,14 @@ Using :ref:`virtualenv`:
212212

213213
For more information, see the `venv`_ docs or the `virtualenv <http://virtualenv.pypa.io>`_ docs.
214214

215-
The use of `source` under Unix shells ensures
215+
The use of :command:`source` under Unix shells ensures
216216
that the virtual environment's variables are set within the current
217217
shell, and not in a subprocess (which then disappears, having no
218218
useful effect).
219219

220220
In both of the above cases, Windows users should _not_ use the
221-
`source` command, but should rather run the `activate` script directly
222-
from the command shell like so:
221+
:command:`source` command, but should rather run the :command:`activate`
222+
script directly from the command shell like so:
223223

224224
::
225225

@@ -305,7 +305,7 @@ in the future.
305305
Upgrading packages
306306
==================
307307

308-
Upgrade an already installed `SomeProject` to the latest from PyPI.
308+
Upgrade an already installed ``SomeProject`` to the latest from PyPI.
309309

310310
::
311311

@@ -484,8 +484,8 @@ Install `setuptools extras`_.
484484
----
485485

486486
.. [1] "Secure" in this context means using a modern browser or a
487-
tool like `curl` that verifies SSL certificates when downloading from
488-
https URLs.
487+
tool like :command:`curl` that verifies SSL certificates when
488+
downloading from https URLs.
489489
490490
.. [2] Depending on your platform, this may require root or Administrator
491491
access. :ref:`pip` is currently considering changing this by `making user

0 commit comments

Comments
 (0)