prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  simplelistadapter should accept objects inheriting from list or tuple
  I'll found it usefull if it was possible to extend the list object that I pass to the simplelistadapter, but an exception is raised.
  
  Reproduce :
  
  ``` python
  from kivy.adapters.simplelistadapter import SimpleListAdapter
  class ExtendedList(list):
          pass
  
  list_adapter = SimpleListAdapter(data=ExtendedList())
  ```
  
  A solution :
  In kivy/adapters/simplelistadapter.py
  
  ``` python
   47         if type(kwargs['data']) not in (tuple, list):                           
   48             raise Exception('list adapter: data must be a tuple or list') 
  ```
  
  May be replaced by:
  
  ``` python
  if not isinstance(kwargs['data'], list) and not isinstance(kwargs['data'], tuple)
  ```
  
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `kivy/adapters/simplelistadapter.py`
  Content:
  ```
  1 '''
  2 SimpleListAdapter
  3 =================
  4 
  5 .. versionadded:: 1.5
  6 
  7 .. warning::
  8 
  9     This code is still experimental, and its API is subject to change in a
  10     future version.
  11 
  12 The :class:`~kivy.adapters.simplelistadapter.SimpleListAdapter` is used for
  13 basic lists. For example, it can be used for displaying a list of read-only
  14 strings that do not require user interaction.
  15 
  16 '''
  17 
  18 __all__ = ('SimpleListAdapter', )
  19 
  20 from kivy.adapters.adapter import Adapter
  21 from kivy.properties import ListProperty
  22 from kivy.lang import Builder
  23 
  24 
  25 class SimpleListAdapter(Adapter):
  26     '''A :class:`~kivy.adapters.simplelistadapter.SimpleListAdapter` is an
  27     adapter around a Python list.
  28 
  29     From :class:`~kivy.adapters.adapter.Adapter`, the
  30     :class:`~kivy.adapters.simplelistadapter.ListAdapter` gets cls, template,
  31     and args_converter properties.
  32     '''
  33 
  34     data = ListProperty([])
  35     '''The data list property contains a list of objects (which can be strings)
  36     that will be used directly if no args_converter function is provided. If
  37     there is an args_converter, the data objects will be passed to it for
  38     instantiating the item view class instances.
  39 
  40     :data:`data` is a :class:`~kivy.properties.ListProperty` and
  41     defaults to [].
  42     '''
  43 
  44     def __init__(self, **kwargs):
  45         if 'data' not in kwargs:
  46             raise Exception('list adapter: input must include data argument')
  47         if type(kwargs['data']) not in (tuple, list):
  48             raise Exception('list adapter: data must be a tuple or list')
  49         super(SimpleListAdapter, self).__init__(**kwargs)
  50 
  51     def get_count(self):
  52         return len(self.data)
  53 
  54     def get_data_item(self, index):
  55         if index < 0 or index >= len(self.data):
  56             return None
  57         return self.data[index]
  58 
  59     # Returns a view instance for an item.
  60     def get_view(self, index):
  61         item = self.get_data_item(index)
  62 
  63         if item is None:
  64             return None
  65 
  66         item_args = self.args_converter(index, item)
  67 
  68         if self.cls:
  69             instance = self.cls(**item_args)
  70             return instance
  71         else:
  72             return Builder.template(self.template, **item_args)
  73
  ```
  --- END FILES ---
  
  Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.
  
  Here is an example:
  
  ```diff
  diff --git a/examples/server_async.py b/examples/server_async.py
  --- a/examples/server_async.py
  +++ b/examples/server_async.py
  @@ -313,4 +313,4 @@
   
   
   if __name__ == "__main__":
  -    asyncio.run(run_async_server("."), debug=True)
  +    asyncio.run(run_async_server(), debug=True)
  diff --git a/examples/server_sync.py b/examples/server_sync.py
  --- a/examples/server_sync.py
  +++ b/examples/server_sync.py
  @@ -313,5 +313,5 @@
   
   
   if __name__ == "__main__":
  -    server = run_sync_server(".")
  +    server = run_sync_server()
       server.shutdown()
  
  ```
  
golden_diff: diff --git a/kivy/adapters/simplelistadapter.py b/kivy/adapters/simplelistadapter.py
  --- a/kivy/adapters/simplelistadapter.py
  +++ b/kivy/adapters/simplelistadapter.py
  @@ -44,7 +44,8 @@
       def __init__(self, **kwargs):
           if 'data' not in kwargs:
               raise Exception('list adapter: input must include data argument')
  -        if type(kwargs['data']) not in (tuple, list):
  +        if not isinstance(kwargs['data'], list) and \
  +                not isinstance(kwargs['data'], tuple):
               raise Exception('list adapter: data must be a tuple or list')
           super(SimpleListAdapter, self).__init__(**kwargs)
  
verification_info: {"golden_diff": "diff --git a/kivy/adapters/simplelistadapter.py b/kivy/adapters/simplelistadapter.py\n--- a/kivy/adapters/simplelistadapter.py\n+++ b/kivy/adapters/simplelistadapter.py\n@@ -44,7 +44,8 @@\n     def __init__(self, **kwargs):\n         if 'data' not in kwargs:\n             raise Exception('list adapter: input must include data argument')\n-        if type(kwargs['data']) not in (tuple, list):\n+        if not isinstance(kwargs['data'], list) and \\\n+                not isinstance(kwargs['data'], tuple):\n             raise Exception('list adapter: data must be a tuple or list')\n         super(SimpleListAdapter, self).__init__(**kwargs)\n", "issue": "simplelistadapter should accept objects inheriting from list or tuple\nI'll found it usefull if it was possible to extend the list object that I pass to the simplelistadapter, but an exception is raised.\n\nReproduce :\n\n``` python\nfrom kivy.adapters.simplelistadapter import SimpleListAdapter\nclass ExtendedList(list):\n        pass\n\nlist_adapter = SimpleListAdapter(data=ExtendedList())\n```\n\nA solution :\nIn kivy/adapters/simplelistadapter.py\n\n``` python\n 47         if type(kwargs['data']) not in (tuple, list):                           \n 48             raise Exception('list adapter: data must be a tuple or list') \n```\n\nMay be replaced by:\n\n``` python\nif not isinstance(kwargs['data'], list) and not isinstance(kwargs['data'], tuple)\n```\n\n", "before_files": [{"content": "'''\nSimpleListAdapter\n=================\n\n.. versionadded:: 1.5\n\n.. warning::\n\n    This code is still experimental, and its API is subject to change in a\n    future version.\n\nThe :class:`~kivy.adapters.simplelistadapter.SimpleListAdapter` is used for\nbasic lists. For example, it can be used for displaying a list of read-only\nstrings that do not require user interaction.\n\n'''\n\n__all__ = ('SimpleListAdapter', )\n\nfrom kivy.adapters.adapter import Adapter\nfrom kivy.properties import ListProperty\nfrom kivy.lang import Builder\n\n\nclass SimpleListAdapter(Adapter):\n    '''A :class:`~kivy.adapters.simplelistadapter.SimpleListAdapter` is an\n    adapter around a Python list.\n\n    From :class:`~kivy.adapters.adapter.Adapter`, the\n    :class:`~kivy.adapters.simplelistadapter.ListAdapter` gets cls, template,\n    and args_converter properties.\n    '''\n\n    data = ListProperty([])\n    '''The data list property contains a list of objects (which can be strings)\n    that will be used directly if no args_converter function is provided. If\n    there is an args_converter, the data objects will be passed to it for\n    instantiating the item view class instances.\n\n    :data:`data` is a :class:`~kivy.properties.ListProperty` and\n    defaults to [].\n    '''\n\n    def __init__(self, **kwargs):\n        if 'data' not in kwargs:\n            raise Exception('list adapter: input must include data argument')\n        if type(kwargs['data']) not in (tuple, list):\n            raise Exception('list adapter: data must be a tuple or list')\n        super(SimpleListAdapter, self).__init__(**kwargs)\n\n    def get_count(self):\n        return len(self.data)\n\n    def get_data_item(self, index):\n        if index < 0 or index >= len(self.data):\n            return None\n        return self.data[index]\n\n    # Returns a view instance for an item.\n    def get_view(self, index):\n        item = self.get_data_item(index)\n\n        if item is None:\n            return None\n\n        item_args = self.args_converter(index, item)\n\n        if self.cls:\n            instance = self.cls(**item_args)\n            return instance\n        else:\n            return Builder.template(self.template, **item_args)\n", "path": "kivy/adapters/simplelistadapter.py"}], "after_files": [{"content": "'''\nSimpleListAdapter\n=================\n\n.. versionadded:: 1.5\n\n.. warning::\n\n    This code is still experimental, and its API is subject to change in a\n    future version.\n\nThe :class:`~kivy.adapters.simplelistadapter.SimpleListAdapter` is used for\nbasic lists. For example, it can be used for displaying a list of read-only\nstrings that do not require user interaction.\n\n'''\n\n__all__ = ('SimpleListAdapter', )\n\nfrom kivy.adapters.adapter import Adapter\nfrom kivy.properties import ListProperty\nfrom kivy.lang import Builder\n\n\nclass SimpleListAdapter(Adapter):\n    '''A :class:`~kivy.adapters.simplelistadapter.SimpleListAdapter` is an\n    adapter around a Python list.\n\n    From :class:`~kivy.adapters.adapter.Adapter`, the\n    :class:`~kivy.adapters.simplelistadapter.ListAdapter` gets cls, template,\n    and args_converter properties.\n    '''\n\n    data = ListProperty([])\n    '''The data list property contains a list of objects (which can be strings)\n    that will be used directly if no args_converter function is provided. If\n    there is an args_converter, the data objects will be passed to it for\n    instantiating the item view class instances.\n\n    :data:`data` is a :class:`~kivy.properties.ListProperty` and\n    defaults to [].\n    '''\n\n    def __init__(self, **kwargs):\n        if 'data' not in kwargs:\n            raise Exception('list adapter: input must include data argument')\n        if not isinstance(kwargs['data'], list) and \\\n                not isinstance(kwargs['data'], tuple):\n            raise Exception('list adapter: data must be a tuple or list')\n        super(SimpleListAdapter, self).__init__(**kwargs)\n\n    def get_count(self):\n        return len(self.data)\n\n    def get_data_item(self, index):\n        if index < 0 or index >= len(self.data):\n            return None\n        return self.data[index]\n\n    # Returns a view instance for an item.\n    def get_view(self, index):\n        item = self.get_data_item(index)\n\n        if item is None:\n            return None\n\n        item_args = self.args_converter(index, item)\n\n        if self.cls:\n            instance = self.cls(**item_args)\n            return instance\n        else:\n            return Builder.template(self.template, **item_args)\n", "path": "kivy/adapters/simplelistadapter.py"}]}