-
Notifications
You must be signed in to change notification settings - Fork 932
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bring over PEPs 517, 518, and 660 to the specs section #955
Comments
Would this involve unifying PEP 517 and PEP 660 in the resulting PyPA spec, with PEP 518 specifying the |
Probably all of that into a single spec. the But I'm not doing the work and I can also see an argument to potentially do it separately. |
I agree. Please see related discussion at Discuss: What new Reference or Explanation would usefully reduce confusion?. My thought is that there should be two specifications, one for the behaviour of tools and one for the format and location of the
In the thread at Discuss, I ask if we have a consensus on the desirability of creating this/these specification(s). Do we? |
Migrating the specs in these PEPs to the PyPA specifications site is uncontroversial, formally approved and well understood to be beneficial and necessary in the long term. The major reason it hasn't happened so far is simply due no one with the relevant skills/background and motivation to do it having yet been able to find the time. It might be possible to guide someone else without a strong background in the packaging ecosystem in what to do, since its mostly an editorial and mechanical task, and we could help specify the high-level organization. However, the person would need to have a strong grasp of reST/Sphinx syntax, roles, directives and other constructs, and be a solid technical writer, and I'd be concerned that the time it would take to guide the contributor and address issues during review would be more time-consuming for both parties involved than me just dedicating a day to it and knocking it out. On the other hand, it would be uniquely valuable to be a user like yourself relatively new to the details of packaging but interested and motivated to understand it better, when it comes to helping revise the existing user-focused PyPUG "Tutorial" and "Explanation" type content, and in particular @cameron-simpson 's proposed high-level overview of the packaging ecosystem. |
It seems there are four different approaches suggested this far: Summary of proposed approaches (click to expand)
After thinking about these ideas some more, re-reading the PEPs and mocking up some outlines, I propose migrating the aforementioned PEPs via the following structure. This includes a dedicated high-level document for Further, the below proposal separates the specification of the frontend-backend Python hooks and interface from the declaration of the Proposed structure with mapping from existing PEP sections (click to expand)
|
It would be good for a Source: this Discuss question: Adding extra fields in the pyproject.toml authors/maintainers list.
|
As mentioned on #1093 , I hope to have a draft of the above proposed structure up as a PR here by sometime this week, presuming no major objections (though I've given due consideration to such alternatives, it is relatively flexible to adapt if reviewers feel that, e.g. "Declaring a project's build system" should be a subsection of "Build backend interface specification", or that the hooks in the latter should be organized by required/optional rather than build type).
The process of migrating the specifications described in this issue is strictly an editorial one; to that end, I've been careful to map existing atomic normative sections in the approved PEPs as directly as practicable to those of the proposed unified specifications, aside from any changes from subsequent approved PEPs (e.g. explicitly adding the Any non-trivial changes to the normative content need to follow the PyPA specification update process, which depending on the scope of the change, range from a normal pull request on this repo (once the spec is migrated) for trivial corrections, typos and similar; a Discourse discussion for small but potentially content-relevant changes, or a new PEP for significant changes. In any case, the question being asked there concerns keys in the project table, which are defined by the Declaring project [source] metadata specification already hosted here, which explicitly states that "No tools may add fields to this table which are not defined by this specification" and that the Also, note that PEP includes |
This comment was marked as off-topic.
This comment was marked as off-topic.
Ah, @CAM-Gerlach responded to your question on https://discuss.python.org/t/adding-extra-fields-in-the-pyproject-toml-authors-maintainers-list/16848/3 as well. I'll mark the preceding discussion as off-topic, since it's more of a question about the spec, rather than related to actually moving them over. |
As an on-topic portion of my comment was hidden as well (I should have initially, collapsed the off-topic portion with
Well, actually, I answered the Discourse thread OP's question over there :) ; I still suggest @JDLH read my collapsed reply here, as it attempts to clear up some broader confusion about the what is in and out of scope for this proposed spec migration, and what he can do if he would like to change the content of the specs themselves, as it appeared he was requesting previously on the other Discourse thread. |
Thank you for the replies. I intended my comment as a test case for the usefulness of the new specification, not as a proposal for a substantive change. Thus I sort of think it is on-topic. This issue talks about writing a specification document that will explain to app developers about what goes into |
Well, not quite—this issue is about moving existing specification content regarding how build frontends and backends interact to build sdists and wheels, to the PyPA spec section to serve as reference material for packaging tool implementors, which is not really the same thing as a new "explanation"-oriented document aimed at regular Python developers. If you think such a document would be useful (and there certainly seems to be plenty of room for such), I encourage you to open an issue. However, the particular question being asked was about the content of the
While this is a question that is already answered by an existing specification and not actually part of the three core PEPs in question, the structure I propose to implement here should greatly help the important discoverability problem you and the OP highlighted in how it was rather non-obvious to find, underscoring my rationale for it, as it includes a dedicated top-level document for the |
I think we agree that we are talking about reference material, what Diàtaxis calls a Specification, not an Explanation.
Which entity is expected to type in values into the fields of the Or is it specified that build frontends shall collect project metadata from app developers, and write it in |
Err, the Diataxis term for "reference" is..."refrence"? But really, I was rather imprecise with the Diataxis allusions; the specification is not primarily user-facing documentation at all, but rather a formal, technical standards document.
Both package authors and packaging tools (though not build backends/frontends directly, as opposed to wrappers, converters and other tools) may generate/update the Furthermore, this is not user-facing documentation (though it may incidentally serve that role), but rather a formal, normative specification. If there is a strong need which it does not fill in the former area, then a new document should be created instead to do so. If you would like to propose changes to another specification, or new user-facing documentation, I think the most productive course of action for all involved would be to open an appropriate issue/PR. |
You seem to be making a distinction between "user-facing" and "formal, technical standards document", which I think I look at differently. That may lead to us talking past each other a bit
What this says to me is that package authors are part of the audience for the formal, technical standards document defining For instance, if as a package author, I get the idea of "adding other identifiers (like ORCID ) is something that makes sense for our use case", I would expect that I could look up the relevant section in the specification and get an answer about whether that is allowed. Would you consider this a "user-facing" activity? I would call it, author of an artifact finding out what the rules really are for that artifact. Bringing this back to the core of this Issue 955, I make these comments in an attempt to suggest some requirements that a formal standards document should meet, to do an even better job of bringing PEPs 517, 518, and 660 to the specs section. Someone else gets to decide whether to adopt those requirements for this document.
Oops, you got me there. Thank you for correcting me. |
To be clear, I don't mean to imply that package authors aren't a secondary audience for the document; they just aren't the original intended primary audience, as I understand it. That being said, small editorial changes to clarify unclear language seem fairly likely to be accepted, and in a broader sense changes that aid in understanding and don't harm the specification's primary purpose as such seem, to me, to be in scope to. On that note, in python/peps#2680 , @pradyunsg , @brettcannon and I discussed changes to improve the spec for both audiences, in particular moving over the examples from PEP 621 to here to aid understanding and reduce the potential for ambiguity and confusion. Perhaps that might be something someone else could help with if I don't get to it first, presuming they are somewhat familiar with technical writing and reST/Sphinx syntax? 😉
If it involves injecting something special within the value of the existing
So long as it only involves valid characters as defined for an email name in RFC 822, then its fine. However, if it involves injecting a whole new key, then it would require, at a minimum, that one or more packaging tools explict add and document support for it, for which the packaging tool's normative documentation would be the canonical reference. Of course, that would still not be allowed by PEP 621, and conforming tools would produce a clear error message when attempting this. In the Discourse thread, I'd suggested a clarification to make explicit that any sub-table should also be as-specified in the PEP, without any non-standard keys.
My curmudgeon-ing aside, like I mentioned on Discourse, its always good to have a pair of eyes on something technical one writes that they may be more familiar with than many readers, since its easy to leave things implicit, assumed or unclear to others. I've seen that from both sides myself, including on PEP 621 itself. |
Its finally done! Opened a PR as #1111 |
I'll consolidate this into #1093, since we're tracking this as part of a broader effort now. Thanks for the discussion so far folks, and please take a look at the PR listed above! :) |
Huh, why now, after all this, when I finally just opened a PR specifically to close this issue? I'm confused... |
I mean, we can close this via your PR, I don’t mind that either. :) |
Determined that the order of parameters in the Appendix A example code was wrong, and fixed it. This matters because `pyproject_hooks` passes them positionally, despite that both default to `None` and it's not at all obvious what order they "should" be in. I commented on python/peps#2536, and cited pypa/packaging.python.org#1111, to draw attention to the issue in the PEP. The corresponding documentation issue, pypa/packaging.python.org#955, still appears not to be resolved.
As of right now various specifications reference those PEPs but there is no complete view of what they contain (e.g. the sdist spec references PEP 518 for what
pyproject.toml
although technically it should also reference PEP 517 for being to actually build an sdist from a source tree). We should probably have a single specification that covers how to build sdists and wheels from a source tree which the sdist and wheel format specs can reference on how to end up with those binary artifacts.The text was updated successfully, but these errors were encountered: