Use replacements to update versions in "Using Python on macOS"#130400
Conversation
ned-deily
left a comment
There was a problem hiding this comment.
Thanks for doing this. Note there are still some hardwired 3.13 path references in the Advanced Topics section; it would be nice to address those, too.
|
Thanks, I've replaced some more. Unfortunately the formatting isn't as good, but I think it's acceptable from a maintenance point of view, if there's no better solution?
But I've not replaced the hardcoded versions in this section, I don't have a good method for that: https://docs.python.org/dev/using/mac.html#installing-using-the-command-line |
|
Would an alternative be to have a test/lint ensuring that the version is current? It would be a shame to accept strictly worse aesthetics for a tooling problem. A |
|
That could work, what sort of thing do you have in mind? Of course, it would be great if Sphinx directly supported replacements in code blocks ;) Oh, I've just discovered parsed literal blocks:
This gives improved formatting, although no syntax highlighting:
|
|
I struggled with how to handle versions in formatted code when I did the rewrite for 3.13. I'm glad I'm not the only one! If it could be done without a lot of trouble, the linting solution sounds fine until (if ever) there is a better solution with Sphinx / Docutils as this only needs to be updated once a year. But I'll leave it up to you(s). |
|
Getting back to this, it looks fine to me. Thanks, @hugovk! I'm going to merge it now and backport to 3.14 and 3.13 before any further editing (like removing the |
|
Thanks @hugovk for the PR, and @ned-deily for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14. |
…nGH-130400) (cherry picked from commit 21bac3a) Co-authored-by: Hugo van Kemenade <[email protected]>
|
GH-135586 is a backport of this pull request to the 3.14 branch. |
…nGH-130400) (cherry picked from commit 21bac3a) Co-authored-by: Hugo van Kemenade <[email protected]>
|
GH-135587 is a backport of this pull request to the 3.13 branch. |
…GH-130400) (#135586) (cherry picked from commit 21bac3a) Co-authored-by: Hugo van Kemenade <[email protected]>
…GH-130400) (#135587) (cherry picked from commit 21bac3a) Co-authored-by: Hugo van Kemenade <[email protected]>
|






So the versions in https://docs.python.org/3.13/using/mac.html and https://docs.python.org/3.14/using/mac.html aren't hardcoded to "3.13", and reflect the current version.
📚 Documentation preview 📚: https://cpython-previews--130400.org.readthedocs.build/