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
This commit is contained in:
Matthew Clapp 2021-07-02 13:48:15 -07:00 committed by GitHub
parent ec8759b060
commit 4bcef2bb48
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 5 deletions

View File

@ -170,11 +170,12 @@ creation according to their needs, the :class:`EnvBuilder` class.
.. method:: ensure_directories(env_dir) .. method:: ensure_directories(env_dir)
Creates the environment directory and all necessary directories, and Creates the environment directory and all necessary subdirectories that
returns a context object. This is just a holder for attributes (such as don't already exist, and returns a context object. This context object
paths), for use by the other methods. The directories are allowed to is just a holder for attributes (such as paths) for use by the other
exist already, as long as either ``clear`` or ``upgrade`` were methods. If the :class:`EnvBuilder` is created with the arg
specified to allow operating on an existing environment directory. ``clear=True``, contents of the environment directory will be cleared
and then all necessary subdirectories will be recreated.
.. method:: create_configuration(context) .. method:: create_configuration(context)