-
-
Notifications
You must be signed in to change notification settings - Fork 33.2k
gh-140392: Add application
MIME types in Lib/mimetypes.py
#140393
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
base: main
Are you sure you want to change the base?
Conversation
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.
Please revert unreleated whitespace changes.
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 |
I have made the requested changes; please review again |
Thanks for making the requested changes! @AA-Turner: please review the changes made to this pull request. |
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.
Please add a NEWS entry.
Added new media types for various applications.
@@ -0,0 +1,12 @@ | |||
Add the following: |
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.
Add the following: | |
Add the following MIME types: | |
- ``application/efi`` | ||
- ``application/pem-certificate-chain`` | ||
- ``application/pgp-keys`` | ||
- ``application/sql`` | ||
- ``application/zstd`` | ||
- ``application/ocsp-request`` | ||
- ``application/ocsp-response`` | ||
- ``application/mathematica`` | ||
- ``application/mathml+xml`` | ||
- ``application/mbox`` | ||
- ``application/pem-certificate-chain`` |
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.
Sort and remove duplicate:
- ``application/efi`` | |
- ``application/pem-certificate-chain`` | |
- ``application/pgp-keys`` | |
- ``application/sql`` | |
- ``application/zstd`` | |
- ``application/ocsp-request`` | |
- ``application/ocsp-response`` | |
- ``application/mathematica`` | |
- ``application/mathml+xml`` | |
- ``application/mbox`` | |
- ``application/pem-certificate-chain`` | |
- ``application/efi`` | |
- ``application/mathematica`` | |
- ``application/mathml+xml`` | |
- ``application/mbox`` | |
- ``application/ocsp-request`` | |
- ``application/ocsp-response`` | |
- ``application/pem-certificate-chain`` | |
- ``application/pgp-keys`` | |
- ``application/sql`` | |
- ``application/zstd`` |
def test_preferred_extension(self): | ||
def check_extensions(): | ||
for mime_type, ext in ( | ||
('applicaion/efi', '.efi'), |
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.
I know we (and especially me!) have been adding new MIME types to this test, but I'm now thinking there's not much point, we're essentially duplicating types_map
in reverse.
It's useful to have some in here, to test the lookup works, but we don't really need all.
When we have multiple extensions (for example, application/mathematica
has .ma
, .mb
and .na
), maybe it's useful to include the test to show which extension it returns.
I'm not suggesting removing all existing ones, but shall we remove the new ones here, other than for application/mathematica
?
…uL6FW.rst Co-authored-by: Hugo van Kemenade <[email protected]>
…uL6FW.rst Co-authored-by: Hugo van Kemenade <[email protected]>
Co-authored-by: Hugo van Kemenade <[email protected]>
Co-authored-by: Hugo van Kemenade <[email protected]>
Co-authored-by: Hugo van Kemenade <[email protected]>
Co-authored-by: Hugo van Kemenade <[email protected]>
Misc/NEWS.d/next/Library/2025-10-21-16-39-58.gh-issue-140392.ouL6FW.rst
Outdated
Show resolved
Hide resolved
…sue-140392.ouL6FW.rst Co-authored-by: Hugo van Kemenade <[email protected]>
Misc/NEWS.d/next/Library/2025-10-21-16-39-58.gh-issue-140392.ouL6FW.rst
Outdated
Show resolved
Hide resolved
…ouL6FW.rst Co-authored-by: Stan Ulbrych <[email protected]>
application
MIME types detectable by themimetypes
module #140392