[Python-ideas] Mimetypes Include application/json

Nick Coghlan ncoghlan at gmail.com
Wed Aug 9 23:30:24 EDT 2017


On 10 August 2017 at 04:24, Serhiy Storchaka <storchaka at gmail.com> wrote:
> 09.08.17 21:17, Brett Cannon пише:
>>
>> On Wed, 9 Aug 2017 at 10:43 Nate. <e4r7hbug at gmail.com
>> <mailto:e4r7hbug at gmail.com>> wrote:
>>     A friend and I have hit a funny situation with the `mimetypes.py`
>>     library
>>     guessing the type for a '.json' file. Is there a reason why '.json'
>>     hasn't been
>>     added to the mapping?
>>
>>
>> Probably no one thought about it since the module was added in 1997 which
>> is only 2 years after the creation of JavaScript itself. :)
>
> No one proposed a patch.

That's not *quite* true - there was at least one proposal a few years
to modernise the mimetypes list, but the one I was involved in
reviewing got intertwined with a proposal to completely rewrite the
mimetypes module, and the submitter wasn't interested in creating a
more minimalist patch that solved the specific problem (i.e. the list
was pretty out of date) without all the extraneous changes to how the
module actually worked :(

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia


More information about the Python-ideas mailing list