[issue31040] mimetypes.add_type should complain when you give it an undotted ext

Julien Palard report at bugs.python.org
Fri Sep 13 05:45:12 EDT 2019


Julien Palard <julien+python at palard.fr> added the comment:

I think we should deprecate calling `add_type` with an empty `ext`, as I don't think it's a feature, more a side effect of the current implementation.

But as some may use it like a feature, I asked the current PR to emit a warning, to not break the current implementations.

To be able to simplify in the future, why not deprecating empty `ext` so we can remove it in a few versions?

----------
nosy: +mdk

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue31040>
_______________________________________


More information about the Python-bugs-list mailing list