Skip to content

Commit 9d82dd1

Browse files
sirosenhugovk
andauthored
PEP 735: Minor updates and fixes (#3627)
- Minor corrections / typo fixes - Use a ref role for `use_cases` link. As currently written, it renders incorrectly to a relative link to a `use_cases` page. - Fix header style for Use Cases Appendix - Add an explicit Compatibility section to Rationale Future compatibility and designing the Dependency Groups data to be extensible is a particular area of concern within the PEP. Although it is addressed to some degree in the Specification, this small note in the Rationale clarifies that compatibility with spec extensions is a --------- Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
1 parent 1eb29bb commit 9d82dd1

File tree

1 file changed

+25
-11
lines changed

1 file changed

+25
-11
lines changed

peps/pep-0735.rst

Lines changed: 25 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ Use Cases
154154
---------
155155

156156
The following use cases are considered important targets for this PEP. They are
157-
defined in greater detail in the `Use Cases Appendix <use_cases>`_.
157+
defined in greater detail in the :ref:`Use Cases Appendix <use_cases>`.
158158

159159
* Web Applications deployed via a non-python-packaging build process
160160
* Libraries with unpublished dev dependency groups
@@ -195,6 +195,20 @@ further:
195195
* installation of a Dependency Group does not imply installation of a package's
196196
dependencies (or the package itself)
197197

198+
Future Compatibility & Invalid Data
199+
-----------------------------------
200+
201+
Dependency Groups are intended to be extensible in future PEPs.
202+
However, Dependency Groups should also be usable by multiple tools in a
203+
single Python project.
204+
With multiple tools using the same data, it is possible that one implements
205+
a future PEP which extends Dependency Groups, while another does not.
206+
207+
To support users in this case, this PEP defines and recommends validation
208+
behaviors in which tools only examine Dependency Groups which they are using.
209+
This allows multiple tools, using different versions of Dependency Groups data,
210+
to share a single table in ``pyproject.toml``.
211+
198212
Specification
199213
=============
200214

@@ -1034,10 +1048,10 @@ Web Applications
10341048
A web application (e.g. a Django or Flask app) often does not need to build a
10351049
distribution, but bundles and ships its source to a deployment toolchain.
10361050

1037-
For example, a source code repository may define python packaging metadata as
1051+
For example, a source code repository may define Python packaging metadata as
10381052
well as containerization or other build pipeline metadata (``Dockerfile``,
10391053
etc).
1040-
The python application is built by copying the entire repository into a
1054+
The Python application is built by copying the entire repository into a
10411055
build context, installing dependencies, and bundling the result as a machine
10421056
image or container.
10431057

@@ -1052,9 +1066,9 @@ without relying on packaging metadata, and without trying to express their
10521066
needs in packaging terms.
10531067

10541068
Libraries
1055-
'''''''''
1069+
---------
10561070

1057-
Libraries are python packages which build distributions (sdist and wheel) and
1071+
Libraries are Python packages which build distributions (sdist and wheel) and
10581072
publish them to PyPI.
10591073

10601074
For libraries, Dependency Groups represent an alternative to ``extras`` for
@@ -1090,12 +1104,12 @@ install the appropriate Dependency Groups along with the library when needed,
10901104
as in the case of ``test``.
10911105

10921106
Data Science Projects
1093-
'''''''''''''''''''''
1107+
---------------------
10941108

10951109
Data Science Projects typically take the form of a logical collection of
10961110
scripts and utilities for processing and analyzing data, using a common
10971111
toolchain. Components may be defined in the Jupyter Notebook format (ipynb),
1098-
but rely on the same common core set of utlities.
1112+
but rely on the same common core set of utilities.
10991113

11001114
In such a project, there is no package to build or install. Therefore,
11011115
``pyproject.toml`` currently does not offer any solution for dependency
@@ -1133,7 +1147,7 @@ scripts. Such combinations of data are left as a problem for tool authors to
11331147
solve, and perhaps eventually standardize.
11341148

11351149
Lockfile Generation
1136-
'''''''''''''''''''
1150+
-------------------
11371151

11381152
There are a number of tools which generate lockfiles in the Python ecosystem
11391153
today. PDM and Poetry each use their own lockfile formats, and pip-tools
@@ -1174,7 +1188,7 @@ As two examples of how combinations might be locked:
11741188
solution, rather than a set or matrix of solutions.)
11751189

11761190
Environment Manager Inputs
1177-
''''''''''''''''''''''''''
1191+
--------------------------
11781192

11791193
A common usage in tox, Nox, and Hatch is to install a set of dependencies into
11801194
a testing environment.
@@ -1217,9 +1231,9 @@ environment managers, the environment managers will need to support processing
12171231
Dependency Groups similarly to how they support inline dependency declaration.
12181232

12191233
IDE and Editor Use of Requirements Data
1220-
'''''''''''''''''''''''''''''''''''''''
1234+
---------------------------------------
12211235

1222-
IDE and Editor integrations may benefit from conventional or configurable name
1236+
IDE and editor integrations may benefit from conventional or configurable name
12231237
definitions for Dependency Groups which are used for integrations.
12241238

12251239
There are at least two known scenarios in which it is valuable for an editor or

0 commit comments

Comments
 (0)