Skip to content

Infra: Move release dates from RSTs to JSON #4314

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

hugovk
Copy link
Member

@hugovk hugovk commented Mar 20, 2025

First step to moving release dates from the reStructedText files into a JSON file.

This will mean we have the release data in a single canonical location for re-use elsewhere.

For example:


I suggest we do:

  1. feature release (3.14) -- this PR
  2. bugfix releases (3.12-3.13)
  3. security release (3.9-3.11)
  4. maybe some historical releases? But at least 3.7 and earlier have a different format, so maybe only 3.8.

In this first PR, I've only moved the dates out of 3.14.

No end-of-bugfix or end-of-life or listed yet, let's check the JSON structure looks right, and if this is the right way to do it in Sphinx.

We'll also need a way to add notes, such as the hotfixes and recalls in 3.9 and 3.8 -- thoughts on that?


📚 Documentation preview 📚: https://pep-previews--4314.org.readthedocs.build/pep-0745/#release-schedule

@hugovk hugovk added the infra Core infrastructure for building and rendering PEPs label Mar 20, 2025
@hugovk hugovk requested review from AA-Turner and a team as code owners March 20, 2025 20:42
Copy link
Member

@AA-Turner AA-Turner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting idea! Comments in threads for easier replying:

A


release_list = "\n".join(f"<li>{release}" for release in releases)

return f'<ul class="simple">{release_list}</ul>'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's better to do this in the AST rather than the writer (e.g HTML)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the idea for this file to replace e.g. the devguide one, or be used to build the version switcher on d.p.o? If so, I think having the 'official' location be the PEPs repo feels a bit hidden. The devguide feels 'best' as it is non-versioned, but equally we get complaints that that is non-obvious.

If we do want a single-data-file-of-truth, I would probably suggest putting all of the devguide fields into this one, as otherwise it gets more complex/annoying with multiple slightly different files describing roughly the same thing.


On a practicalities level, I'd suggest using TOML, which has both support for dates, comments, trailing commas, etc and slightly nicer formatting for human consumption. E.g.:

[[3.14]]
stage = "development begins"
date = 2024-05-08
actual = true

[[3.14]]
# ...

[[3.14]]
stage = "beta 1"
date = 2025-05-06
actual = false

A

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the idea for this file to replace e.g. the devguide one, or be used to build the version switcher on d.p.o?

Yes, I'm primarily thinking of replacing the devguide one.

If so, I think having the 'official' location be the PEPs repo feels a bit hidden. The devguide feels 'best' as it is non-versioned, but equally we get complaints that that is non-obvious.

My thinking of it being here is because this is where the equivalent release PEPs are. When the 3.15 PEP is added, it can be done right here in both RST and data file. This is the PEPs spec repo, this is where you come for the release dates now, it feels right the definitive release dates are retained in the same place.


TOML, possibly, although that would make it harder to use for example in JavaScript.

@hugovk hugovk marked this pull request as draft March 22, 2025 10:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
infra Core infrastructure for building and rendering PEPs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants