-
-
Notifications
You must be signed in to change notification settings - Fork 31.7k
gh-129965: Add missing MIME types #129969
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Compare https://www.webmproject.org/docs/container/#naming and .webm addition
'.opus' : 'audio/opus', | ||
'.aif' : 'audio/x-aiff', | ||
'.aifc' : 'audio/x-aiff', | ||
'.aiff' : 'audio/x-aiff', | ||
'.ra' : 'audio/x-pn-realaudio', | ||
'.wav' : 'audio/x-wav', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will make mimetypes.MimeTypes().guess_extension('audio/x-wav')
no longer work. Is that expected?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
Co-authored-by: Petr Viktorin <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good, thank you for the explanation!
📚 Documentation preview 📚: https://cpython-previews--129969.org.readthedocs.build/