Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add missing text/rtf to mimetypes #97901

Closed
Labels
stdlibStandard Library Python modules in the Lib/ directorytype-featureA feature request or enhancement
@amaddio

Description

@amaddio

Feature or enhancement

As of Python 3.10, the types map does not contain an entry for the valid mime type oftext/rtf. It only contains aapplication/rtf entry for non standard types. The missingtext/rtf mapping should be added as this is a valid mime type. For example this file type is guessed by thefile command (e.g. version 5.04; seelibmagic1). My temporary workaround is to add the mapping manually:

mimetypes.add_type("text/rtf",".rtf",strict=False)

I would dare to add it to the list of standard types, but to be consistend with the otherrtf mapping I'd add it to the non standard (strict=False) list.

Pitch

The feature is implemented in a pull request pointing to this issue. I simply adds one one line with the mapping. Other python lovers could take advantage of this functional mapping of a valid mime type to an extension.

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    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


      [8]ページ先頭

      ©2009-2025 Movatter.jp