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.

Author Isaac.Jurado
Recipients Isaac.Jurado
Date 2011-05-09.14:38:15
SpamBayes Score 0.0006678101
Marked as misclassified No
Message-id <1304951901.69.0.838316946383.issue12036@psf.upfronthosting.co.za>
In-reply-to
Content
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
History
Date User Action Args
2011-05-09 14:38:21Isaac.Juradosetrecipients: + Isaac.Jurado
2011-05-09 14:38:21Isaac.Juradosetmessageid: <1304951901.69.0.838316946383.issue12036@psf.upfronthosting.co.za>
2011-05-09 14:38:15Isaac.Juradolinkissue12036 messages
2011-05-09 14:38:15Isaac.Juradocreate