You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Infra: Make Discussion-To optional in source, display from latest Post-History during build #5158
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?
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.
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.
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.
Activity
vaibhavlord commentedon Nov 24, 2026
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?
hugovk commentedon Nov 24, 2026
Good question. Right now,
Post-Historycan be a topic, or a post in a topic. ButDiscussions-Tocannot be a post and must be the topic itself.Discussions-Tois "where should I go with feedback?" So I'd say if the lastPost-Historyis a post in a topic, thenDiscussions-Toshould use the topic itself.Yes, we can update them, but let's do an infra PR first and consider the PEPs afterwards.
vaibhavlord commentedon Nov 24, 2026
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.
hugovk commentedon Dec 1, 2026
#5244 updated the code, #5254 will update PEPs 1 and 12.
warsaw commentedon Dec 1, 2026
I think that makes sense. The two headers serve slightly different purposes.
Discussions-Toshould 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 lastPost-Historylink 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 Historysection were required when there's a newPost-Historybut often those two links are the same, e.g. PEP 813's Change History.)The major problem with
Discussions-Tois 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 toDiscussions-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 theDiscussions-Toand likelyPost-Historyheaders.FWIW,
Discussions-Towas originally added in the days where almost all the discussions happened on mailing lists.