Skip to content

Commit

Permalink
More alternatives
Browse files Browse the repository at this point in the history
  • Loading branch information
astrofrog committed Sep 25, 2024
1 parent 558d833 commit f6b4061
Showing 1 changed file with 26 additions and 1 deletion.
27 changes: 26 additions & 1 deletion peps/pep-tbd.rst
Original file line number Diff line number Diff line change
Expand Up @@ -123,5 +123,30 @@ Specifying any extras explicitly unselects all defaults

An alternative considered was that specifying any extras would automatically
unselect all default extras, removing the need for a new syntax for unselecting.
However, this would not be sufficient, as there would be no way of removing
default extras without adding a new extras - i.e. there would be no way of
doing a minimal installation.

TBD - Further discussion is required to determine if this is the preferred approach.
Relying on tooling to deselect any default extras
-------------------------------------------------

Another option to unselect extras would be to have this be implemented at the
level of packaging tools. For instance, pip could include an option such as::

pip install package --no-default-extras

which would then require all desired extras to be explicitly specified. This
could also be made to be applicable to all or just specific packages, similar to
e.g. the ``--no-binary`` option, so::

pip install package --no-default-extras :all:

or specifying specific packages to ignore the defaults from. The advantage of
this approach would be that it would be guaranteed that tools that support
installing the defaults also support unselecting them.

By comparison, with the - syntax, if a package deep down the dependency tree
uses the ``-`` syntax in its dependency list, any other package depending on it
would only be installable with recent packaging tooling.

TBD: determine if this is actually a better solution?

0 comments on commit f6b4061

Please sign in to comment.