Skip to content

Infra: Link target release to release PEP in PEP 0#5058

Open
BHUVANSH855 wants to merge 3 commits into
python:mainfrom
BHUVANSH855:fix-4379-pep0-release-links
Open

Infra: Link target release to release PEP in PEP 0#5058
BHUVANSH855 wants to merge 3 commits into
python:mainfrom
BHUVANSH855:fix-4379-pep0-release-links

Conversation

@BHUVANSH855

Copy link
Copy Markdown

Summary

This change links Python version entries in PEP 0 to their corresponding release schedule PEPs.

Specifically, it:

  • Builds a mapping from Python versions to release schedule PEP numbers using release-topic metadata.
  • Emits :pep: references for Python version entries when a matching release schedule PEP exists.
  • Falls back to plain text when no matching release schedule PEP is available.
  • Adds a regression test covering the new linking behavior.

Testing

python -m pytest
python build.py

Results:

  • 532 passed, 2 xfailed
  • Documentation build succeeded

Issue

Closes #4379

@BHUVANSH855
BHUVANSH855 requested a review from AA-Turner as a code owner July 25, 2026 15:12
@read-the-docs-community

read-the-docs-community Bot commented Jul 25, 2026

Copy link
Copy Markdown

Documentation build overview

📚 pep-previews | 🛠️ Build #33766193 | 📁 Comparing 23fee33 against latest (9bb3132)

  🔍 Preview build  

7 files changed · ± 7 modified

± Modified

@hugovk hugovk changed the title gh-4379: Link target release to release PEP in PEP 0 Infra: Link target release to release PEP in PEP 0 Jul 26, 2026
@hugovk hugovk added the infra Core infrastructure for building and rendering PEPs label Jul 26, 2026
@hugovk

hugovk commented Jul 26, 2026

Copy link
Copy Markdown
Member

Please also check topic pages such as https://pep-previews--5058.org.readthedocs.build/topic/packaging/, they don't have linked versions.

Is it worth also linking on the release topic page? https://pep-previews--5058.org.readthedocs.build/topic/release/


Some with multiple versions don't get linked:

image

(That "2.6, 3.0" is a link to the joint 2.6/3.0 PEP.)

Add tests to include cases like "2.6, 3.0", "2.7, 3.1" and "2.4, 2.5, 2.6".

@BHUVANSH855

Copy link
Copy Markdown
Author

Thanks! I've updated the topic pages to use the same release_peps mapping as PEP 0 and the numerical index, so the Python version links are now generated there as well.

I've also added regression tests covering the historical multi-version cases you mentioned:

  • 2.6, 3.0
  • 2.7, 3.1
  • 2.4, 2.5, 2.6

I've verified the changes with python build.py and the full test suite (535 passed, 2 xfailed).

Comment thread pep_sphinx_extensions/tests/pep_zero_generator/test_writer.py
Comment thread pep_sphinx_extensions/tests/pep_zero_generator/test_writer.py
@BHUVANSH855
BHUVANSH855 requested a review from hugovk July 26, 2026 17:52
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.

Link target release to release PEP in PEP 0

2 participants