Message356867
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? |
|
Date |
User |
Action |
Args |
2019-11-18 13:34:34 | The Compiler | set | recipients:
+ The Compiler, steve.dower, ammar2, dhess, xtreak, toonn |
2019-11-18 13:34:34 | The Compiler | set | messageid: <1574084074.23.0.685434694682.issue38656@roundup.psfhosted.org> |
2019-11-18 13:34:34 | The Compiler | link | issue38656 messages |
2019-11-18 13:34:33 | The Compiler | create | |
|