From f665c5dae6c48babcfca77e5b5f27b52e159977a Mon Sep 17 00:00:00 2001 From: dessant Date: Mon, 23 Jan 2017 15:42:48 +0200 Subject: [PATCH] deprecate modules pertaining to listview: adapters, abstractview and selectableview --- kivy/adapters/__init__.py | 4 ++++ kivy/adapters/adapter.py | 6 ++++++ kivy/adapters/args_converters.py | 3 +++ kivy/adapters/dictadapter.py | 4 ++++ kivy/adapters/listadapter.py | 4 ++++ kivy/adapters/models.py | 7 +++++++ kivy/adapters/simplelistadapter.py | 4 ++++ kivy/uix/abstractview.py | 9 +++++++++ kivy/uix/selectableview.py | 6 ++++++ 9 files changed, 47 insertions(+) diff --git a/kivy/adapters/__init__.py b/kivy/adapters/__init__.py index 071d28e32..108904f7d 100644 --- a/kivy/adapters/__init__.py +++ b/kivy/adapters/__init__.py @@ -4,6 +4,10 @@ Adapters .. versionadded:: 1.5.0 +.. note:: + + The feature has been deprecated. + An adapter is a mediating controller-type class that processes and presents data for use in views. It does this by generating models, generally lists of :class:`~kivy.uix.selectableview.SelectableView` items, that are consumed and diff --git a/kivy/adapters/adapter.py b/kivy/adapters/adapter.py index 3d6f4ab3e..deaf722ad 100644 --- a/kivy/adapters/adapter.py +++ b/kivy/adapters/adapter.py @@ -4,6 +4,10 @@ Adapter .. versionadded:: 1.5 +.. note:: + + The feature has been deprecated. + .. warning:: This code is still experimental, and its API is subject to change in a @@ -46,6 +50,7 @@ from kivy.lang import Builder from kivy.adapters.args_converters import list_item_args_converter from kivy.factory import Factory from kivy.compat import string_types +from kivy.utils import deprecated class Adapter(EventDispatcher): @@ -103,6 +108,7 @@ class Adapter(EventDispatcher): defaults to None. ''' + @deprecated def __init__(self, **kwargs): if 'data' not in kwargs: diff --git a/kivy/adapters/args_converters.py b/kivy/adapters/args_converters.py index e724ef08c..38de740fa 100755 --- a/kivy/adapters/args_converters.py +++ b/kivy/adapters/args_converters.py @@ -4,6 +4,9 @@ List Item View Argument Converters .. versionadded:: 1.5 +.. note:: + + The feature has been deprecated. The default list item args converter for list adapters is a function (shown below) that takes a row index and a string. It returns a dict with the string diff --git a/kivy/adapters/dictadapter.py b/kivy/adapters/dictadapter.py index 023152868..9efcf97a1 100755 --- a/kivy/adapters/dictadapter.py +++ b/kivy/adapters/dictadapter.py @@ -4,6 +4,10 @@ DictAdapter .. versionadded:: 1.5 +.. note:: + + The feature has been deprecated. + .. warning:: This code is still experimental, and its API is subject to change in a diff --git a/kivy/adapters/listadapter.py b/kivy/adapters/listadapter.py index 3b21e4d5e..909f371a0 100644 --- a/kivy/adapters/listadapter.py +++ b/kivy/adapters/listadapter.py @@ -4,6 +4,10 @@ ListAdapter .. versionadded:: 1.5 +.. note:: + + The feature has been deprecated. + .. warning:: This code is still experimental, and its API is subject to change in a diff --git a/kivy/adapters/models.py b/kivy/adapters/models.py index f2e964209..49abad219 100755 --- a/kivy/adapters/models.py +++ b/kivy/adapters/models.py @@ -4,6 +4,10 @@ SelectableDataItem .. versionadded:: 1.5 +.. note:: + + The feature has been deprecated. + .. warning:: This code is still experimental, and its API is subject to change in a @@ -45,12 +49,15 @@ It is easy to build such a class with plain Python. __all__ = ('SelectableDataItem', ) +from kivy.utils import deprecated + class SelectableDataItem(object): ''' A mixin class containing requirements for selection operations. ''' + @deprecated def __init__(self, is_selected=False): super(SelectableDataItem, self).__init__() diff --git a/kivy/adapters/simplelistadapter.py b/kivy/adapters/simplelistadapter.py index bfb8049f1..cc1d71824 100644 --- a/kivy/adapters/simplelistadapter.py +++ b/kivy/adapters/simplelistadapter.py @@ -4,6 +4,10 @@ SimpleListAdapter .. versionadded:: 1.5 +.. note:: + + The feature has been deprecated. + .. warning:: This code is still experimental, and its API is subject to change in a diff --git a/kivy/uix/abstractview.py b/kivy/uix/abstractview.py index 75cfa5663..d677ac0f0 100644 --- a/kivy/uix/abstractview.py +++ b/kivy/uix/abstractview.py @@ -4,6 +4,10 @@ Abstract View .. versionadded:: 1.5 +.. note:: + + The feature has been deprecated. + .. warning:: This code is still experimental, and its API is subject to change in a @@ -20,6 +24,7 @@ __all__ = ('AbstractView', ) from kivy.uix.floatlayout import FloatLayout from kivy.properties import ObjectProperty +from kivy.utils import deprecated class AbstractView(FloatLayout): @@ -33,3 +38,7 @@ class AbstractView(FloatLayout): common example is the :class:`~kivy.adapters.listadapter.ListAdapter` used for managing data items in a list. ''' + + @deprecated + def __init__(self, **kwargs): + super(AbstractView, self).__init__(**kwargs) diff --git a/kivy/uix/selectableview.py b/kivy/uix/selectableview.py index c67f6b8ec..0253c956a 100644 --- a/kivy/uix/selectableview.py +++ b/kivy/uix/selectableview.py @@ -2,6 +2,10 @@ SelectableView ============== +.. note:: + + The feature has been deprecated. + This module houses the :class:`SelectableView` mixin class. This is used by the :class:`~kivy.uix.listview.ListView` and it's associated :mod:`Adapters ` to provide selection behaviour @@ -10,6 +14,7 @@ when presenting large lists. ''' from kivy.properties import NumericProperty, BooleanProperty +from kivy.utils import deprecated class SelectableView(object): @@ -30,6 +35,7 @@ class SelectableView(object): in sync with the equivalent property the data item represents. ''' + @deprecated def __init__(self, **kwargs): super(SelectableView, self).__init__(**kwargs)