gh-129965: Add missing MIME types#129969
Conversation
Compare https://www.webmproject.org/docs/container/#naming and .webm addition
| '.aifc' : 'audio/x-aiff', | ||
| '.aiff' : 'audio/x-aiff', | ||
| '.ra' : 'audio/x-pn-realaudio', | ||
| '.wav' : 'audio/x-wav', |
There was a problem hiding this comment.
This will make mimetypes.MimeTypes().guess_extension('audio/x-wav') no longer work. Is that expected?
There was a problem hiding this comment.
Yes, we can only have a single type per extension with this dict implementation (there's also #122632 that proposes dealing with duplicates; I've not looked closely at it).
If we can only choose one, I think handling for the standards-based type is more useful than an x- extension.
Also mimetypes.MimeTypes().guess_type('filename.wav') now gives the preferred result.
This is also a reason why this kind of change is only made as a feature with no backports. But happy to revert this one if you prefer.
Misc/NEWS.d/next/Library/2025-02-10-19-16-48.gh-issue-129965.B6wik0.rst
Outdated
Show resolved
Hide resolved
encukou
left a comment
There was a problem hiding this comment.
Sounds good, thank you for the explanation!
📚 Documentation preview 📚: https://cpython-previews--129969.org.readthedocs.build/