[Python-ideas] Draft PEP for virtualenv in the stdlib

Brian Curtin brian.curtin at gmail.com
Tue Oct 25 03:42:33 CEST 2011


On Mon, Oct 24, 2011 at 20:16, Vinay Sajip <vinay_sajip at yahoo.co.uk> wrote:

> ----- Original Message -----
>
> > From: Nick Coghlan <ncoghlan at gmail.com>
> > The repeated references to copying binaries and Python files
> > throughout the PEP is annoying, and needs to be justified. Python 3.2+
> > supports symlinking on Windows Vista and above as well as on *nix
> > systems, so there needs to be a short section somewhere explaining why
> > symlinks are not an adequate lightweight solution (pointing out the
> > fact that creating symlinks on Windows often requires administrator
> > privileges would be sufficient justification for me).
>
> I agree that symlinking should be done wherever possible, but let's
> remember that it's not just a Python issue: Windows XP does not support true
> symlinks, but only "junctions" aka "reparse points". Of course, that's no
> reason not to use true symlinks where they *are* available.


On 3.2+, symlinks on Windows are possible but only in what I suspect is a
pretty rare version and environment combination. As said earlier, they work
on Vista and beyond, but they require that the process has been elevated in
order to obtain the symlink privilege. For example, even as an administrator
account on Windows 7, you need to explicitly open up cmd with "Run as
Administrator" to properly symlink (through Python or otherwise).

If we can't execute the symlink, we raise OSError. We might as well try
symlinks then fallback on OSError.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20111024/ff29d766/attachment.html>


More information about the Python-ideas mailing list