Skip to content

Commit 6ebf469

Browse files
committed
Added paragraph about bloating and pytest
1 parent dd2f519 commit 6ebf469

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

peps/pep-0771.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -663,6 +663,18 @@ installations and complicating dependency trees. Using default extras does not
663663
mean that all extras need to be defaults, and there is still scope for users to
664664
explicitly opt in to non-default extras.
665665

666+
In essence, default extras should be considered just as 'weighty' as a required
667+
dependency. In some cases, if a package is widely used by many others, if it
668+
adds a default extra, then unless all downstream packages update their
669+
dependencies to specifically request a minimal installation, the defaults will
670+
often end up getting installed. A concrete example of this is that the `pytest
671+
<https://docs.pytest.org>`_ package has almost 1500 plugins at the time of
672+
writing, all of which depend on pytest. If pytest was to start using a default
673+
extra, it would need to consider this very carefully, as if the plugins are not
674+
updated, installing any plugin will result in the default extra being
675+
installed. This is not to say that it should not use default extras, but just
676+
that the decision should be considered and planned carefully.
677+
666678
Inheriting from default extras
667679
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
668680

0 commit comments

Comments
 (0)