(original) (raw)
changeset: 100083:d2a32b78be96 branch: 3.5 parent: 100081:e4b0f003ad13 user: Berker Peksag berker.peksag@gmail.com date: Thu Jan 28 09:01:26 2016 +0200 files: Doc/using/venv-create.inc Lib/venv/__init__.py description: Issue #26034: Sync documentation of --clear with its behavior Most of the docs has already been updated in c3c188a0325a. diff -r e4b0f003ad13 -r d2a32b78be96 Doc/using/venv-create.inc --- a/Doc/using/venv-create.inc Thu Jan 28 08:40:03 2016 +0200 +++ b/Doc/using/venv-create.inc Thu Jan 28 09:01:26 2016 +0200 @@ -45,9 +45,8 @@ are not the default for the platform. --copies Try to use copies rather than symlinks, even when symlinks are the default for the platform. - --clear Delete the environment directory if it already exists. - If not specified and the directory exists, an error is - raised. + --clear Delete the contents of the environment directory if it + already exists, before environment creation. --upgrade Upgrade the environment directory to use this version of Python, assuming Python has been upgraded in-place. --without-pip Skips installing or upgrading pip in the virtual diff -r e4b0f003ad13 -r d2a32b78be96 Lib/venv/__init__.py --- a/Lib/venv/__init__.py Thu Jan 28 08:40:03 2016 +0200 +++ b/Lib/venv/__init__.py Thu Jan 28 09:01:26 2016 +0200 @@ -19,9 +19,8 @@ Give the virtual environment access to the system site-packages dir. --symlinks Attempt to symlink rather than copy. - --clear Delete the environment directory if it already exists. - If not specified and the directory exists, an error is - raised. + --clear Delete the contents of the environment directory if it + already exists, before environment creation. --upgrade Upgrade the environment directory to use this version of Python, assuming Python has been upgraded in-place. --without-pip Skips installing or upgrading pip in the virtual @@ -52,9 +51,8 @@ :param system_site_packages: If True, the system (global) site-packages dir is available to created environments. - :param clear: If True and the target directory exists, it is deleted. - Otherwise, if the target directory exists, an error is - raised. + :param clear: Delete the contents of the environment directory if it + already exists, before environment creation. :param symlinks: If True, attempt to symlink rather than copy files into virtual environment. :param upgrade: If True, upgrade an existing virtual environment. @@ -361,9 +359,8 @@ :param env_dir: The target directory to create an environment in. :param system_site_packages: If True, the system (global) site-packages dir is available to the environment. - :param clear: If True and the target directory exists, it is deleted. - Otherwise, if the target directory exists, an error is - raised. + :param clear: Delete the contents of the environment directory if it + already exists, before environment creation. :param symlinks: If True, attempt to symlink rather than copy files into virtual environment. :param with_pip: If True, ensure pip is installed in the virtual /berker.peksag@gmail.com