X Tutup
The Wayback Machine - https://web.archive.org/web/20240906232842/https://github.com/python/cpython/issues/101137
Skip to content
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

Add .rst to mimetypes #101137

Open
tucked opened this issue Jan 18, 2023 · 3 comments
Open

Add .rst to mimetypes #101137

tucked opened this issue Jan 18, 2023 · 3 comments
Assignees
Labels
stdlib Python modules in the Lib dir type-feature A feature request or enhancement

Comments

@tucked
Copy link

tucked commented Jan 18, 2023

>>> import mimetypes
>>> mimetypes.guess_type("README.rst", strict=False)
(None, None)

In the python:3.11 Docker image, we get a vanity type:

>>> mimetypes.guess_type("README.rst", strict=False)
('text/prs.fallenstein.rst', None)

I think most people would expect text/x-rst. Even better would be to get it registered!

Linked PRs

@tucked tucked added the type-feature A feature request or enhancement label Jan 18, 2023
@sobolevn
Copy link
Member

Related: #17995

@iritkatriel iritkatriel added the stdlib Python modules in the Lib dir label Nov 27, 2023
@jaraco
Copy link
Member

jaraco commented May 5, 2024

Given that this type is explicit in packaging specifications, it would be valuable for Python to support inferring it from an extension and avoid hacks like these.

@sobolevn sobolevn self-assigned this May 5, 2024
@sobolevn
Copy link
Member

sobolevn commented May 5, 2024

I am on it :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stdlib Python modules in the Lib dir type-feature A feature request or enhancement
Projects
None yet
Development

No branches or pull requests

4 participants
X Tutup