summaryrefslogtreecommitdiff
path: root/docs/internals
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2023-04-16 19:14:09 -0400
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2023-04-17 07:44:29 +0200
commit26f181939ebdad3811736aadeb5634bbdcaca025 (patch)
tree5f18511a1bb833a58b49660035b8bc800ffe9b89 /docs/internals
parent509401313471ac0e9ef2e0c575c02db4436d6158 (diff)
[4.2.x] Used extlinks for PyPI links.
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com> Backport of 2c4dc6476083c853b654e462c7ff65dbe0334c9e from main
Diffstat (limited to 'docs/internals')
-rw-r--r--docs/internals/contributing/writing-code/coding-style.txt17
-rw-r--r--docs/internals/contributing/writing-code/unit-tests.txt74
-rw-r--r--docs/internals/contributing/writing-documentation.txt9
-rw-r--r--docs/internals/organization.txt7
-rw-r--r--docs/internals/security.txt8
5 files changed, 45 insertions, 70 deletions
diff --git a/docs/internals/contributing/writing-code/coding-style.txt b/docs/internals/contributing/writing-code/coding-style.txt
index 812be79c91..d227e04ba0 100644
--- a/docs/internals/contributing/writing-code/coding-style.txt
+++ b/docs/internals/contributing/writing-code/coding-style.txt
@@ -45,12 +45,12 @@ Python style
* Unless otherwise specified, follow :pep:`8`.
- Use `flake8`_ to check for problems in this area. Note that our ``setup.cfg``
- file contains some excluded files (deprecated modules we don't care about
- cleaning up and some third-party code that Django vendors) as well as some
- excluded errors that we don't consider as gross violations. Remember that
- :pep:`8` is only a guide, so respect the style of the surrounding code as a
- primary goal.
+ Use :pypi:`flake8` to check for problems in this area. Note that our
+ ``setup.cfg`` file contains some excluded files (deprecated modules we don't
+ care about cleaning up and some third-party code that Django vendors) as well
+ as some excluded errors that we don't consider as gross violations. Remember
+ that :pep:`8` is only a guide, so respect the style of the surrounding code
+ as a primary goal.
An exception to :pep:`8` is our rules on line lengths. Don't limit lines of
code to 79 characters if it means the code looks significantly uglier or is
@@ -352,8 +352,8 @@ Miscellaneous
documentation </topics/i18n/index>` for details.
* Remove ``import`` statements that are no longer used when you change code.
- `flake8`_ will identify these imports for you. If an unused import needs to
- remain for backwards-compatibility, mark the end of with ``# NOQA`` to
+ :pypi:`flake8` will identify these imports for you. If an unused import needs
+ to remain for backwards-compatibility, mark the end of with ``# NOQA`` to
silence the flake8 warning.
* Systematically remove all trailing whitespaces from your code as those
@@ -376,4 +376,3 @@ For details about the JavaScript code style used by Django, see
.. _black: https://black.readthedocs.io/en/stable/
.. _editorconfig: https://editorconfig.org/
-.. _flake8: https://pypi.org/project/flake8/
diff --git a/docs/internals/contributing/writing-code/unit-tests.txt b/docs/internals/contributing/writing-code/unit-tests.txt
index 7411e3715c..a0b985c8a0 100644
--- a/docs/internals/contributing/writing-code/unit-tests.txt
+++ b/docs/internals/contributing/writing-code/unit-tests.txt
@@ -251,7 +251,7 @@ Running the Selenium tests
--------------------------
Some tests require Selenium and a web browser. To run these tests, you must
-install the selenium_ package and run the tests with the
+install the :pypi:`selenium` package and run the tests with the
``--selenium=<BROWSERS>`` option. For example, if you have Firefox and Google
Chrome installed:
@@ -277,28 +277,31 @@ Running all the tests
If you want to run the full suite of tests, you'll need to install a number of
dependencies:
-* aiosmtpd_
-* argon2-cffi_ 19.2.0+
-* asgiref_ 3.6.0+ (required)
-* bcrypt_
-* colorama_
-* docutils_
-* geoip2_
-* jinja2_ 2.11+
-* numpy_
-* Pillow_ 6.2.1+
-* PyYAML_
-* pytz_ (required)
-* pywatchman_
-* redis_ 3.4+
-* setuptools_
-* memcached_, plus a :ref:`supported Python binding <memcached>`
-* gettext_ (:ref:`gettext_on_windows`)
-* selenium_
-* sqlparse_ 0.3.1+ (required)
-* tblib_ 1.5.0+
+* :pypi:`aiosmtpd`
+* :pypi:`argon2-cffi` 19.2.0+
+* :pypi:`asgiref` 3.6.0+ (required)
+* :pypi:`bcrypt`
+* :pypi:`colorama`
+* :pypi:`docutils`
+* :pypi:`geoip2`
+* :pypi:`Jinja2` 2.11+
+* :pypi:`numpy`
+* :pypi:`Pillow` 6.2.1+
+* :pypi:`PyYAML`
+* :pypi:`pytz` (required)
+* :pypi:`pywatchman`
+* :pypi:`redis` 3.4+
+* :pypi:`setuptools`
+* :pypi:`memcached`, plus a `supported Python binding
+ <https://memcached.org/>`_
+* `gettext <https://www.gnu.org/software/gettext/manual/gettext.html>`_
+ (:ref:`gettext_on_windows`)
+* :pypi:`selenium`
+* :pypi:`sqlparse` 0.3.1+ (required)
+* :pypi:`tblib` 1.5.0+
-You can find these dependencies in `pip requirements files`_ inside the
+You can find these dependencies in `pip requirements files
+<https://pip.pypa.io/en/latest/user_guide/#requirements-files>`_ inside the
``tests/requirements`` directory of the Django source tree and install them
like so:
@@ -324,31 +327,8 @@ and install the Geospatial libraries</ref/contrib/gis/install/index>`.
Each of these dependencies is optional. If you're missing any of them, the
associated tests will be skipped.
-To run some of the autoreload tests, you'll need to install the Watchman_
-service.
-
-.. _aiosmtpd: https://pypi.org/project/aiosmtpd/
-.. _argon2-cffi: https://pypi.org/project/argon2-cffi/
-.. _asgiref: https://pypi.org/project/asgiref/
-.. _bcrypt: https://pypi.org/project/bcrypt/
-.. _colorama: https://pypi.org/project/colorama/
-.. _docutils: https://pypi.org/project/docutils/
-.. _geoip2: https://pypi.org/project/geoip2/
-.. _jinja2: https://pypi.org/project/Jinja2/
-.. _numpy: https://pypi.org/project/numpy/
-.. _Pillow: https://pypi.org/project/Pillow/
-.. _PyYAML: https://pyyaml.org/wiki/PyYAML
-.. _pytz: https://pypi.org/project/pytz/
-.. _pywatchman: https://pypi.org/project/pywatchman/
-.. _redis: https://pypi.org/project/redis/
-.. _setuptools: https://pypi.org/project/setuptools/
-.. _memcached: https://memcached.org/
-.. _gettext: https://www.gnu.org/software/gettext/manual/gettext.html
-.. _selenium: https://pypi.org/project/selenium/
-.. _sqlparse: https://pypi.org/project/sqlparse/
-.. _pip requirements files: https://pip.pypa.io/en/latest/user_guide/#requirements-files
-.. _tblib: https://pypi.org/project/tblib/
-.. _Watchman: https://facebook.github.io/watchman/
+To run some of the autoreload tests, you'll need to install the
+`Watchman <https://facebook.github.io/watchman/>`_ service.
Code coverage
-------------
diff --git a/docs/internals/contributing/writing-documentation.txt b/docs/internals/contributing/writing-documentation.txt
index 3215bb6690..73147c82bf 100644
--- a/docs/internals/contributing/writing-documentation.txt
+++ b/docs/internals/contributing/writing-documentation.txt
@@ -211,7 +211,7 @@ documentation:
"last bit" of that path. So ``:mod:`~django.contrib.auth``` will
display a link with the title "auth".
-* All Python code blocks should be formatted using the `blacken-docs`_
+* All Python code blocks should be formatted using the :pypi:`blacken-docs`
auto-formatter. This will be run by ``pre-commit`` if that is configured.
* Use :mod:`~sphinx.ext.intersphinx` to reference Python's and Sphinx'
@@ -264,9 +264,7 @@ documentation:
.. versionchanged:: 4.2
All Python code blocks in the Django documentation were reformatted with
- `blacken-docs`_.
-
-.. _blacken-docs: https://pypi.org/project/blacken-docs/
+ :pypi:`blacken-docs`.
Django-specific markup
======================
@@ -536,8 +534,7 @@ Spelling check
==============
Before you commit your docs, it's a good idea to run the spelling checker.
-You'll need to install `sphinxcontrib-spelling
-<https://pypi.org/project/sphinxcontrib-spelling/>`_ first. Then from the
+You'll need to install :pypi:`sphinxcontrib-spelling` first. Then from the
``docs`` directory, run ``make spelling``. Wrong words (if any) along with the
file and line number where they occur will be saved to
``_build/spelling/output.txt``.
diff --git a/docs/internals/organization.txt b/docs/internals/organization.txt
index a80ea6cea2..5fd8115b5a 100644
--- a/docs/internals/organization.txt
+++ b/docs/internals/organization.txt
@@ -109,15 +109,15 @@ Role
----
Releasers_ are a small set of people who have the authority to upload packaged
-releases of Django to the `Python Package Index`_, and to the
+releases of Django to the :pypi:`Python Package Index <Django>` and to the
`djangoproject.com`_ website.
Prerogatives
------------
Releasers_ :doc:`build Django releases </internals/howto-release-django>` and
-upload them to the `Python Package Index`_, and to the `djangoproject.com`_
-website.
+upload them to the :pypi:`Python Package Index <Django>` and to the
+`djangoproject.com`_ website.
Membership
----------
@@ -155,7 +155,6 @@ Otherwise, a Releaser may be removed by:
of the Django Software Foundation.
- A vote of the steering council.
-.. _`Python Package Index`: https://pypi.org/project/Django/
.. _djangoproject.com: https://www.djangoproject.com/download/
.. _steering-council:
diff --git a/docs/internals/security.txt b/docs/internals/security.txt
index e394a9a11a..373012b707 100644
--- a/docs/internals/security.txt
+++ b/docs/internals/security.txt
@@ -121,9 +121,10 @@ On the day of disclosure, we will take the following steps:
#. Apply the relevant patch(es) to Django's codebase.
-#. Issue the relevant release(s), by placing new packages on `the
- Python Package Index`_ and on the Django website, and tagging the
- new release(s) in Django's git repository.
+#. Issue the relevant release(s), by placing new packages on the :pypi:`Python
+ Package Index <Django>` and on the `djangoproject.com website
+ <https://www.djangoproject.com/download/>`_, and tagging the new release(s)
+ in Django's git repository.
#. Post a public entry on `the official Django development blog`_,
describing the issue and its resolution in detail, pointing to the
@@ -133,7 +134,6 @@ On the day of disclosure, we will take the following steps:
#. Post a notice to the |django-announce| and oss-security@lists.openwall.com
mailing lists that links to the blog post.
-.. _the Python Package Index: https://pypi.org/
.. _the official Django development blog: https://www.djangoproject.com/weblog/
If a reported issue is believed to be particularly time-sensitive --