[Python-Dev] Import lock knowledge required!

M.-A. Lemburg mal@lemburg.com
Sat, 15 Feb 2003 16:49:11 +0100


Mark Hammond wrote:
> I've found a bug related to the import lock causing a deadlock in 2.3.  The
> bug can be found at http://www.python.org/sf/683658
> 
> The bug is fairly self-explanatory, so I won't repeat it here.  The proposed
> patch exposes the import lock to the Python C API, allowing optionally a
> non-blocking attempt to acquire the lock.  I should note that the only
> reason I propose this is because I can see no other option!
> 
> I would appreciate it if people knowledgeable about the import lock and its
> implications could have a quick look at this bug, and comment on my proposed
> patch.

I think we're running into a similar bootstrap problem as
we did when we had exceptions coded in Python. The solution
back then was to recode it in C. Perhaps the warnings module
should get the same treatment ?!

-- 
Marc-Andre Lemburg
eGenix.com

Professional Python Software directly from the Source  (#1, Feb 15 2003)
 >>> Python/Zope Products & Consulting ...         http://www.egenix.com/
 >>> mxODBC, mxDateTime, mxTextTools ...        http://python.egenix.com/
________________________________________________________________________
Python UK 2003, Oxford:                                     45 days left
EuroPython 2003, Charleroi, Belgium:                       129 days left