classification
Title: Lib/configparser.py - RawConfigParser.set does not pass non-truthy values through to Interpolation.before_set
Type: behavior Stage:
Components: Library (Lib) Versions: Python 3.9, Python 3.8, Python 3.7, Python 3.6, Python 3.5
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: Strijker, taleinat
Priority: normal Keywords:

Created on 2020-01-11 19:41 by Strijker, last changed 2020-01-11 19:41 by Strijker.

Pull Requests
URL Status Linked Edit
PR 16772 Strijker, 2020-01-11 19:41
Messages (1)
msg359820 - (view) Author: Hans Strijker (Strijker) * Date: 2020-01-11 19:41
Method ```configparser.RawConfigParser.set()``` has optional parameter *value* with default value ```None``` resulting in the behavior that actually trying to set a config parameter to ```None``` will not be propagated to ```Interpolation.before_set()```. In fact, since it uses ```if value:``` and not ```if value is None:``` none of the non-truthy values will be passed through.

Suggested commit [8e008be](https://github.com/HStry/cpython/commit/8e008bea0cf6bd3c698b333fd39a383e124fe026) using already established ```_UNSET``` singleton, but that appears to break compatibility elsewhere.
History
Date User Action Args
2020-01-11 19:41:48Strijkercreate