Issue 32567: Venv’s config file (pyvenv.cfg) should be compatible with ConfigParser (original) (raw)

Issue32567

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:56 admin set github: 76748
2018-01-20 07:20:47 vinay.sajip set status: open -> closedresolution: rejectedmessages: + stage: resolved
2018-01-19 20:25:12 terry.reedy set nosy: + vinay.sajipversions: - Python 3.4, Python 3.5, Python 3.6
2018-01-16 10:44:16 uranusjr create