Merge pull request #4944 from kivy/deprecate

deprecate modules pertaining to listview
This commit is contained in:
dessant 2017-01-23 15:45:42 +02:00 committed by GitHub
commit e4d8cb9c3a
9 changed files with 47 additions and 0 deletions

View File

@ -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

View File

@ -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:

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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__()

View File

@ -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

View File

@ -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)

View File

@ -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 <kivy.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)