Issue 12036: ConfigParser: Document items() added the vars dictionary to the result (original) (raw)

Issue12036

Created on 2011-05-09 14:38 by Isaac.Jurado, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
test.ini Isaac.Jurado,2011-05-09 14:38 Sample dumb config file.
Messages (3)
msg135591 - (view) Author: Isaac Jurado (Isaac.Jurado) Date: 2011-05-09 14:38
From the following python code: import os from ConfigParser import ConfigParser from pprint import pprint c = ConfigParser() c.read(['test.ini']) pprint(c.items('test', raw=False, vars=os.environ)) I see the values contained in os.environ as well as in section "test" (in the attached configuration example). The problem seems to come from the following line: http://hg.python.org/cpython/file/5395f96588d4/Lib/ConfigParser.py#l605 Which is fixed in py3k but for the 2.x branch has not been modified sin 2002: http://hg.python.org/cpython/annotate/8bb6003f7f54/Lib/ConfigParser.py#514
msg135610 - (view) Author: Łukasz Langa (lukasz.langa) * (Python committer) Date: 2011-05-09 16:40
This annoyance can't be fixed in 2.x anymore since this is a change of behaviour requiring a full release. While it is very unlikely someone depended on this "feature", changing it breaks compatibility. Reclassified as `Documentation` to explicitly describe that change in 3.2.
msg135613 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2011-05-09 16:51
New changeset 62e2b74c3bfc by Łukasz Langa in branch '3.2': Closes #12036: ConfigParser: Document items() added the vars dictionary to the result http://hg.python.org/cpython/rev/62e2b74c3bfc New changeset 2d984cc4afb0 by Łukasz Langa in branch 'default': Merged solution for #12036 from 3.2 http://hg.python.org/cpython/rev/2d984cc4afb0
History
Date User Action Args
2022-04-11 14:57:17 admin set github: 56245
2011-05-09 16:51:08 python-dev set status: open -> closednosy: + python-devmessages: + resolution: fixedstage: needs patch -> resolved
2011-05-09 16:49:17 lukasz.langa set title: ConfigParser: items() adds the vars dictionary to the result -> ConfigParser: Document items() added the vars dictionary to the result
2011-05-09 16:40:06 lukasz.langa set priority: normal -> lowversions: + Python 3.2, Python 3.3, - Python 2.6, Python 2.7messages: + assignee: lukasz.langacomponents: + Documentation, - Library (Lib)stage: needs patch
2011-05-09 15:15:49 r.david.murray set nosy: + lukasz.langa
2011-05-09 14:38:15 Isaac.Jurado create