[Distutils] Installing packages using pip

Paul Moore p.f.moore at gmail.com
Mon Nov 16 08:38:23 EST 2015


On 16 November 2015 at 13:12, Wayne Werner <waynejwerner at gmail.com> wrote:
> Windows file locking is the worst. But it *is* possible to get around - see
> the program called BareTail.

Windows file locking is just complex, and the defaults are "safe"
(i.e. people can't change a file you have open). As you say, you can
use different locking options with the Win32 API, but because core
Python's file API is basically derived from Unix, it doesn't expose
these options.

It wouldn't help here anyway, as it's Windows that locks a DLL when
you load it. Personally, I don't see why people think that's a bad
thing - who wants someone to modify the code they are using behind
their back? (I don't know what Unix does, I suspect it retains an old
copy of the shared library for the process until the process exists,
in which case you'd see a different issue, that you do an upgrade, but
your process still uses the old code till you restart).

Long story short, modifying code that a process is using is a bad
thing to do. Therefore, the fact that pip can't easily do it is
probably a good thing in reality...

Paul


More information about the Distutils-SIG mailing list