Skip to content

TOML MIME type is missing #139958

Closed
Closed

Description

@gforcada

Bug report

Bug description:

Looking at the mimetypes module, it feels odd that .toml files are not recognized, given that they are in use within the Python community (pyproject.toml being the most obvious case).

Looking at the types_map and specially at the comment above it, it is not clear to me what's the criteria of adding one or not whenever they are on the IANA listing.

But to not get myself carried away, and as that would be my first contribution, I would keep it simple. Others can add other missing MIME types.

CPython versions tested on:

CPython main branch

Operating systems tested on:

Linux

Linked PRs

Activity

  1. added
    type-bug
    on Oct 11, 2025
  2. added
    stdlib
    on Oct 11, 2025
  3. StanFromIreland commented on Oct 11, 2025

    @StanFromIreland
    Member

    It is registered with IANA, the PR should be simple enough, the devguide has some helpful information and we are happy to answer any questions. It should be like this commit: 132b6bc

  4. gforcada commented on Oct 11, 2025

    @gforcada
    ContributorAuthor

    Thanks! I see, that I should add an entry to Doc/whatsnew nonetheless 👍🏾

  5. StanFromIreland commented on Oct 11, 2025

    @StanFromIreland
    Member

    @hugovk, out of curiosity, why not automatically generate the dictionary from IANA's table?

  6. terryjreedy commented on Oct 11, 2025

    @terryjreedy
    Member

    I think that this may be a feature request, rather than a bug, but others can decide.

  7. added
    type-feature
    and removed
    type-bug
    on Oct 11, 2025
  8. StanFromIreland commented on Oct 11, 2025

    @StanFromIreland
    Member

    I didn't notice, but I agree, I changed it.

  9. added a commit that references this issue on Oct 14, 2025
  10. gforcada commented on Oct 15, 2025

    @gforcada
    ContributorAuthor

    As the PR got merged, I guess we can close this, there's no need to backport it I guess.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    stdlibtype-feature

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions