This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author apoirier
Recipients apoirier, benjamin.peterson
Date 2009-04-28.14:51:54
SpamBayes Score 0.00032274154
Marked as misclassified No
Message-id <1240930317.8.0.75459471021.issue5868@psf.upfronthosting.co.za>
In-reply-to
Content
In Python 2.6.2, the fix for the issue 5401 changed the way the
mimetypes module is initialized.

But now the initialization is not thread-safe : a thread can set
``inited`` to ``True`` and then be preempted before to overwrite the
functions guess_type(), guess_extension() ...

With such a partial initialization, the next thread will raise an 
excessive recursion exception when calling one of this functions.

A fix could be to wrap ``mimetypes.init()`` with a thread lock.
History
Date User Action Args
2009-04-28 14:51:57apoiriersetrecipients: + apoirier, benjamin.peterson
2009-04-28 14:51:57apoiriersetmessageid: <1240930317.8.0.75459471021.issue5868@psf.upfronthosting.co.za>
2009-04-28 14:51:56apoirierlinkissue5868 messages
2009-04-28 14:51:54apoiriercreate