diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 2fd5ca4..8c6616e 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -15,6 +15,7 @@ Version 0.4.0 *yet to be released* - The ``passwordeval`` parameter has been renamed to ``passwordconfig``. +- The old way of writing certain config values such as lists is now gone. - Collection discovery has been rewritten. Old configuration files should be compatible with it, but vdirsyncer now caches the results of the collection discovery. You have to run ``vdirsyncer discover`` if collections were added diff --git a/vdirsyncer/cli/utils.py b/vdirsyncer/cli/utils.py index 010293b..76ad70c 100644 --- a/vdirsyncer/cli/utils.py +++ b/vdirsyncer/cli/utils.py @@ -95,19 +95,6 @@ def validate_section_name(name, section_type): chars_display)) -def _parse_old_config_list_value(d, key): - value = d.get(key, []) - if isinstance(value, str): - # XXX: Deprecation - old_form = value - value = list(filter(bool, (x.strip() for x in value.split(',')))) - cli_logger.warning( - '{!r} is deprecated, please use:\n{} = {}\n' - 'The old form will be removed in 0.4.0.' - .format(old_form, key, json.dumps(value))) - return value - - def get_status_name(pair, collection): if collection is None: return pair @@ -201,7 +188,7 @@ def _get_coll(pair_name, storage_name, collection, discovered, config): def _collections_for_pair_impl(status_path, name_a, name_b, pair_name, config_a, config_b, pair_options): - shortcuts = set(_parse_old_config_list_value(pair_options, 'collections')) + shortcuts = set(pair_options.get('collections', ())) if not shortcuts: yield None, (config_a, config_b) else: diff --git a/vdirsyncer/storage/dav.py b/vdirsyncer/storage/dav.py index 2208ae7..4c78087 100644 --- a/vdirsyncer/storage/dav.py +++ b/vdirsyncer/storage/dav.py @@ -571,18 +571,8 @@ class CaldavStorage(DavStorage): def __init__(self, start_date=None, end_date=None, item_types=('VTODO', 'VEVENT'), **kwargs): super(CaldavStorage, self).__init__(**kwargs) - if isinstance(item_types, str): - orig_item_types = item_types - item_types = list(filter( - bool, (x.strip() for x in item_types.split(',')) - )) - - # XXX: Deprecation - import json - dav_logger.warning( - '{!r} is deprecated, please use:\nitem_types = {}\n' - 'The old form will be removed in 0.4.0.' - .format(orig_item_types, json.dumps(item_types))) + if not isinstance(item_types, (list, tuple)): + raise ValueError('item_types must be a list.') self.item_types = tuple(item_types) if (start_date is None) != (end_date is None):