[ZODB-Dev] winlock problems?

Tim Peters tim@zope.com
Mon, 10 Mar 2003 09:37:43 -0500


[Paolo Invernizzi]
> I've some problem with the new lock implementation...
> _get_osfhandle fails in every test...
>
> Exception winlock.error: '_get_osfhandle failed' in <bound method
> LockFile.__del__ of <zodb.lockfile.LockFile instance at
> 0x00DEEAA8>> ignored
>
> Platform Windows XP SP1, Python 2.3a2, ZODB4 cvs.
>
> Must I upgrade to Python 2.3 CVS? Thanks in advance!

The Python version should be irrelevant.  _get_osfhandle is a Microsoft
function, and the lockfile implementation has always called it on Windows.
Note that the lockfile implementation is part of ZODB, not part of Python.
The lockfile implementation didn't use to unlock files, though, only lock
them.  The change was to call Win32 UnlockFile to unlock files.  The tests
pass on Win98SE and on Win2K.  I don't have access to XP (with or without
SP1).  Anyone else, or are Paolo's woes unique?