This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Venv’s config file (pyvenv.cfg) should be compatible with ConfigParser
Type: enhancement Stage: resolved
Components: Library (Lib) Versions: Python 3.8, Python 3.7
process
Status: closed Resolution: rejected
Dependencies: Superseder:
Assigned To: Nosy List: uranusjr, vinay.sajip
Priority: normal Keywords:

Created on 2018-01-16 10:44 by uranusjr, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (2)
msg310071 - (view) Author: Tzu-ping Chung (uranusjr) * Date: 2018-01-16 10:44
I’m not sure if it is intended, but it seems wrong to me that pyvenv.cfg is using a format that ConfigParser does not recognise. ConfigParser requires all values be placed under a section, but pyvenv.cfg does not do that.

Maybe related:

* ConfigParser’s format requirement: https://docs.python.org/3/library/configparser.html#supported-ini-file-structure
* How venv creates the configuration file: https://github.com/python/cpython/blob/master/Lib/venv/__init__.py#L141
* Abandoned discussion on whether ConfigParser should support section-less format #22253
msg310327 - (view) Author: Vinay Sajip (vinay.sajip) * (Python committer) Date: 2018-01-20 07:20
"Seems wrong to me" is not a sufficient reason for changing things in this area. The pyvenv.cfg file is intended to be parsed by the interpreter's C code as well as by Python code, so its format needs to be kept as simple as possible.
History
Date User Action Args
2022-04-11 14:58:56adminsetgithub: 76748
2018-01-20 07:20:47vinay.sajipsetstatus: open -> closed
resolution: rejected
messages: + msg310327

stage: resolved
2018-01-19 20:25:12terry.reedysetnosy: + vinay.sajip

versions: - Python 3.4, Python 3.5, Python 3.6
2018-01-16 10:44:16uranusjrcreate