Commit 6aae9fb3 authored by idle sign's avatar idle sign

`strict_mode` removed to improve forward compatibility.

parent 163f3644
......@@ -100,12 +100,6 @@ class ConfigHandler(object):
"""
strict_mode = True
"""Flag. Whether unknown options in config should
raise DistutilsOptionError exception, or pass silently.
"""
def __init__(self, target_obj, options):
sections = {}
......@@ -316,9 +310,7 @@ class ConfigHandler(object):
self[name] = value
except KeyError:
if self.strict_mode:
raise DistutilsOptionError(
'Unknown distribution option: %s' % name)
pass # Keep silent for a new option may appear anytime.
def parse(self):
"""Parses configuration file items from one
......
......@@ -417,18 +417,6 @@ class TestOptions:
with get_dist(tmpdir) as dist:
assert dist.packages == ['fake_package']
def test_unknown_options_item(self, tmpdir):
fake_env(
tmpdir,
'[options]\n'
'zip_safe = True\n'
'usr_2to3 = 1\n'
)
with get_dist(tmpdir, parse=False) as dist:
with pytest.raises(DistutilsOptionError):
dist.parse_config_files()
def test_extras_require(self, tmpdir):
fake_env(
tmpdir,
......
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