bpo-4963: Fix for initialization and non-deterministic behavior issues in mimetypes by davidkhess · Pull Request #3062 · python/cpython (original) (raw)
This change has resulted in a difference in behaviour from previous versions of Python in that even when specifying files
as a parameter to init()
, the known files are loaded, which is not the case in previous versions. This causes problems when an application wishes to use the mimetypes database with an internal-only mapping of mimetypes, to work around inconsistencies with mimetypes in the known files list (which can vary between systems).
Unfortunately this change wasn't documented in the changelog either, nor in the docstring comments, so it can only be found by examining the commit history for the code in cpython.
Would it be appropriate to add another kwarg to init()
indicating that knownfiles are to be ignored/excluded from the DB initialization?