Uh oh!
There was an error while loading. Please reload this page.
gh-121658: Add MimeTypes.add_type docs - #121665
Conversation
AA-Turner
left a comment
There was a problem hiding this comment.
Please could you include a versionadded note?
A
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase And if you don't make the requested changes, you will be put in the comfy chair! |
Eclips4
commented
Aug 14, 2024
This was added more than 22 years ago. Do you think it's still need a |
Yes, because the documentation is new. The only other way to compare in documentation is to look at older versions (e.g. https://docs.python.org/3.10/), which don't list the method. However, if the method was present when A |
stinovlas
commented
Aug 15, 2024
I digged in the git history and found out that the function has been added in Python 2.3, six years before Python 3.0 came out. Since we only feature documentation for Python 3 nowadays and this has been in Python 3 since the beginning, I don't thing that note is necessary. But if you insist, I can add a note that this has been added in Python 2.3. |
Python 3 is not divorced from 2; indeed elements of Python 0.9 survive to this day. Note that there are many I do think it is good practice to note, but we could add these version added/changed markers in a follow-up commit if need be. A |
hugovk
commented
Aug 15, 2024
Hmm, I only find five: four of which are in "What's New in Python 2.7" (a historical release note), and the only one in the library was recently added in #109020 ;) ❯ rg "version(added|changed):: 2" DocDoc/whatsnew/2.7.rst2374: .. versionchanged:: 2.7.132589:.. versionadded:: 2.7.152779:.. versionadded:: 2.7.142792:.. versionchanged:: 2.7.14Doc/library/calendar.rst506:.. versionadded:: 2.5There was some discussion last year about removing old ones: #108514
The discussion was about removing or hiding somewhere between 3.0 and 3.6, so I don't think we need to note additions/changes in 2.x. |
AA-Turner
commented
Aug 15, 2024
My comeuppance for writing that on the train sans laptop, I suppose! In that case let's not add the note for now. Personally I do think these notes are very useful, even when historical, as it means that you can have confidence that a function exists in all the versions of Python that you support without needing to double-check. But that can be a separate discussion. A |
stinovlas
commented
Aug 22, 2024
I added a note about this being added in Python 2.3. I guess it can't hurt. |
hugovk
commented
Nov 6, 2024
The text already added in #122301 is more detailed, except the Let's close this PR, thank you anyway for your contribution! |
Closes#121658.
Add missing MimeTypes.add_type documentation.
📚 Documentation preview 📚: https://cpython-previews--121665.org.readthedocs.build/