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.

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, iritkatriel, taleinat
Priority: normal Keywords:

Created on 2020-01-11 19:41 by Strijker, last changed 2022-04-11 14:59 by admin.

Pull Requests
URL Status Linked Edit
PR 16772 Strijker, 2020-01-11 19:41
Messages (2)
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.
msg408402 - (view) Author: Irit Katriel (iritkatriel) * (Python committer) Date: 2021-12-12 17:26
Hans, as mentioned on the PR, the merit of this change needs to be discussed. If you would like to pursue this, please begin by explaining the use case.

If you lost interest in this problem, let's close this issue.
History
Date User Action Args
2022-04-11 14:59:25adminsetstatus: pending -> open
github: 83487
2021-12-12 17:26:36iritkatrielsetstatus: open -> pending
nosy: + iritkatriel
messages: + msg408402

2020-01-11 19:41:48Strijkercreate