This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Sebastian Noack
Recipients Sebastian Noack
Date 2015-06-29.11:11:47
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1435576307.84.0.535097012645.issue24527@psf.upfronthosting.co.za>
In-reply-to
Content
In order to prevent the mimetypes module from considering global files and registry entries, you have to call mimetypes.init([]). However, this will enforce that behavior globally, and only works if the module wasn't initialized yet.

There is also a similar argument in the mimetypes.MimeTypes() constructor, however the list of files passed there are considered additionally. But there is no way to prevent an individual MinmeTypes instance to consider global files.

Adding a "ignore_global_types" option would be trivial too add to the MimeTypes constructor, and would be extremely useful.
History
Date User Action Args
2015-06-29 11:11:47Sebastian Noacksetrecipients: + Sebastian Noack
2015-06-29 11:11:47Sebastian Noacksetmessageid: <1435576307.84.0.535097012645.issue24527@psf.upfronthosting.co.za>
2015-06-29 11:11:47Sebastian Noacklinkissue24527 messages
2015-06-29 11:11:47Sebastian Noackcreate