[New-bugs-announce] [issue10627] Remove usage of deprecated configparser.ConfigParser class in the stdlib

Łukasz Langa report at bugs.python.org
Sat Dec 4 17:11:06 CET 2010


New submission from Łukasz Langa <lukasz at langa.pl>:

configparser.ConfigParser is deprecated as of 3.2 and thus standard library modules should not use that.

The migration path is trivial and should not introduce any compatibility problems whatsoever. All it needs is to switch usage of ConfigParser to SafeConfigParser.

Please find attached a patch that makes the necessary renames.

For the curious, rationale for the deprecation:
- ConfigParser forces interpolation on users, providing no way of escaping interpolation if necessary
- ConfigParser does not check types given on set() and add*() methods, which may lead to invalid internal state (which will raise exceptions when trying to write() configuration or get() values from it)
- until recently configparser's unit tests assumed no instance customization. ConfigParser's error handling is broken when optionxform is overriden

----------
assignee: tarek
components: Distutils, IDLE, Library (Lib)
keywords: needs review, patch
messages: 123367
nosy: eric.araujo, lukasz.langa, tarek
priority: high
severity: normal
stage: patch review
status: open
title: Remove usage of deprecated configparser.ConfigParser class in the stdlib
type: behavior
versions: Python 3.2

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


More information about the New-bugs-announce mailing list