FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-129965: Add missing MIME types by hugovk · Pull Request #129969 · python/cpython · GitHub

/ cpython Public

gh-129965: Add missing MIME types - #129969

Merged
hugovk merged 12 commits into
python:mainfrom
hugovk:3.14-mimetypes
Feb 21, 2025
Merged

gh-129965: Add missing MIME types#129969
hugovk merged 12 commits into
python:mainfrom
hugovk:3.14-mimetypes

Conversation

hugovk commented Feb 10, 2025
edited by github-actions Bot
Loading

Copy link
Copy Markdown
Member

hugovk requested a review from a team as a code owner February 10, 2025 17:29
bedevere-app Bot mentioned this pull request Feb 10, 2025
hugovk added the type-feature A feature request or enhancement label Feb 10, 2025
Comment thread Doc/whatsnew/3.14.rst Outdated
Comment thread Lib/mimetypes.py
'.aifc' : 'audio/x-aiff',
'.aiff' : 'audio/x-aiff',
'.ra' : 'audio/x-pn-realaudio',
'.wav' : 'audio/x-wav',

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

This will make mimetypes.MimeTypes().guess_extension('audio/x-wav') no longer work. Is that expected?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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.

Co-authored-by: Petr Viktorin <encukou@gmail.com>

encukou left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Sounds good, thank you for the explanation!

hugovk enabled auto-merge (squash) February 21, 2025 15:10
hugovk merged commit 1cf9b6d into python:main Feb 21, 2025
hugovk deleted the 3.14-mimetypes branch February 21, 2025 15:44
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type-feature A feature request or enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL