Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add python-releases.toml#4331

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
AA-Turner wants to merge16 commits intopython:main
base:main
Choose a base branch
Loading
fromAA-Turner:release-toml
Draft

Conversation

AA-Turner
Copy link
Member

@AA-TurnerAA-Turner commentedMar 29, 2025
edited by hugovk
Loading

Inspired by#4314, this PR adds a transcription of every Python release since version 1.6 into a single TOML document,python-releases.toml. This is intended to serve as a single, centralised, machine-readable record of Python's release history (and future).

From this, we automatically generate arelease-cycle.json file as part of the build process, to be published onpeps.python.org. This replaces theversion in the devguide.

The TOML document is used to (re-)generate the release schedules contained in release PEPs, initially starting with those for Python 3.8 to 3.14. The authoritative record and history remains the release PEP.

Some releases may need optional annotations or notes, which I have filled in for Python 3.8 and 3.9, but not yet back-filled.

Open questions:

  • Any better ideas for a filename thanpython-releases.toml?
  • Should the file live at the top level, or in the a subdirectory (as at present)?
  • Any better ideas for the metadata field names? I'm not a great fan ofstart-of-development andend-of-bugfix, as all the others can be said aloud as "The {first release / feature freeze / end of life} is/was on {date}".
  • Are the release managers for Pythons 1.6-2.2 correct?

A


📚 Documentation preview 📚:https://pep-previews--4331.org.readthedocs.build/
📚 Documentation preview 📚:https://pep-previews--4331.org.readthedocs.build/release-cycle.json

m-aciek reacted with thumbs up emoji
@AA-TurnerAA-Turner added the metaRelated to the repo itself and its processes labelMar 29, 2025
Copy link
Member

@hugovkhugovk left a comment

Choose a reason for hiding this comment

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

Partial review:

From this, we automatically generate arelease-cycle.json file as part of the build process, to be published onpeps.python.org. This replaces theversion in the devguide.

Can we make all the data in the TOML also available in the JSON?

JSON is more universally supported, and we should make this data as widely usable as possible.

We don't necessarily need the JSON here to be an exact copy of the old devguide one; as long as the devguide can read the data it needs from this JSON to construct the diagram and tables.

Open questions:

  • Any better ideas for a filename thanpython-releases.toml?

Fine by me.

  • Any better ideas for the metadata field names? I'm not a great fan ofstart-of-development andend-of-bugfix, as all the others can be said aloud as "The {first release / feature freeze / end of life} is/was on {date}".

We could use the same names as thehttps://endoflife.date/ API.

The alphahttps://endoflife.date/api/python.json currently uses:

  • releaseDate - initial release
  • support - end of bugfix
  • eol - end of security support / life

Or the WIP v1 API (endoflife-date/endoflife.date#2080),https://deploy-preview-2080--endoflife-date.netlify.app/api/v1/products/python uses:

  • date - initial release
  • eoasFrom - end of bugfix (end of active support)
  • eolFrom - end of security support / life

m-aciek reacted with thumbs up emoji
if sys.version_info >= (3, 11):
from release_engineering.generate_release_cycle import create_release_cycle
else:
# this function uses tomllib, which requires Python 3.11+
Copy link
Member

@merwokmerwokMay 3, 2025
edited
Loading

Choose a reason for hiding this comment

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

The comment would make more sense before line 31 or before line 30.This function here on lines 34-35 does not use tomllib!

But also, you could have a version-dependent dependency liketomli >= 1.1.0 ; python_version < "3.11" and a try/except import. But it’s up to you, I’m not well versed in release engineering to know when an older python would be used, and then whether a silent no-op is better than working or having a clear error 🙂

AA-Turner reacted with thumbs up emoji
Copy link
Contributor

@m-aciekm-aciek left a comment
edited
Loading

Choose a reason for hiding this comment

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

I've left some minor comments.

The centralised file is 3400 lines long. I wonder, would it be possible to get all release metadata from the release PEPs, after enforcing the data structure using Sphinx/docutils features? This way the source of truth would be PEPs with machine-extractable data, and the data would be much easier to maintain/add. Then JSON/TOML would be generated in CI or locally automatically from the PEPs. Automatic script would go through all informational PEPs withrelease topic and look for the metadata. What do you think?

Comment on lines +22 to +23
metadata: dict[str, 'VersionMetadata']
releases: dict[str, list['ReleaseInfo']]
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
metadata:dict[str,'VersionMetadata']
releases:dict[str,list['ReleaseInfo']]
metadata:dict[str,VersionMetadata]
releases:dict[str,list[ReleaseInfo]]

nit: withfrom future import annotations we can simplify here

Comment on lines +1 to +2
from __future__ import annotations

Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
from __future__ import annotations

nit: this isn't needed

return tuple(map(int, version.split('.')))


def version_info(metadata: VersionMetadata, /) -> dict[str, str]:
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
defversion_info(metadata:VersionMetadata,/)->dict[str,str]:
defversion_info(metadata:VersionMetadata,/)->dict[str,str|int]:

PEP ID is anint


# -- Python 1.6 --------------------------------------------------------------

[metadata."1.6"]
Copy link
Contributor

@m-aciekm-aciekMay 9, 2025
edited
Loading

Choose a reason for hiding this comment

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

nit: I wonder ifversion instead ofmetadata wouldn't make the config more obvious

@AA-Turner
Copy link
MemberAuthor

I wonder, would it be possible to get all release matadata from the release PEPs, after enforcing the data structure using Sphinx/docutils features?

We could, but this would have a couple of considerations. Most importantly, we would need to change every previous release PEP, and this wouldn't easily permit going back before 1.6 if we wanted to record the metadata for 0.9-1.5.

I wouldn't be entirely opposed to this, though, as it preserves the nice quality that the PEPs remain the authoritative source for release information.

A

m-aciek reacted with thumbs up emoji

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

@merwokmerwokmerwok left review comments

@hugovkhugovkhugovk left review comments

@m-aciekm-aciekm-aciek left review comments

@Yhg1sYhg1sAwaiting requested review from Yhg1sYhg1s will be requested when the pull request is marked ready for reviewYhg1s is a code owner

@pablogsalpablogsalAwaiting requested review from pablogsalpablogsal will be requested when the pull request is marked ready for reviewpablogsal is a code owner

@ambvambvAwaiting requested review from ambvambv will be requested when the pull request is marked ready for reviewambv is a code owner

@CAM-GerlachCAM-GerlachAwaiting requested review from CAM-GerlachCAM-Gerlach will be requested when the pull request is marked ready for reviewCAM-Gerlach is a code owner

Assignees
No one assigned
Labels
metaRelated to the repo itself and its processes
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

4 participants
@AA-Turner@merwok@hugovk@m-aciek

[8]ページ先頭

©2009-2025 Movatter.jp