Florian Bruhin <python....@the-compiler.org> added the comment:

Ah, I only saw dhess' comment after already submitting mine.

> By historical design, instantiating a MimeTypes class instance directly will 
> not use host OS system mime type files.

Yet that wasn't what happened before that commit, and it's also not the 
behaviour which was (and is) documented - from 
https://docs.python.org/3.6/library/mimetypes.html#mimetypes.MimeTypes

    By default, it provides access to the same database as the rest of this 
module. The initial database is a copy of that provided by the module, and may 
be extended by loading additional mime.types-style files into the database 
using the read() or readfp() methods. The mapping dictionaries may also be 
cleared before loading additional data if the default data is not desired.

    The optional filenames parameter can be used to cause additional files to 
be loaded “on top” of the default database.

You might be right in that the new behaviour is in some way more correct - but 
it's wildly backwards-incompatible, and it's contrary to everything the 
documentation says.

I've only skimmed over bpo-4963 though - maybe I missing something?

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue38656>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to