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.
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.