Skip to content

Commit 267dc02

Browse files
authored
PEP 735: Add include-project to Deferred Ideas (#4012)
1 parent 168bf56 commit 267dc02

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

peps/pep-0735.rst

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -790,6 +790,38 @@ Compared with changes to ``[project.dependencies]`` and
790790
Therefore, given that this PEP declines to make changes to the ``[project]``
791791
table, changing ``[build-system]`` is also deferred.
792792

793+
794+
Why not support a Dependency Group which includes the current project?
795+
----------------------------------------------------------------------
796+
797+
Several usage scenarios for dependency groups revolve around installing a
798+
dependency group alongside a package defined in the ``[project]`` table.
799+
For example, testing a package involves installing testing dependencies and the
800+
package itself. Additionally, the compatibility of a dependency group with the
801+
main package is a valuable input to lockfile generators.
802+
803+
In such cases, it is desirable for a Dependency Group to declare that it
804+
depends upon the project itself. Example syntaxes from discussions included
805+
``{include-project = true}`` and ``{include-group = ":project:"}``.
806+
807+
However, if a specification is established to extend :pep:`508` with Path
808+
Dependencies, this would result in Dependency Groups having two ways of
809+
specifying the main package. For example, if ``.`` becomes formally supported,
810+
and ``{include-project = true}`` is included in this PEP, then dependency
811+
groups may specify any of the following groups
812+
813+
.. code-block:: toml
814+
815+
[dependency-groups]
816+
case1 = [{include-project = true}]
817+
case2 = ["."]
818+
case3 = [{include-project = true}, "."]
819+
case4 = [{include-project = false}, "."]
820+
821+
In order to avoid a confusing future in which multiple different options
822+
specify the package defined in ``pyproject.toml``, any syntax for declaring
823+
this relationship is omitted from this PEP.
824+
793825
.. _prior_art:
794826

795827
Appendix A: Prior Art in Non-Python Languages

0 commit comments

Comments
 (0)