Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace some PEP references with internal references #1405

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion source/discussions/deploying-python-applications.rst
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,8 @@ pex

`pex <https://pypi.org/project/pex/>`__ is a library for generating .pex
(Python EXecutable) files which are executable Python environments in the
spirit of virtualenvs. pex is an expansion upon the ideas outlined in :pep:`441`
spirit of virtualenvs. pex is an expansion upon the ideas
found in :doc:`zipapps <python:library/zipapp>`
and makes the deployment of Python applications as simple as cp. pex files may
even include multiple platform-specific Python distributions, meaning that a
single pex file can be portable across Linux and macOS. pex is released under the
Expand Down
14 changes: 8 additions & 6 deletions source/glossary.rst
Original file line number Diff line number Diff line change
Expand Up @@ -130,11 +130,13 @@ Glossary
or other resources, or some combination thereof that is intended to be
packaged into a :term:`Distribution <Distribution Package>`.

Since most projects create :term:`Distributions <Distribution Package>`
using either :pep:`518` ``build-system``, :ref:`distutils` or
:ref:`setuptools`, another practical way to define projects currently
is something that contains a :term:`pyproject.toml`, :term:`setup.py`,
or :term:`setup.cfg` file at the root of the project source directory.
Since projects create :term:`Distributions <Distribution Package>` using
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note to myself: removed "most" + reflow.

a :term:`build backend` specified in the :ref:`[build-system] table
<pyproject-guide-build-system-table>` of their :term:`pyproject.toml` file
(or with the deprecated practice of having a :term:`setup.py` without an
accompanying :file:`pyproject.toml`), another practical way to define
projects currently is something that contains a :file:`pyproject.toml`
or :file:`setup.py` file at the root of the project source directory.

Python projects must have unique names, which are registered on
:term:`PyPI <Python Package Index (PyPI)>`. Each project will then
Expand Down Expand Up @@ -182,7 +184,7 @@ Glossary
pyproject.toml

The tool-agnostic :term:`Project` specification file.
Defined in :pep:`518`.
See :ref:`writing-pyproject-toml`.

Release

Expand Down
11 changes: 6 additions & 5 deletions source/guides/packaging-namespace-packages.rst
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ Creating a namespace package
There are currently two different approaches to creating namespace packages,
from which the latter is discouraged:

#. Use `native namespace packages`_. This type of namespace package is defined
in :pep:`420` and is available in Python 3.3 and later. This is recommended if
#. Use `native namespace packages`_. This type of namespace package
is available in Python 3.3 and later. This is recommended if
packages in your namespace only ever need to support Python 3 and
installation via ``pip``.
#. Use `legacy namespace packages`_. This comprises `pkgutil-style namespace packages`_
Expand All @@ -72,8 +72,9 @@ from which the latter is discouraged:
Native namespace packages
-------------------------

Python 3.3 added **implicit** namespace packages from :pep:`420`. All that is
required to create a native namespace package is that you just omit
Python 3.3 added **implicit** namespace packages
(documented in :doc:`python:reference/import`).
All that is required to create a native namespace package is that you just omit
:file:`__init__.py` from the namespace package directory. An example file
structure (following :ref:`src-layout <setuptools:src-layout>`):

Expand Down Expand Up @@ -155,7 +156,7 @@ the `native namespace package example project`_.
Legacy namespace packages
-------------------------

These two methods, that were used to create namespace packages prior to :pep:`420`,
These two methods, that were used to create namespace packages prior to Python 3.3,
are now considered to be obsolete and should not be used unless you need compatibility
with packages already using this method. Also, :doc:`pkg_resources <setuptools:pkg_resources>`
has been deprecated.
Expand Down
1 change: 1 addition & 0 deletions source/guides/writing-pyproject-toml.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ three possible TOML tables in this file.
:ref:`setup-py-deprecated`.


.. _pyproject-guide-build-system-table:

Declaring the build backend
===========================
Expand Down
6 changes: 3 additions & 3 deletions source/key_projects.rst
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ not only provides features that plain :ref:`distutils` doesn't offer
also provides a consistent build interface and feature set across all
supported Python versions.

Consequently, :ref:`distutils` was deprecated in Python 3.10 by :pep:`632` and
Consequently, :ref:`distutils` was deprecated in Python 3.10 (by :pep:`632`) and
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note for myself: style change — parens.

has been :doc:`removed <python:whatsnew/3.12>` from the standard library in
Python 3.12. Setuptools bundles the standalone copy of distutils, and it is
injected even on Python < 3.12 if you import setuptools first or use pip.
Expand Down Expand Up @@ -523,7 +523,7 @@ pdm
`PyPI <https://pypi.org/project/pdm>`__

PDM is a modern Python package manager. It uses :term:`pyproject.toml` to store
project metadata as defined in :pep:`621`.
project metadata in the :ref:`[project] table <pyproject-project-table>`.

.. _pex:

Expand Down Expand Up @@ -665,7 +665,7 @@ shiv
`PyPI <https://pypi.org/project/shiv/>`__

shiv is a command line utility for building fully self contained
Python zipapps as outlined in :pep:`441`, but with all their
Python :doc:`zipapps <python:library/zipapp>`, with all their
dependencies included. Its primary goal is making distributing Python
applications and command line tools fast & easy.

Expand Down
3 changes: 2 additions & 1 deletion source/specifications/entry-points.rst
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,8 @@ Within a value, readers must accept and ignore spaces (including multiple
consecutive spaces) before or after the colon, between the object reference and
the left square bracket, between the extra names and the square brackets and
colons delimiting them, and after the right square bracket. The syntax for
extras is formally specified as part of :pep:`508` (as ``extras``) and
extras is formally specified in the :ref:`dependency specifier specification
<dependency-specifiers>` (as ``extras``) and
restrictions on values specified in :pep:`685`.
For tools writing the file, it is recommended only to insert a space between the
object reference and the left square bracket.
Expand Down
12 changes: 6 additions & 6 deletions source/specifications/pyproject-toml.rst
Original file line number Diff line number Diff line change
Expand Up @@ -352,9 +352,8 @@ be ambiguous in the face of ``[project.scripts]`` and
``dependencies``/``optional-dependencies``
------------------------------------------

- TOML_ type: Array of :pep:`508` strings (``dependencies``), and a
table with values of arrays of :pep:`508` strings
(``optional-dependencies``)
- TOML_ type: Array of strings (``dependencies``), and a
table with values of arrays of strings (``optional-dependencies``)
- Corresponding :ref:`core metadata <core-metadata>` field:
:ref:`Requires-Dist <core-metadata-requires-dist>` and
:ref:`Provides-Extra <core-metadata-provides-extra>`
Expand All @@ -363,12 +362,13 @@ The (optional) dependencies of the project.

For ``dependencies``, it is a key whose value is an array of strings.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(general contribution process feedback)

Try not to reflow lines that don't change the content: it's hard to compare what changed, if an entire block of 13 lines is marked as updated — this causes an unnecessary cognitive load for the reviewers trying to compare strings byte-by-byte...

This is the reason it's recommended to split the formatting changes from the functional ones in normal code projects, but I'm sure it's also applicable to the docs.

Here's a collection of materials related to review processes, I enjoyed reading — maybe you'll find some insights for yourself too:

Each string represents a dependency of the project and MUST be
formatted as a valid :pep:`508` string. Each string maps directly to
a :ref:`Requires-Dist <core-metadata-requires-dist>` entry.
formatted as a valid :ref:`dependency specifier <dependency-specifiers>`.
Each string maps directly to a :ref:`Requires-Dist <core-metadata-requires-dist>` entry.

For ``optional-dependencies``, it is a table where each key specifies
an extra and whose value is an array of strings. The strings of the
arrays must be valid :pep:`508` strings. The keys MUST be valid values
arrays must be valid :ref:`dependency specifiers <dependency-specifiers>`.
The keys MUST be valid values
for :ref:`Provides-Extra <core-metadata-provides-extra>`. Each value
in the array thus becomes a corresponding
:ref:`Requires-Dist <core-metadata-requires-dist>` entry for the
Expand Down
6 changes: 1 addition & 5 deletions source/tutorials/installing-packages.rst
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ To install greater than or equal to one version and less than another:


To install a version that's :ref:`compatible <version-specifiers-compatible-release>`
with a certain version: [4]_
jeanas marked this conversation as resolved.
Show resolved Hide resolved
with a certain version:

.. tab:: Unix/macOS

Expand Down Expand Up @@ -676,7 +676,3 @@ you know publishes one, you can include it in the pip installation command:
:ref:`virtualenv`) will create virtualenv environments with ``pip``
pre-installed, thereby making it an equal alternative to
:ref:`virtualenv`.

.. [4] The compatible release specifier was accepted in :pep:`440`
and support was released in :ref:`setuptools` v8.0 and
:ref:`pip` v6.0