gh-108514: Add config & transform to hide old versionmodified in docs #108522
+18
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As discussed in #108514 and previously among the core devs, there was some amount of interest in hiding versionadded/versionchanged annotations in the Python docs for old versions of Python. Some favored showing all annotations back to the first feature release of the current major version (3.0), which is currently the case in practice as pre-3.0 annotations were completely removed from the source. Others preferred hiding those for older, long-EOL feature releases, e.g. as recent as a 3.6 minimum.
Whatever approach is decided upon, it seems useful to have the ability to specify a minimum version above which to show versionmodified annotations to implement it—even if its 3.0 for now, so its trivial to change in the future if we release a new major version, the older 3.x versions get too long in the tooth, or our policy evolves.
I used an example version of 3.6 to better demonstrate the effect, but marked this as draft/Do-Not-Merge until a minimum version is decided (with 3.0 being the status quo fallback by default).
.. versionadded
|.. versionchanged
? #108514📚 Documentation preview 📚: https://cpython-previews--108522.org.readthedocs.build/