Commit ff23e8cf authored by Raymond Hettinger's avatar Raymond Hettinger

Fix bootstrapping problem where setup.py was using configparser

before _collections had been built.
parent dcaf329e
......@@ -87,8 +87,13 @@ ConfigParser -- responsible for parsing a list of
write the configuration state in .ini format
"""
try:
from collections import OrderedDict as _default_dict
except ImportError:
# fallback for setup.py which hasn't yet built _collections
_default_dict = dict
import re
from collections import OrderedDict
__all__ = ["NoSectionError", "DuplicateSectionError", "NoOptionError",
"InterpolationError", "InterpolationDepthError",
......@@ -216,7 +221,7 @@ class MissingSectionHeaderError(ParsingError):
class RawConfigParser:
def __init__(self, defaults=None, dict_type=OrderedDict):
def __init__(self, defaults=None, dict_type=_default_dict):
self._dict = dict_type
self._sections = self._dict()
self._defaults = self._dict()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment