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')]
Hm. The documentation change was done in but it seems this was actually never the case, contrary to what the conversation on that other issue there states. I wouldn't change it for 3.6.6 anymore since it's pretty late in the release cycle. This looks like an interesting bug fix for 3.7.
Well, now that I think about it, this is not even a *bug* fix since it's behavior that configparser had since 1997. So that will have to go straight to 3.8.
> What *actually* was changed in 3.2? In terms of this issue, nothing. That piece of documentation was put without proper testing, based purely on a comment that somebody put on . My mistake.