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 vinay.sajip
Recipients asvetlov, georg.brandl, stefanholek, vinay.sajip
Date 2012-08-24.12:17:43
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1345810664.74.0.331122168178.issue15776@psf.upfronthosting.co.za>
In-reply-to
Content
Running

pyvenv --clear .

should work, but doesn't because of the way the venv directory is initialised - a shutil.rmtree() call is used. This can cause problems on Windows (current directory is regarded as open and so cannot be deleted) and also on Posix, because the inode changes and you get "file not found" errors because e.g. the shell has pointers to the old inode and the venv files are added to the new inode.

The attached patch should work, as it deletes the venv directory contents rather than the venv directory itself. I'll just check with Georg that it's OK to commit this - I don't see any problem, as it's a bug-fix rather than a new feature, but I think it best to run it past him.
History
Date User Action Args
2012-08-24 12:17:44vinay.sajipsetrecipients: + vinay.sajip, georg.brandl, asvetlov, stefanholek
2012-08-24 12:17:44vinay.sajipsetmessageid: <1345810664.74.0.331122168178.issue15776@psf.upfronthosting.co.za>
2012-08-24 12:17:44vinay.sajiplinkissue15776 messages
2012-08-24 12:17:43vinay.sajipcreate