Skip to content

Commit b8f1509

Browse files
committed
Grammar and spelling
1 parent 5731038 commit b8f1509

1 file changed

Lines changed: 15 additions & 20 deletions

File tree

peps/pep-0771.rst

Lines changed: 15 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Motivation
2525

2626
Various use cases for default extras and possible solutions in this PEP were discussed
2727
extensively on `this DPO thread <https://discuss.python.org/t/adding-a-default-extra-require-environment/4898>`__.
28-
These fall into two broad cases that that provide the
28+
These fall into two broad cases that provide the
2929
motivation for the present PEP.
3030

3131
Recommended but not required dependencies
@@ -35,7 +35,7 @@ Package maintainers often use extras to declare optional dependencies that
3535
extend the functionality or performance of a package. In some cases, it can be
3636
difficult to determine which dependencies should be required and which should be
3737
categorized as extras. A balance must be struck between the needs of typical
38-
users (who may prefer most features to be available 'by default') and users who
38+
users, who may prefer most features to be available by default, and users who
3939
want minimal installations without large, optional dependencies. One solution
4040
with existing Python packaging infrastructure is for package maintainers to
4141
define an extra called, for example, ``recommended``, which
@@ -71,15 +71,15 @@ is. Concrete examples of such frontends or backends include:
7171
<https://www.postgresql.org/>`_, `SQLite <https://www.sqlite.org/>`_
7272

7373
With current packaging standards, maintainers have to either
74-
require one of the backends or frontends, or require users
75-
to always specify extras, e.g. ``package[backend]`` and therefore risk users
74+
require one of the backends or frontends or require users
75+
to always specify extras, e.g., ``package[backend]``, and therefore risk users
7676
having an unusable installation if they only install ``package``. Having a
7777
way to specify one or more default backend or frontend and providing a way to
7878
override these defaults would provide a much better experience for users, and
7979
the approach described in this PEP will allow this.
8080

8181
Note that this PEP does not aim to address the issue of disallowing conflicting
82-
or incompatible extras - for example if a package requires exactly one frontend
82+
or incompatible extras, for example if a package requires exactly one frontend
8383
or backend package. There is currently no mechanism in Python packaging
8484
infrastructure to disallow conflicting or incompatible extras to be installed,
8585
and this PEP does not change that.
@@ -94,13 +94,13 @@ recommend a default extra to install a backend or frontend include:
9494
* `glueviz <https://www.glueviz.org>`_: ``glueviz[qt]``
9595

9696
In all three cases, installing the package without any extras results in a
97-
broken installation (and this is a commonly reported issue for some of these
98-
packages).
97+
broken installation, and this is a commonly reported issue for some of these
98+
packages.
9999

100100
Rationale
101101
=========
102102

103-
A number of possible solutions have been extensively and vigorously discussed by
103+
A number of possible solutions have been extensively discussed by
104104
the community for several years, including in `this DPO thread
105105
<https://discuss.python.org/t/adding-a-default-extra-require-environment/4898>`__
106106
as well as in numerous issues and pull requests. The solution that is
@@ -110,7 +110,7 @@ presented below:
110110
* is flexible enough to accommodate both of the major use cases described in `Motivation`_
111111
* re-uses the syntax from :pep:`508`
112112

113-
It is the only solution out of all those discussed that meets all three criteria.
113+
It is the only solution, out of all those discussed, that meets all three criteria.
114114

115115
Specification
116116
=============
@@ -121,7 +121,7 @@ Specification
121121
A new multiple-use metadata field, ``Default-Extra``, will be added to the `core package
122122
metadata <https://packaging.python.org/en/latest/specifications/core-metadata/#core-metadata>`_.
123123
For this field, each entry must be a string specifying an extra that will be
124-
automatically included when the package is installed without any extras specified explicitly.
124+
automatically included when the package is installed without any extras being specified explicitly.
125125

126126
Only entries already specified in a `Provides-Extra
127127
<https://packaging.python.org/en/latest/specifications/core-metadata/#provides-extra-multiple-use>`_
@@ -174,7 +174,6 @@ and:
174174
"backend3"
175175
]
176176
177-
178177
Overriding default extras
179178
-------------------------
180179

@@ -309,7 +308,6 @@ could then use:
309308
310309
$ pip install astropy[]
311310
312-
313311
Packages requiring at least one backend or frontend
314312
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
315313

@@ -483,8 +481,8 @@ Ideally, one may want the following behavior:
483481
$ pip install package[frontend2] # installs frontend2 and default backend
484482
$ pip install package[backend1, frontend2] # installs backend1 and frontend2
485483
486-
However, this PEP chooses not to provide a mechanism for having the fact that
487-
``backend1`` is specified disabling the default backend but keep the default
484+
However, this PEP chooses not to provide a mechanism for making it so that e.g., if
485+
``backend1`` is specified, this disabling the default backend but keeps the default
488486
frontend, since this adds complexity.
489487

490488
Maintainers should instead for now document that if a backend or frontend is
@@ -509,8 +507,8 @@ the default backend and frontend. They can then recommend that users do:
509507
This would allow (if desired) users to then get whatever the recommended backend
510508
is, even if that default changes in time.
511509

512-
If there was a desire to implement a better solution in future, we believe this
513-
PEP does not preclude this. For example, one could imagine in future adding the
510+
If there is a desire to implement a better solution in future, we believe this
511+
PEP should not preclude this. For example, one could imagine in future adding the
514512
ability for an extra to specify *which* default extras it disables rather than
515513
disabling all default extras, but the default could still be for explicitly
516514
specified extras to disable all default extras, which would be consistent with
@@ -648,7 +646,7 @@ following recommendations would apply:
648646
the extra explicitly as long as possible (until it is clear that most/all users
649647
are using package installers that implement this PEP). There is no downside to
650648
keeping the extra be explicitly mentioned, but this will ensure that users with
651-
modern tooling who do not read documentation (which may be a non-negligeable
649+
modern tooling who do not read documentation (which may be a non-negligible
652650
fraction of the user community) will start getting the recommended
653651
dependencies by default.
654652

@@ -816,8 +814,6 @@ In addition, `this branch <https://github.com/astrofrog/flit/tree/default-extras
816814
contains a modified version of the `Flit
817815
<https://flit.pypa.io/en/stable/>`_ package.
818816

819-
820-
821817
The implementations above are proofs-of-concept at this time and the existing changes have
822818
not yet been reviewed by the relevant maintainers. Nevertheless, they are
823819
functional enough to allow for interested maintainers to try these out.
@@ -1051,7 +1047,6 @@ a ``setup.py`` file can do::
10511047
extras_require={'': ['package_a']},
10521048
)
10531049

1054-
10551050
which is valid and equivalent to having ``package_a`` being defined in
10561051
``install_requires``, so changing the meaning of the empty string would
10571052
break compatibility.

0 commit comments

Comments
 (0)