Skip to content

Add .rst to mimetypes #101137

Closed
Closed

Description

@tucked
>>> 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

Activity

  1. sobolevn commented on Jan 19, 2023

    @sobolevn
    Member

    Related: #17995

  2. added
    stdlibStandard Library Python modules in the Lib/ directory
    on Nov 27, 2023
  3. jaraco commented on May 5, 2024

    @jaraco
    Member

    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.

  4. self-assigned this
    on May 5, 2024
  5. sobolevn commented on May 5, 2024

    @sobolevn
    Member

    I am on it :)

  6. added a commit that references this issue on May 5, 2024
  7. added a commit that references this issue on May 5, 2024
  8. added a commit that references this issue on May 5, 2024
  9. added a commit that references this issue on May 8, 2024
  10. added a commit that references this issue on Apr 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

stdlibStandard Library Python modules in the Lib/ directorytype-featureA feature request or enhancement

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions