[issue44388] venv API Docs for EnvBuilder.ensure_directories incorrectly describe behavior

2021-07-28 Thread Vinay Sajip


Change by Vinay Sajip :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44388] venv API Docs for EnvBuilder.ensure_directories incorrectly describe behavior

2021-07-02 Thread miss-islington


miss-islington  added the comment:


New changeset 4bcef2bb48b3fd82011a89c1c716421b789f1442 by Matthew Clapp in 
branch 'main':
bpo-44388: Update venv EnvBuilder.ensure_directories() docs. (GH-26663)
https://github.com/python/cpython/commit/4bcef2bb48b3fd82011a89c1c716421b789f1442


--
nosy: +miss-islington

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44388] venv API Docs for EnvBuilder.ensure_directories incorrectly describe behavior

2021-06-13 Thread Ned Deily


Change by Ned Deily :


--
nosy: +vinay.sajip

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44388] venv API Docs for EnvBuilder.ensure_directories incorrectly describe behavior

2021-06-12 Thread Matthew Clapp


Matthew Clapp  added the comment:

To clarify my intent: I'd really love a way to get the paths info from context 
from an existing native venv without affecting the directories of the venv.  It 
seems like this is what ensure_directories *actually* does if clear==False.  
I'm hoping that this is also something that could be pledged in the API and 
noted in the documentation so this behavior can be relied on.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44388] venv API Docs for EnvBuilder.ensure_directories incorrectly describe behavior

2021-06-10 Thread Matthew Clapp


Change by Matthew Clapp :


--
keywords: +patch
pull_requests: +25250
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/26663

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44388] venv API Docs for EnvBuilder.ensure_directories incorrectly describe behavior

2021-06-10 Thread Matthew Clapp


New submission from Matthew Clapp :

The docs for the venv module, EnvBuilder class, ensure_directories method, 
describe behavior that doesn't match what its actual behavior is, (and what the 
code is).  I propose to update the documentation of the API to match the actual 
behavior.

https://docs.python.org/3.9/library/venv.html#venv.EnvBuilder.ensure_directories

The last sentence for ensure_directories(env_dir) reads:
The directories are allowed to exist already, as long as either clear or 
upgrade were specified to allow operating on an existing environment directory.

After testing and looking at the code (including past commits back over 6 
years), this is not true.  ensure_directories completely disregards the 
`upgrade` attribute.  Also it allows directories to exist already 
unconditionally (always operating without error), whether the `clear` attribute 
is set or not.  In addition, if `clear` is not set, it doesn't make any changes 
to the directories, but helpfully still returns the context of venv paths.

Ref: 
https://github.com/python/cpython/blob/3ce35bfbbe29664942f9a8c50c177a4575a31934/Lib/venv/__init__.py#L95

--
assignee: docs@python
components: Documentation
messages: 395603
nosy: docs@python, itsayellow
priority: normal
severity: normal
status: open
title: venv API Docs for EnvBuilder.ensure_directories incorrectly describe 
behavior
versions: Python 3.10, Python 3.11, Python 3.6, Python 3.7, Python 3.8, Python 
3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com