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

mimetypes cannot detect mime of mka files #89416

Closed
manujchandra mannequin opened this issue Sep 21, 2021 · 3 comments · Fixed by #126412
Closed

mimetypes cannot detect mime of mka files #89416

manujchandra mannequin opened this issue Sep 21, 2021 · 3 comments · Fixed by #126412
Labels
stdlib Python modules in the Lib dir type-feature A feature request or enhancement

Comments

@manujchandra
Copy link
Mannequin

manujchandra mannequin commented Sep 21, 2021

BPO 45253
Nosy @Fidget-Spinner, @akulakov
Files
  • Screenshot from 2021-09-21 13-10-33.png
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = None
    created_at = <Date 2021-09-21.07:49:08.538>
    labels = ['type-bug', 'library', '3.9']
    title = 'mimetypes cannot detect mime of mka files'
    updated_at = <Date 2021-10-11.18:23:24.571>
    user = 'https://bugs.python.org/manujchandra'

    bugs.python.org fields:

    activity = <Date 2021-10-11.18:23:24.571>
    actor = 'andrei.avk'
    assignee = 'none'
    closed = False
    closed_date = None
    closer = None
    components = ['Library (Lib)']
    creation = <Date 2021-09-21.07:49:08.538>
    creator = 'manujchandra'
    dependencies = []
    files = ['50292']
    hgrepos = []
    issue_num = 45253
    keywords = []
    message_count = 2.0
    messages = ['402290', '403666']
    nosy_count = 3.0
    nosy_names = ['kj', 'andrei.avk', 'manujchandra']
    pr_nums = []
    priority = 'normal'
    resolution = None
    stage = None
    status = 'pending'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue45253'
    versions = ['Python 3.9']

    Linked PRs

    @manujchandra
    Copy link
    Mannequin Author

    manujchandra mannequin commented Sep 21, 2021

    The mimetypes library cannot detect mime of mka files. It returns None instead of audio.

    mp3 and mkv are working. Only mka is not working.

    @manujchandra manujchandra mannequin added 3.9 only security fixes stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error labels Sep 21, 2021
    @akulakov
    Copy link
    Contributor

    mkv (matroska) is not registered with IANA here: http://www.iana.org/assignments/media-types/media-types.xhtml

    Therefore according to the comment in mimetypes.py, it should not be added.

    Also note that .mkv is also not in mimetypes.py, so it's being loaded from your system's mime types, so if you want .mka to work as well, make sure it's registered on your system rather than in Python's mimetypes.py .

    I will close this as not a bug, please comment here if you think it should stay open.

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    @hugovk hugovk added type-feature A feature request or enhancement and removed type-bug An unexpected behavior, bug, or error 3.9 only security fixes labels Nov 4, 2024
    @hugovk
    Copy link
    Member

    hugovk commented Nov 4, 2024

    https://www.iana.org/assignments/media-types/media-types.xhtml now lists:

    matroska audio/matroska [RFC9559]

    Where RFC 9559 was published in October 2024.

    Please see PR #126412.

    (cc @manujchandra)

    hugovk added a commit that referenced this issue Nov 11, 2024
    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

    Successfully merging a pull request may close this issue.

    2 participants