Upgrade voluptuous to 0.10.5 (#7107)

* Upgrade voluptuous to 0.10.5

* Fix tests
pull/7377/head
Fabian Affolter 2017-04-30 09:42:19 +02:00 committed by Paulus Schoutsen
parent 7ff1ded0b5
commit 1f4f2d7086
5 changed files with 7 additions and 8 deletions

View File

@ -454,10 +454,9 @@ def _identify_config_schema(module):
except (AttributeError, KeyError):
return (None, None)
t_schema = str(schema)
if (t_schema.startswith('<function ordered_dict') or
t_schema.startswith('<Schema({<function slug')):
if t_schema.startswith(('{', '<function ordered_dict')):
return ('dict', schema)
if t_schema.startswith('All(<function ensure_list'):
if t_schema.startswith(('[', 'All(<function ensure_list')):
return ('list', schema)
return '', schema

View File

@ -3,7 +3,7 @@ pyyaml>=3.11,<4
pytz>=2017.02
pip>=7.1.0
jinja2>=2.9.5
voluptuous==0.9.3
voluptuous==0.10.5
typing>=3,<4
aiohttp==2.0.7
async_timeout==1.2.0

View File

@ -4,7 +4,7 @@ pyyaml>=3.11,<4
pytz>=2017.02
pip>=7.1.0
jinja2>=2.9.5
voluptuous==0.9.3
voluptuous==0.10.5
typing>=3,<4
aiohttp==2.0.7
async_timeout==1.2.0

View File

@ -20,7 +20,7 @@ REQUIRES = [
'pytz>=2017.02',
'pip>=7.1.0',
'jinja2>=2.9.5',
'voluptuous==0.9.3',
'voluptuous==0.10.5',
'typing>=3,<4',
'aiohttp==2.0.7',
'async_timeout==1.2.0',

View File

@ -509,7 +509,7 @@ def test_merge_once_only(merge_log_err):
'mqtt': {}, 'api': {}
}
config_util.merge_packages_config(config, packages)
assert merge_log_err.call_count == 2
assert merge_log_err.call_count == 1
assert len(config) == 3
@ -521,7 +521,7 @@ def test_merge_id_schema(hass):
'script': 'dict',
'input_boolean': 'dict',
'shell_command': 'dict',
'qwikswitch': '',
'qwikswitch': 'dict',
}
for name, expected_type in types.items():
module = config_util.get_component(name)