Skip to content

User-defined mime.types file #34712

Closed
Closed

Description

@zopyx
mannequin
BPO 439710
Nosy @freddrake, @zopyx
Files
  • mimetypes.py: Proposed new mimetypes module
  • mimetypes.py: Proposed new mimetypes module (fixed)
  • mimetypes.py: Final version of new mimetypes module
  • 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 = 'https://github.com/freddrake'
    closed_at = <Date 2001-08-03.21:04:26.000>
    created_at = <Date 2001-07-09.13:35:08.000>
    labels = ['type-feature', 'library']
    title = 'User-defined mime.types file'
    updated_at = <Date 2001-08-03.21:04:26.000>
    user = 'https://github.com/zopyx'

    bugs.python.org fields:

    activity = <Date 2001-08-03.21:04:26.000>
    actor = 'fdrake'
    assignee = 'fdrake'
    closed = True
    closed_date = None
    closer = None
    components = ['Library (Lib)']
    creation = <Date 2001-07-09.13:35:08.000>
    creator = 'ajung'
    dependencies = []
    files = ['91', '92', '93']
    hgrepos = []
    issue_num = 439710
    keywords = []
    message_count = 7.0
    messages = ['5308', '5309', '5310', '5311', '5312', '5313', '5314']
    nosy_count = 2.0
    nosy_names = ['fdrake', 'ajung']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = None
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue439710'
    versions = []

    Activity

    1. zopyx commented on Jul 9, 2001

      zopyxmannequin
      MannequinAuthor

      Zope users sometimes asks to add
      additional mime.types entries to Zope.
      Zopes mime-types handling is mostly
      based on mimetypes.py. In such cases
      users should be able to maintain their
      own mime.types files.

      mimetypes.py currently tries to look
      for mime.types files in 4 hardcoded locations.

      It would be more convinient to specify
      additional locations e.g. by an env. var
      that holds a list of additional locations
      or by any other mechanism that allows user-defined
      locations.

      The hardcoded locations also don't work on
      Windows.

    2. added
      stdlibStandard Library Python modules in the Lib/ directory
      type-featureA feature request or enhancement
      on Jul 9, 2001
    3. added
      stdlibStandard Library Python modules in the Lib/ directory
      type-featureA feature request or enhancement
      on Jul 9, 2001
    4. freddrake commented on Jul 23, 2001

      @freddrake
      Member

      Logged In: YES
      user_id=3066

      Sounds like there should be an object which can be configured with a search path at construction time. Applications could then store an appropriate mime.types file in a location that makes sense for them.

      Would this suite your purposes?

    5. zopyx commented on Jul 23, 2001

      zopyxmannequin
      MannequinAuthor

      Logged In: YES
      user_id=11084

      A more OO approach would be nice. At least a possibility to add "somehow"
      different file locations. I have not special preference for any solution.

      Andreas

    6. freddrake commented on Jul 24, 2001

      @freddrake
      Member

      Logged In: YES
      user_id=3066

      I've attached a new version of mimetypes.py; something like this should do the trick and be easy to extend as needed.

      Comments welcome.

    7. freddrake commented on Jul 27, 2001

      @freddrake
      Member

      Logged In: YES
      user_id=3066

      OK, I really should update the version here to be the fixed one; sorry about the broken versions! If there are no objections, I'll check this in soon.

    8. freddrake commented on Aug 3, 2001

      @freddrake
      Member

      Logged In: YES
      user_id=3066

      Ok, I've revised this again, to be a little cleaner and more consistent internally. I've attached a copy and will check it in as soon as I'm sure the updated documentation won't break the formatting.

    9. freddrake commented on Aug 3, 2001

      @freddrake
      Member

      Logged In: YES
      user_id=3066

      Checked in the new version as Lib/mimetypes.py revision 1.15, with documentation in Doc/lib/libmimetypes.tex revision 1.8.

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