[issue35292] Make SimpleHTTPRequestHandler load mimetypes lazily

pmpp report at bugs.python.org
Sat Dec 8 18:45:16 EST 2018


pmpp <pmpp.pub at gmail.com> added the comment:

sorry i was on my free time when enumerating profiling/instrumentation and testing. given now you pay attention i'll try to explain more.

instrumentation : what does that server actually support ? eg writing a test for a specific mimitype support eg https://bugs.python.org/issue35403 

profiling: i just want to time the first request to a service, ie without learning all the art of warming up a *one liner* http server with bare hands.

testing: i want to test the servicing code, not receive error because mimetypes module may have failed late and server should not have started *at all* since it is a critical component of it.




how to fix the issue ? as i said earlier, strangely "other platforms" don't have that issue so maybe the problem is in mimetypes module. 

So my position is "keep it that way" and investigate the slowdown at import on concerned platform.

----------

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


More information about the Python-bugs-list mailing list