Skip to content

Infra: Make Discussion-To optional in source, display from latest Post-History during build #5158

In review

Description

@hugovk

PEPs process streamlining thought:

  • Discussion-To is a URL
  • Post-History is a list of URLs and dates

Currently both are required, but authors often forget to add one.

Do we need really them both in the PEP source?

We could make Discussion-To optional, and if it's missing, take the last Post-History link and set that as Discussion-To in the rendered HTML.

No changes needed for the existing PEPs that already have Discussion-To.

Activity

  1. added
    infra
    on Oct 1, 2026
  2. vaibhavlord commented on Nov 24, 2026

    @vaibhavlord
    Contributor

    Hi, I’d like to work on this. When Discussions-To is absent from the PEP source, I’d have the HTML build generate it from the last linked entry in Post-History. An explicit Discussions-To would take precedence, and if Post-History has no links, the page would omit the field. I’d add tests for those three cases.

    Two details I’d like to confirm. If the last entry links to a specific Discourse reply, should the generated field use that exact URL or the topic URL? And should this PR also update the authoring guidance in PEPs 1 and 12?

  3. hugovk commented on Nov 24, 2026

    @hugovk
    MemberAuthor

    If the last entry links to a specific Discourse reply, should the generated field use that exact URL or the topic URL?

    Good question. Right now, Post-History can be a topic, or a post in a topic. But Discussions-To cannot be a post and must be the topic itself.

    Discussions-To is "where should I go with feedback?" So I'd say if the last Post-History is a post in a topic, then Discussions-To should use the topic itself.

    And should this PR also update the authoring guidance in PEPs 1 and 12?

    Yes, we can update them, but let's do an infra PR first and consider the PEPs afterwards.

  4. vaibhavlord commented on Nov 24, 2026

    @vaibhavlord
    Contributor

    Thanks, I’ll update the renderer to use the last Post-History link when Discussions-To is missing. If that link points to a Discourse reply, the generated link will go to the topic. I’ll include tests in the infra PR.

  5. hugovk commented on Dec 1, 2026

    @hugovk
    MemberAuthor

    #5244 updated the code, #5254 will update PEPs 1 and 12.

  6. warsaw commented on Dec 1, 2026

    @warsaw
    Member

    Discussions-To is "where should I go with feedback?" So I'd say if the last Post-History is a post in a topic, then Discussions-To should use the topic itself.

    I think that makes sense. The two headers serve slightly different purposes. Discussions-To should be the link to the beginning of the conversation, since to me, it's what folks would click on to get the full discussion on the PEP. The last Post-History link gets you to the last update posted, but keep in mind that it may not point to the original first introduction topic of the PEP. It's not uncommon to start a new DPO topic thread on a major update/rewrite of the PEP.

    (Aside: I wish the Change History section were required when there's a new Post-History but often those two links are the same, e.g. PEP 813's Change History.)

    The major problem with Discussions-To is the friction of having essentially to do a quick followup PR when a new PEP is first published. On first publish there is no DPO topic to add to Discussions-To, so you have to 1) commit the PEP, 2) post the topic, 3) grab the topic URL from DPO, 4) create a new PR that just addes the Discussions-To and likely Post-History headers.

    FWIW, Discussions-To was originally added in the days where almost all the discussions happened on mailing lists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    infra

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions