Skip to content

gh-128703: Fix mimetypes.guess_type for empty Content-Type in registry #128854

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

Merged
merged 4 commits into from
Feb 14, 2025

Conversation

rruuaanng
Copy link
Contributor

@rruuaanng rruuaanng commented Jan 15, 2025

@@ -0,0 +1,2 @@
Fix :meth:`mimetypes.MimeTypes.guess_type` to use default mapping for empty
Copy link
Member

Choose a reason for hiding this comment

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

We document this as a function:

Suggested change
Fix :meth:`mimetypes.MimeTypes.guess_type` to use default mapping for empty
Fix :func:`mimetypes.guess_type` to use default mapping for empty

(I think that's right, but check the output of the docs build if it fails again.)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry I just saw it. But, to be honest, I often can't tell which label to use for symbol references.

@zooba zooba merged commit 303043f into python:main Feb 14, 2025
39 checks passed
@miss-islington-app
Copy link

Thanks @rruuaanng for the PR, and @zooba for merging it 🌮🎉.. I'm working now to backport this PR to: 3.12, 3.13.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Feb 14, 2025
…egistry (pythonGH-128854)

(cherry picked from commit 303043f)

Co-authored-by: RUANG (James Roy) <[email protected]>
@bedevere-app
Copy link

bedevere-app bot commented Feb 14, 2025

GH-130121 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.13 bugs and security fixes label Feb 14, 2025
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Feb 14, 2025
…egistry (pythonGH-128854)

(cherry picked from commit 303043f)

Co-authored-by: RUANG (James Roy) <[email protected]>
@bedevere-app
Copy link

bedevere-app bot commented Feb 14, 2025

GH-130122 is a backport of this pull request to the 3.12 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.12 only security fixes label Feb 14, 2025
zooba pushed a commit that referenced this pull request Feb 14, 2025
zooba pushed a commit that referenced this pull request Feb 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants