[issue23835] configparser does not convert defaults to strings

Łukasz Langa report at bugs.python.org
Tue Aug 22 15:06:09 EDT 2017


Łukasz Langa added the comment:

I merged the original fix and documented it. I thought about it some more and remembered that RawConfigParser objects do in fact support non-string values by historical coincidence. It's unfortunately a popular idiom with old programs to load some configuration defaults using the `defaults=` keyword and later use the legacy get() and set() API which doesn't check types inside. A config file like this cannot be safely written back to a file, etc.

I would very much like to get rid of RawConfigParser entirely but we're stuck with it due to backwards compatibility. So, to fix the regression, I created PR 3191.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue23835>
_______________________________________


More information about the Python-bugs-list mailing list