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 timster
Recipients timster
Date 2018-04-09.20:04:26
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1523304266.46.0.682650639539.issue33251@psf.upfronthosting.co.za>
In-reply-to
Content
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')]
History
Date User Action Args
2018-04-09 20:04:26timstersetrecipients: + timster
2018-04-09 20:04:26timstersetmessageid: <1523304266.46.0.682650639539.issue33251@psf.upfronthosting.co.za>
2018-04-09 20:04:26timsterlinkissue33251 messages
2018-04-09 20:04:26timstercreate