Steve Dower <steve.do...@python.org> added the comment:
Adding email team here, since you were pinged on the PR. PR 16567 doesn't fix the `inited` member, which is considerably more difficult to do, unfortunately, but it does mean that it's out of sync with the values you hold. Arguably this is a better state to be in though. Unfortunately, the "internal" data structures referred to in the docs[1] are all documented public API, which means we can't just ignore this issue :( We ought to at least update the docs to mention that `inited` won't be updated if you've `from ... import`ed it (which would normally be obvious, except that now some other values _will_ be updated). Also, the `init` docs say that it will only be completely rebuilt when `files` is `None` (and specifically calls out passing an empty list as a way to avoid this happening). I'm pretty sure we don't respect this now. All up, I think we have more work to do here to get the behaviour right. Alternatively, we can make changes in 3.9 to specify better usage (such as explicitly discouraging direct use of the dictionaries and adding more helper functions if necessary). [1]: https://docs.python.org/3/library/mimetypes.html#mimetypes.init ---------- nosy: +barry, maxking, r.david.murray, steve.dower versions: +Python 3.9 -Python 3.4, Python 3.5, Python 3.6 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue34938> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com