Infra: Link target release to release PEP in PEP 0#5058
Conversation
Documentation build overview
7 files changed ·
|
|
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:
(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". |
|
Thanks! I've updated the topic pages to use the same I've also added regression tests covering the historical multi-version cases you mentioned:
I've verified the changes with |
| [ | ||
| ("3.14", {"3.14": 745}, " - :pep:`3.14 <745>`"), | ||
| ("2.6, 3.0", {"2.6, 3.0": 361}, " - :pep:`2.6, 3.0 <361>`"), | ||
| ("2.7, 3.1", {"2.7, 3.1": 375}, " - :pep:`2.7, 3.1 <375>`"), |
There was a problem hiding this comment.
2.7 and 3.1 do not share a PEP, they have 373 and 375. They need linking separately.
There was a problem hiding this comment.
Thanks! I updated the implementation to handle this case by linking individual versions when they don't share the same release PEP (e.g. 2.7 → PEP 373 and 3.1 → PEP 375), while preserving the existing behavior for shared release schedules such as 2.6, 3.0. I also updated the regression test accordingly.
I've pushed the changes, and the full test suite passes (535 passed, 2 xfailed).
There was a problem hiding this comment.
Let's use real test data here: remove the fake {"2.7, 3.1": 375} and {"2.4, 2.5, 2.6": 320} and add a realistic case for 2.4, 2.5, 2.6, and also a version that doesn't exist, like 2.9.
release_peps can be moved out of parametrised tests and can be a hardcoded variable in the setup containing the ones we need.
No need for your agent to tell us the test results, we have a CI for that.
Also we don't use gh-NNNN prefixes outside the CPython.
|
Please check the output, there are still unlinked versions. |
…rom joint release PEPs
I updated the release PEP mapping to handle release PEPs that cover multiple Python versions (e.g. I verified the generated output, and the previously unlinked standalone |
| [ | ||
| ("3.14", {"3.14": 745}, " - :pep:`3.14 <745>`"), | ||
| ("2.6, 3.0", {"2.6, 3.0": 361}, " - :pep:`2.6, 3.0 <361>`"), | ||
| ("2.7, 3.1", {"2.7, 3.1": 375}, " - :pep:`2.7, 3.1 <375>`"), |
There was a problem hiding this comment.
Let's use real test data here: remove the fake {"2.7, 3.1": 375} and {"2.4, 2.5, 2.6": 320} and add a realistic case for 2.4, 2.5, 2.6, and also a version that doesn't exist, like 2.9.
release_peps can be moved out of parametrised tests and can be a hardcoded variable in the setup containing the ones we need.
No need for your agent to tell us the test results, we have a CI for that.
Also we don't use gh-NNNN prefixes outside the CPython.
|
Thanks! I've incorporated the suggested simplifications.
|

Summary
This change links Python version entries in PEP 0 to their corresponding release schedule PEPs.
Specifically, it:
:pep:references for Python version entries when a matching release schedule PEP exists.Testing
Results:
Issue
Closes #4379