diff options
author | Matthew Clapp <itsayellow+dev@gmail.com> | 2021-07-02 20:48:15 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-02 20:48:15 (GMT) |
commit | 4bcef2bb48b3fd82011a89c1c716421b789f1442 (patch) | |
tree | 42ba6fc8eb4019c7da4c099d6de644bf140e6f2d | |
parent | ec8759b060eff83ff466f42c5a96d83a685016ce (diff) | |
download | cpython-4bcef2bb48b3fd82011a89c1c716421b789f1442.zip cpython-4bcef2bb48b3fd82011a89c1c716421b789f1442.tar.gz cpython-4bcef2bb48b3fd82011a89c1c716421b789f1442.tar.bz2 |
bpo-44388: Update venv EnvBuilder.ensure_directories() docs. (GH-26663)
Ref:
This changes the documentation for `EnvBuilder.ensure_directories(env_dir)` to match the actual behavior of that API call.
In particular, `ensure_directories()` is not affected by the state of the `upgrade` attribute, and will not cause an error to have existing directories whether or not the `clear` attribute is set.
This documentation change I believe should be valid to all python versions back to 3.6.
Automerge-Triggered-By: GH:vsajip
-rw-r--r-- | Doc/library/venv.rst | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/Doc/library/venv.rst b/Doc/library/venv.rst index 2a4eede..5eb5094 100644 --- a/Doc/library/venv.rst +++ b/Doc/library/venv.rst @@ -170,11 +170,12 @@ creation according to their needs, the :class:`EnvBuilder` class. .. method:: ensure_directories(env_dir) - Creates the environment directory and all necessary directories, and - returns a context object. This is just a holder for attributes (such as - paths), for use by the other methods. The directories are allowed to - exist already, as long as either ``clear`` or ``upgrade`` were - specified to allow operating on an existing environment directory. + Creates the environment directory and all necessary subdirectories that + don't already exist, and returns a context object. This context object + is just a holder for attributes (such as paths) for use by the other + methods. If the :class:`EnvBuilder` is created with the arg + ``clear=True``, contents of the environment directory will be cleared + and then all necessary subdirectories will be recreated. .. method:: create_configuration(context) |