[issue33251] ConfigParser.items returns items present in vars

2018-04-09 Thread Tim Shaffer

New submission from Tim Shaffer :

The documentation for ConfigParser.items(section, raw=False, vars=None) says 
the following:

> Changed in version 3.2: Items present in vars no longer appear in the result. 
> The previous behaviour mixed actual parser options with variables provided 
> for interpolation.

https://docs.python.org/3/library/configparser.html#configparser.ConfigParser.items

However, this does not seem to be the case. The keys from vars are present in 
the output. Tested on 3.6.5.

This example shows the issue:

import configparser

config = configparser.ConfigParser()

config.add_section('example')
config.set('example', 'name', 'timster %(suffix)s')

data = config.items('example', vars={'suffix': 'user'})

print(data)


Expected output:

[('name', 'timster user')]

Actual output:

[('name', 'timster user'), ('suffix', 'user')]

--
components: Library (Lib)
messages: 315148
nosy: timster
priority: normal
severity: normal
status: open
title: ConfigParser.items returns items present in vars
versions: Python 3.6

___
Python tracker 
<https://bugs.python.org/issue33251>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33251] ConfigParser.items returns items present in vars

2018-04-09 Thread Tim Shaffer

Change by Tim Shaffer :


--
type:  -> behavior

___
Python tracker 
<https://bugs.python.org/issue33251>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com