Skip to content

Duplicated keys in MIME type_map with different values #76048

Closed

Description

@markshannon
BPO 31867
Nosy @asvetlov, @markshannon, @cryvate
PRs
  • bpo-31867: Remove duplicates in default mimetypes. #4388
  • 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 = <Date 2017-11-17.10:11:03.567>
    created_at = <Date 2017-10-25.10:14:00.897>
    labels = ['3.7', 'library']
    title = 'Duplicated keys in MIME type_map with different values'
    updated_at = <Date 2017-11-17.10:11:03.566>
    user = 'https://github.com/markshannon'

    bugs.python.org fields:

    activity = <Date 2017-11-17.10:11:03.566>
    actor = 'asvetlov'
    assignee = 'none'
    closed = True
    closed_date = <Date 2017-11-17.10:11:03.567>
    closer = 'asvetlov'
    components = ['Library (Lib)']
    creation = <Date 2017-10-25.10:14:00.897>
    creator = 'Mark.Shannon'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 31867
    keywords = ['patch']
    message_count = 5.0
    messages = ['304973', '304974', '304979', '306425', '306426']
    nosy_count = 3.0
    nosy_names = ['asvetlov', 'Mark.Shannon', 'cryvate']
    pr_nums = ['4388']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue31867'
    versions = ['Python 3.7']

    Activity

    1. markshannon commented on Oct 25, 2017

      @markshannon
      MemberAuthor

      Here
      https://github.com/python/cpython/blob/master/Lib/mimetypes.py#L416
      and here
      https://github.com/python/cpython/blob/master/Lib/mimetypes.py#L526

      I have no idea which is the correct value for either, but the code is misleading at best.

    2. added
      stdlibStandard Library Python modules in the Lib/ directory
      on Oct 25, 2017
    3. markshannon commented on Oct 25, 2017

      @markshannon
      MemberAuthor

      I hadn't noticed the comments on the lines above saying "Duplicates :(", so I'm obviously not the first to notice.

    4. Cryvate commented on Oct 25, 2017

      Cryvatemannequin
      Mannequin

      So for excel, 'application/excel' is not listed at http://www.iana.org/assignments/media-types as suggested by the comment at:
      https://github.com/python/cpython/blob/master/Lib/mimetypes.py#L397
      whereas 'applicaton/vnd.ms-excel' is listed. See also
      https://stackoverflow.com/questions/974079/setting-mime-type-for-excel-document.

      For cdf, Wolframalpha is using application/cdf it seems (without it being registered) whereas NetCDF suggests application/x-netcdf so that seems reasonable (and is the current value).

      For context, these duplicates were introduced here:
      a3689fe
      and noted first here:
      107771a

    5. changed the title [-]Duplicated keys, but with different values in dictionary literals[/-] [+]Duplicated keys in MIME type_map with different values[/+] on Oct 25, 2017
    6. asvetlov commented on Nov 17, 2017

      @asvetlov
      Contributor

      New changeset f02f5e5 by Andrew Svetlov (Henk-Jaap Wagenaar) in branch 'master':
      bpo-31867: Remove duplicates in default mimetypes. (bpo-4388)
      f02f5e5

    7. asvetlov commented on Nov 17, 2017

      @asvetlov
      Contributor

      Henk-Jaap thanks for contribution!

    8. transferred this issue fromon Apr 10, 2022
    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

      3.7 (EOL)end of lifestdlibStandard Library Python modules in the Lib/ directory

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions