Roundup Robot added the comment:
New changeset c3c188a0325a by Vinay Sajip in branch 'default':
Closes #15776: pyvenv now works with existing directories.
http://hg.python.org/cpython/rev/c3c188a0325a
--
resolution: - fixed
stage: patch review - committed/rejected
status: open - closed
Andrew Svetlov added the comment:
Looks good. Thank you.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15776
___
___
Python-bugs-list mailing
Changes by Vinay Sajip vinay_sa...@yahoo.co.uk:
--
hgrepos: +150
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15776
___
___
Python-bugs-list
Changes by Vinay Sajip vinay_sa...@yahoo.co.uk:
Added file: http://bugs.python.org/file27384/e14d4c28bb03.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15776
___
Éric Araujo added the comment:
LGTM.
--
priority: critical - normal
stage: needs patch - patch review
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15776
___
Changes by Vinay Sajip vinay_sa...@yahoo.co.uk:
--
nosy: +carljm
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15776
___
___
Python-bugs-list
Roundup Robot added the comment:
New changeset b200acb6bed4 by Andrew Svetlov in branch 'default':
Delete Misc/NEWS record for reverted #15776.
http://hg.python.org/cpython/rev/b200acb6bed4
--
___
Python tracker rep...@bugs.python.org
Changes by Andrew Svetlov andrew.svet...@gmail.com:
--
priority: release blocker - critical
stage: - needs patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15776
___
New submission from Stefan Holek:
With virtualenv I can do
$ virtualenv .
but with pyvenv I get
$pyvenv .
Error: Directory exists: /Users/stefan/sandbox/foo
Please allow pyvenv to apply to existing directories.
--
components: None
messages: 168990
nosy: stefanholek
Changes by Ned Deily n...@acm.org:
--
nosy: +vinay.sajip
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15776
___
___
Python-bugs-list mailing list
Andrew Svetlov added the comment:
Does it mean implicit implying --upgrade option if venv dir is '.'?
--
nosy: +asvetlov
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15776
___
Vinay Sajip added the comment:
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,
Andrew Svetlov added the comment:
I don't like current --clear behavior, it's really useless because now venv
just deletes everything from virtual environment.
You lose not only virtual env but files from your project also.
virtualenv cleans only env/Lib directory, that's much better.
I think
Vinay Sajip added the comment:
Venvs should be regarded as throwaway; there is really no reason to add other
files (e.g. project files) to venvs.
Two common patterns are:
1. Use a single place for all venvs (virtualenvwrapper does this)
2. Use a venv in a subdirectory of a project directory
Andrew Svetlov added the comment:
Well, I see. Agree with your patch then, it is correct.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15776
___
Georg Brandl added the comment:
LGTM, please apply.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15776
___
___
Python-bugs-list mailing list
Antoine Pitrou added the comment:
os.path.isdir(foo) will return True if foo is a symlink to a directory, and
then shutil.rmtree(foo) will fail:
os.path.isdir(foo)
True
os.path.islink(foo)
True
shutil.rmtree(foo)
Traceback (most recent call last):
File stdin, line 1, in module
File
Roundup Robot added the comment:
New changeset 0668fc196ce5 by Andrew Svetlov in branch 'default':
Issue #15776: Allow pyvenv to work in existing directory with --clean.
http://hg.python.org/cpython/rev/0668fc196ce5
--
nosy: +python-dev
___
Python
Andrew Svetlov added the comment:
It is bug in shutil.rmtree, right?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15776
___
___
Antoine Pitrou added the comment:
It is bug in shutil.rmtree, right?
Read the documentation:
shutil.rmtree(path, ignore_errors=False, onerror=None)
Delete an entire directory tree; path must point to a directory (but
not a symbolic link to a directory)
--
Changes by Georg Brandl ge...@python.org:
--
priority: normal - release blocker
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15776
___
___
Georg Brandl added the comment:
Another *perfect* example how even the most innocuous-seeming patch can be
wrong.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15776
___
Andrew Svetlov added the comment:
Good point.
I will prepare the patch to fix this.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15776
___
___
Éric Araujo added the comment:
Two common patterns are:
1. Use a single place for all venvs (virtualenvwrapper does this)
2. Use a venv in a subdirectory of a project directory
I’m a recent virtualenv user, but before I became a virtualenvwrapper fan I
used to create venvs in the project
Stefan Holek added the comment:
Hm. What I am actually after is to bless an existing directory – source files
and all – with a virtualenv (or pyvenv). I am not interested in the command
deleting anything from anywhere, why thank you.
Workflow:
$ git clone g...@github.com:stefanholek/foo
Vinay Sajip added the comment:
This is how I use virtualenv at the moment and I'd rather not lose that
ability. Thanks.
Well, changing it to do that means changing functionality, which is disallowed
at this point in the release process.
--
___
Vinay Sajip added the comment:
I used to create venvs in the project top-level directory (typically a
Mercurial clone root), using “virtualenv .”
I've used option 2 for this, using e.g. virtualenv env in the project
directory.
--
___
Python
Stefan Holek added the comment:
Sorry for being late. I'll make a feature request for 3.4 then.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15776
___
Éric Araujo added the comment:
Well, changing it to do that means changing functionality, which is
disallowed at this point in the release process.
I think people used to “virtualenv .” can see this as a regression between
virtualenv and pyvenv, but if the PEP did not list that use case then
Antoine Pitrou added the comment:
Le vendredi 24 août 2012 à 18:47 +, Éric Araujo a écrit :
Éric Araujo added the comment:
Well, changing it to do that means changing functionality, which is
disallowed at this point in the release process.
I think people used to “virtualenv .” can see
Vinay Sajip added the comment:
Reverted.
--
assignee: - vinay.sajip
components: +Library (Lib) -None
type: behavior - enhancement
versions: -Python 3.3
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15776
31 matches
Mail list logo