New submission from Isaac Jurado <ijur...@econcept.es>:

>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

----------
components: Library (Lib)
files: test.ini
messages: 135591
nosy: Isaac.Jurado
priority: normal
severity: normal
status: open
title: ConfigParser: items() adds the vars dictionary to the result
type: behavior
versions: Python 2.6, Python 2.7
Added file: http://bugs.python.org/file21942/test.ini

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue12036>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to