Commit Graph

12 Commits

Author SHA1 Message Date
Stephen Rosen 267dc02fc0
PEP 735: Add include-project to Deferred Ideas (#4012) 2024-10-02 14:05:48 -07:00
Stephen Rosen 79a41d1002
PEP 735: apply community feedback, including reversion of [project] table changes (#3990) 2024-10-01 11:46:04 -07:00
Stephen Rosen 2ec2140ec8
PEP 735: expand "How to Teach This" (#3945)
With the addition of `project.dependencies` includes from Dependency
Groups, additions are warranted in the "How to Teach This" section of
the PEP.

Firstly, it is now useful to mention the similarity between a
dependency group and an old-style `setup.py` which reads either as

    setup(install_requires=_read_helper("requirements.txt"), ...)

or else as

    requirements = ["foo", ...]
    ...
    setup(install_requires=requirements, ...)

Secondly, discussion of the interfaces for Dependency Groups adds a
dimension to the document. For tool authors, this clarifies that
allowing `project.dependencies` to use includes is necessary for
build backends to declare support, but that there are no other formal
requirements for tools. They will have to decide on interfaces -- and
therefore what it means to support Dependency Groups -- for
themselves. The spec provides only for the data. Additionally, the
consequences for users, and the fact that this allows tools to define
and enforce additional rules (which they must document) are called out
explicitly.

Implicitly, this hints that it is possible for tools to have
conflicting requirements, so that it may become possible for toolA and
toolB to have incompatible or at least orthogonal needs. Due to the
relatively low risk of outright conflicts, and the ability of
responsible tool maintainers to work through such cases if they do
arise, this is not addressed at length.
2024-09-04 16:11:28 -07:00
Stephen Rosen 4660531503
PEP 735: allow core metadata to include groups (#3943)
PEP 735 is expanded here to allow `project.dependencies` and
`project.optional-dependencies` to use Dependency Group Includes. This
allows for includes which help satisfy the use-cases described by the
`--only-deps` pip use-cases.

The changes for this are various:
- support for these includes is added to the rationale section
- a new use case is added, aligned with the `--only-deps` use case
- the spec section is updated to list changes to the `project` table
- backwards compatibility is extended significantly to address
  repackaging concerns as well as dependency analyzers[^1]
- "how to teach this" is also extended to note compatibility and
  repackaging issues
- rejected ideas has added an item on `[build-system.requires]`

[^1]: It may be overstatement to say these concerns are addressed.
They are considered and not dismissed, but it is not clear that any
choices can be made in the spec to address these issues other than to
inform users.

Additionally, one unrelated change is included: the spec now notes
explicitly that extra names and dependency group names can overlap
(this was already possible, implicitly) and instructs tools to decide
on their own how to handle that if they present dependency groups and
extras via a uniform interface.

Co-authored-by: Brett Cannon <brett@python.org>
2024-09-04 14:27:31 -07:00
Stephen Rosen e947a9dcb0
PEP 735: rename 'include' to 'include-group' (#3836)
This changes the key used in PEP 735 Dependency Group Includes to be
'include-group'. Per feedback, and related to discussions about the
future direction of the PEP, this key will be less ambiguous when
Dependency Group Includes appear in other contexts and tables.
2024-06-14 16:01:17 -07:00
Stephen Rosen c55835e170
PEP 735: Refine phrasing around 'non-standard' tool features (#3689)
Refine "non-standard" phrasing in PEP 735

One of the Poetry maintainers noted tha the current phrasing could be
read as a negative take on `poetry` and `pdm` using "non-standard"
data.

At the same time, it's important to be clear that the problem being
solved here is not adequately solved by the existing tools due to the
lack of an existing underlying standard.

This rephrasing tries to balance these two concerns, describing the
current behaviors as 'tool specific' and focusing on "standardization"
(positive) rather than "non-standardization" (negative).
2024-02-26 11:05:24 -08:00
Sviatoslav Sydorenko (Святослав Сидоренко) 9c5d66b67d
PEP 735: Fix a typo — "iif" -> "if" (#3685) 2024-02-20 19:10:31 -08:00
Stephen Rosen 9d82dd1cd8
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>
2024-01-26 15:47:10 -08:00
Stephen Rosen bf96565f05
PEP 735: 'Draft 3', updating to match current discussion (#3607)
- Remove the PEP 723 use-case
- Change to non-normalized names which require normalization
  - Update the reference implementation to normalize
- Clarify the meaning of an Include
- Forbid cycles in includes
- Add a section on validation and compatibility which clearly defines
  future-compatible behavior
- Remove 'include list' from open issues
- Add 'includes of `[project]` tables' to open issues
2024-01-03 14:38:27 -08:00
Stephen Rosen 2a8ea315ef
PEP 735: Draft 2 of Dependency Groups in pyproject.toml (#3566)
The major changes are as follows:
- remove support for path dependencies (!)
- include a reference implementation
- move 'use cases' into appendix
- rephrase position vis-a-vis Poetry and PDM, and move details
  of those tools into an appendix
- include more example data throughout
- explicitly address the lack of standardization around "reserved
  names" for Dependency Groups in several places

This revision should be shorter as well. Some redundant and wordy
sections have been struck or rewritten.

---------

Co-authored-by: Brett Cannon <brett@python.org>
2023-12-06 10:06:00 -08:00
Stephen Rosen d75db62fa3
PEP 735: Add prior art sections for JS and Ruby to appendices (#3557)
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-authored-by: Brett Cannon <brett@python.org>
2023-11-30 13:37:22 -08:00
Stephen Rosen 1a089b850e
PEP 735: Dependency Groups in pyproject.toml (#3541)
Co-authored-by: James Webber <jamestwebber@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-authored-by: Brett Cannon <brett@python.org>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Thomas Grainger <tagrain@gmail.com>
Co-authored-by: chrysle <fritzihab@posteo.de>
2023-11-28 17:15:22 -08:00