Issue 19841: ConfigParser PEP issues (original) (raw)
There are a few PEP violations like namespace clashes, the attached patch fixes some of them thus solving a problem for me where shared library build with Nuitka segmentation faults. The patch does not make the code backwards compatible with the vars and map arguments renames as there is no way to do that and maybe the new variable names, vvars and mmap are not appropriate but you can roll your own patch with the same idea.
Cheers!
Thanks for the patch, Ivailo.
The following changes are going to break the public API:
- def get(self, section, option, raw=False, vars=None):
+ def get(self, section, option, raw=False, vvars=None):
- def items(self, section, raw=False, vars=None):
+ def items(self, section, raw=False, vvars=None):
Also,
-class RawConfigParser:
+class RawConfigParser(object):
There are a few differences between old-style and new-style classes. RawConfigParser implements collections.abs.MutableMapping so this isn't a problem in Python 3.
Closing this as "won't fix".