We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Serializable mixin should be removed
The class is not used by any current code, appears to be broken, and the problem it was meant to solve (selection of which traits to pickle) is better solved via the use of `transient` traits metadata.

Technically this is a backwards-incompatible change, however.


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `chaco/serializable.py`
Content:
```
1 """ Defines the Serializable mix-in class.
2 """
3 
4 
5 class Serializable(object):
6     """
7     Mix-in class to help serialization.  Serializes just the attributes in
8     **_pickles**.
9 
10     This mix-in works best when all the classes in a hierarchy subclass
11     from it.  It solves the problem of allowing each class to specify
12     its own set of attributes to pickle and attributes to ignore, without
13     having to also implement __getstate__ and __setstate__.
14     """
15 
16     # The basic list of attributes to save.  These get set without firing
17     # any trait events.
18     _pickles = None
19 
20     # A list of the parents of this class that will be searched for their
21     # list of _pickles.  Only the parents in this list that inherit from
22     # Serialized will be pickled.  The process stops at the first item in
23     # __pickle_parents that is not a subclass of Serialized.
24     #
25     # This is a double-underscore variable so that Python's attribute name
26     # will shield base class
27     #    __pickle_parents = None
28 
29     def _get_pickle_parents(self):
30         """
31         Subclasses can override this method to return the list of base
32         classes they want to have the serializer look at.
33         """
34         bases = []
35         for cls in self.__class__.__mro__:
36             if cls is Serializable:
37                 # don't add Serializable to the list of parents
38                 continue
39             elif issubclass(cls, Serializable):
40                 bases.append(cls)
41             else:
42                 break
43         return bases
44 
45     def _pre_save(self):
46         """
47         Called before __getstate__ to give the object a chance to tidy up
48         and get ready to be saved.  This usually also calls the superclass.
49         """
50 
51     def _post_load(self):
52         """
53         Called after __setstate__ finishes restoring the state on the object.
54         This method usually needs to include a call to super(cls, self)._post_load().
55         Avoid explicitly calling a parent class by name, because in general
56         you want post_load() to happen in the same order as MRO, which super()
57         does automatically.
58         """
59         print("Serializable._post_load")
60         pass
61 
62     def _do_setstate(self, state):
63         """
64         Called by __setstate__ to allow the subclass to set its state in a
65         special way.
66 
67         Subclasses should override this instead of Serializable.__setstate__
68         because we need Serializable's implementation to call _post_load() after
69         all the _do_setstate() have returned.)
70         """
71         # Quietly set all the attributes
72         self.trait_setq(**state)
73 
74     # ------------------------------------------------------------------------
75     # Private methods
76     # ------------------------------------------------------------------------
77 
78 
79 #    def __getstate__(self):
80 #        #idstring = self.__class__.__name__ + " id=" + str(id(self))
81 #        # Give the object a chance to tidy up before saving
82 #        self._pre_save()
83 #
84 #        # Get the attributes that this class needs to serialize.  We do this by
85 #        # marching up the list of parent classes in _pickle_parents and getting
86 #        # their lists of _pickles.
87 #        all_pickles = Set()
88 #        pickle_parents = self._get_pickle_parents()
89 #        for parent_class in pickle_parents:
90 #            all_pickles.update(parent_class._pickles)
91 #
92 #        if self._pickles is not None:
93 #            all_pickles.update(self._pickles)
94 #
95 #        state = {}
96 #        for attrib in all_pickles:
97 #            state[attrib] = getattr(self, attrib)
98 #
99 #        print('<<<<<<<<<<<<<', self)
100 #        for key,value in state.items():
101 #            print(key, type(value))
102 #        print '>>>>>>>>>>>>>'
103 #
104 #        return state
105 
106 # ~ def __setstate__(self, state):
107 # ~ idstring = self.__class__.__name__ + " id=" + str(id(self))
108 # ~ self._do_setstate(state)
109 # ~ self._post_load()
110 # ~ return
111
```
--- 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()

```

diff --git a/chaco/serializable.py b/chaco/serializable.py
deleted file mode 100644
--- a/chaco/serializable.py
+++ /dev/null
@@ -1,110 +0,0 @@
-""" Defines the Serializable mix-in class.
-"""
-
-
-class Serializable(object):
-    """
-    Mix-in class to help serialization.  Serializes just the attributes in
-    **_pickles**.
-
-    This mix-in works best when all the classes in a hierarchy subclass
-    from it.  It solves the problem of allowing each class to specify
-    its own set of attributes to pickle and attributes to ignore, without
-    having to also implement __getstate__ and __setstate__.
-    """
-
-    # The basic list of attributes to save.  These get set without firing
-    # any trait events.
-    _pickles = None
-
-    # A list of the parents of this class that will be searched for their
-    # list of _pickles.  Only the parents in this list that inherit from
-    # Serialized will be pickled.  The process stops at the first item in
-    # __pickle_parents that is not a subclass of Serialized.
-    #
-    # This is a double-underscore variable so that Python's attribute name
-    # will shield base class
-    #    __pickle_parents = None
-
-    def _get_pickle_parents(self):
-        """
-        Subclasses can override this method to return the list of base
-        classes they want to have the serializer look at.
-        """
-        bases = []
-        for cls in self.__class__.__mro__:
-            if cls is Serializable:
-                # don't add Serializable to the list of parents
-                continue
-            elif issubclass(cls, Serializable):
-                bases.append(cls)
-            else:
-                break
-        return bases
-
-    def _pre_save(self):
-        """
-        Called before __getstate__ to give the object a chance to tidy up
-        and get ready to be saved.  This usually also calls the superclass.
-        """
-
-    def _post_load(self):
-        """
-        Called after __setstate__ finishes restoring the state on the object.
-        This method usually needs to include a call to super(cls, self)._post_load().
-        Avoid explicitly calling a parent class by name, because in general
-        you want post_load() to happen in the same order as MRO, which super()
-        does automatically.
-        """
-        print("Serializable._post_load")
-        pass
-
-    def _do_setstate(self, state):
-        """
-        Called by __setstate__ to allow the subclass to set its state in a
-        special way.
-
-        Subclasses should override this instead of Serializable.__setstate__
-        because we need Serializable's implementation to call _post_load() after
-        all the _do_setstate() have returned.)
-        """
-        # Quietly set all the attributes
-        self.trait_setq(**state)
-
-    # ------------------------------------------------------------------------
-    # Private methods
-    # ------------------------------------------------------------------------
-
-
-#    def __getstate__(self):
-#        #idstring = self.__class__.__name__ + " id=" + str(id(self))
-#        # Give the object a chance to tidy up before saving
-#        self._pre_save()
-#
-#        # Get the attributes that this class needs to serialize.  We do this by
-#        # marching up the list of parent classes in _pickle_parents and getting
-#        # their lists of _pickles.
-#        all_pickles = Set()
-#        pickle_parents = self._get_pickle_parents()
-#        for parent_class in pickle_parents:
-#            all_pickles.update(parent_class._pickles)
-#
-#        if self._pickles is not None:
-#            all_pickles.update(self._pickles)
-#
-#        state = {}
-#        for attrib in all_pickles:
-#            state[attrib] = getattr(self, attrib)
-#
-#        print('<<<<<<<<<<<<<', self)
-#        for key,value in state.items():
-#            print(key, type(value))
-#        print '>>>>>>>>>>>>>'
-#
-#        return state
-
-# ~ def __setstate__(self, state):
-# ~ idstring = self.__class__.__name__ + " id=" + str(id(self))
-# ~ self._do_setstate(state)
-# ~ self._post_load()
-# ~ return

{"golden_diff": "diff --git a/chaco/serializable.py b/chaco/serializable.py\ndeleted file mode 100644\n--- a/chaco/serializable.py\n+++ /dev/null\n@@ -1,110 +0,0 @@\n-\"\"\" Defines the Serializable mix-in class.\n-\"\"\"\n-\n-\n-class Serializable(object):\n-    \"\"\"\n-    Mix-in class to help serialization.  Serializes just the attributes in\n-    **_pickles**.\n-\n-    This mix-in works best when all the classes in a hierarchy subclass\n-    from it.  It solves the problem of allowing each class to specify\n-    its own set of attributes to pickle and attributes to ignore, without\n-    having to also implement __getstate__ and __setstate__.\n-    \"\"\"\n-\n-    # The basic list of attributes to save.  These get set without firing\n-    # any trait events.\n-    _pickles = None\n-\n-    # A list of the parents of this class that will be searched for their\n-    # list of _pickles.  Only the parents in this list that inherit from\n-    # Serialized will be pickled.  The process stops at the first item in\n-    # __pickle_parents that is not a subclass of Serialized.\n-    #\n-    # This is a double-underscore variable so that Python's attribute name\n-    # will shield base class\n-    #    __pickle_parents = None\n-\n-    def _get_pickle_parents(self):\n-        \"\"\"\n-        Subclasses can override this method to return the list of base\n-        classes they want to have the serializer look at.\n-        \"\"\"\n-        bases = []\n-        for cls in self.__class__.__mro__:\n-            if cls is Serializable:\n-                # don't add Serializable to the list of parents\n-                continue\n-            elif issubclass(cls, Serializable):\n-                bases.append(cls)\n-            else:\n-                break\n-        return bases\n-\n-    def _pre_save(self):\n-        \"\"\"\n-        Called before __getstate__ to give the object a chance to tidy up\n-        and get ready to be saved.  This usually also calls the superclass.\n-        \"\"\"\n-\n-    def _post_load(self):\n-        \"\"\"\n-        Called after __setstate__ finishes restoring the state on the object.\n-        This method usually needs to include a call to super(cls, self)._post_load().\n-        Avoid explicitly calling a parent class by name, because in general\n-        you want post_load() to happen in the same order as MRO, which super()\n-        does automatically.\n-        \"\"\"\n-        print(\"Serializable._post_load\")\n-        pass\n-\n-    def _do_setstate(self, state):\n-        \"\"\"\n-        Called by __setstate__ to allow the subclass to set its state in a\n-        special way.\n-\n-        Subclasses should override this instead of Serializable.__setstate__\n-        because we need Serializable's implementation to call _post_load() after\n-        all the _do_setstate() have returned.)\n-        \"\"\"\n-        # Quietly set all the attributes\n-        self.trait_setq(**state)\n-\n-    # ------------------------------------------------------------------------\n-    # Private methods\n-    # ------------------------------------------------------------------------\n-\n-\n-#    def __getstate__(self):\n-#        #idstring = self.__class__.__name__ + \" id=\" + str(id(self))\n-#        # Give the object a chance to tidy up before saving\n-#        self._pre_save()\n-#\n-#        # Get the attributes that this class needs to serialize.  We do this by\n-#        # marching up the list of parent classes in _pickle_parents and getting\n-#        # their lists of _pickles.\n-#        all_pickles = Set()\n-#        pickle_parents = self._get_pickle_parents()\n-#        for parent_class in pickle_parents:\n-#            all_pickles.update(parent_class._pickles)\n-#\n-#        if self._pickles is not None:\n-#            all_pickles.update(self._pickles)\n-#\n-#        state = {}\n-#        for attrib in all_pickles:\n-#            state[attrib] = getattr(self, attrib)\n-#\n-#        print('<<<<<<<<<<<<<', self)\n-#        for key,value in state.items():\n-#            print(key, type(value))\n-#        print '>>>>>>>>>>>>>'\n-#\n-#        return state\n-\n-# ~ def __setstate__(self, state):\n-# ~ idstring = self.__class__.__name__ + \" id=\" + str(id(self))\n-# ~ self._do_setstate(state)\n-# ~ self._post_load()\n-# ~ return\n", "issue": "Serializable mixin should be removed\nThe class is not used by any current code, appears to be broken, and the problem it was meant to solve (selection of which traits to pickle) is better solved via the use of `transient` traits metadata.\n\nTechnically this is a backwards-incompatible change, however.\n\n", "before_files": [{"content": "\"\"\" Defines the Serializable mix-in class.\n\"\"\"\n\n\nclass Serializable(object):\n    \"\"\"\n    Mix-in class to help serialization.  Serializes just the attributes in\n    **_pickles**.\n\n    This mix-in works best when all the classes in a hierarchy subclass\n    from it.  It solves the problem of allowing each class to specify\n    its own set of attributes to pickle and attributes to ignore, without\n    having to also implement __getstate__ and __setstate__.\n    \"\"\"\n\n    # The basic list of attributes to save.  These get set without firing\n    # any trait events.\n    _pickles = None\n\n    # A list of the parents of this class that will be searched for their\n    # list of _pickles.  Only the parents in this list that inherit from\n    # Serialized will be pickled.  The process stops at the first item in\n    # __pickle_parents that is not a subclass of Serialized.\n    #\n    # This is a double-underscore variable so that Python's attribute name\n    # will shield base class\n    #    __pickle_parents = None\n\n    def _get_pickle_parents(self):\n        \"\"\"\n        Subclasses can override this method to return the list of base\n        classes they want to have the serializer look at.\n        \"\"\"\n        bases = []\n        for cls in self.__class__.__mro__:\n            if cls is Serializable:\n                # don't add Serializable to the list of parents\n                continue\n            elif issubclass(cls, Serializable):\n                bases.append(cls)\n            else:\n                break\n        return bases\n\n    def _pre_save(self):\n        \"\"\"\n        Called before __getstate__ to give the object a chance to tidy up\n        and get ready to be saved.  This usually also calls the superclass.\n        \"\"\"\n\n    def _post_load(self):\n        \"\"\"\n        Called after __setstate__ finishes restoring the state on the object.\n        This method usually needs to include a call to super(cls, self)._post_load().\n        Avoid explicitly calling a parent class by name, because in general\n        you want post_load() to happen in the same order as MRO, which super()\n        does automatically.\n        \"\"\"\n        print(\"Serializable._post_load\")\n        pass\n\n    def _do_setstate(self, state):\n        \"\"\"\n        Called by __setstate__ to allow the subclass to set its state in a\n        special way.\n\n        Subclasses should override this instead of Serializable.__setstate__\n        because we need Serializable's implementation to call _post_load() after\n        all the _do_setstate() have returned.)\n        \"\"\"\n        # Quietly set all the attributes\n        self.trait_setq(**state)\n\n    # ------------------------------------------------------------------------\n    # Private methods\n    # ------------------------------------------------------------------------\n\n\n#    def __getstate__(self):\n#        #idstring = self.__class__.__name__ + \" id=\" + str(id(self))\n#        # Give the object a chance to tidy up before saving\n#        self._pre_save()\n#\n#        # Get the attributes that this class needs to serialize.  We do this by\n#        # marching up the list of parent classes in _pickle_parents and getting\n#        # their lists of _pickles.\n#        all_pickles = Set()\n#        pickle_parents = self._get_pickle_parents()\n#        for parent_class in pickle_parents:\n#            all_pickles.update(parent_class._pickles)\n#\n#        if self._pickles is not None:\n#            all_pickles.update(self._pickles)\n#\n#        state = {}\n#        for attrib in all_pickles:\n#            state[attrib] = getattr(self, attrib)\n#\n#        print('<<<<<<<<<<<<<', self)\n#        for key,value in state.items():\n#            print(key, type(value))\n#        print '>>>>>>>>>>>>>'\n#\n#        return state\n\n# ~ def __setstate__(self, state):\n# ~ idstring = self.__class__.__name__ + \" id=\" + str(id(self))\n# ~ self._do_setstate(state)\n# ~ self._post_load()\n# ~ return\n", "path": "chaco/serializable.py"}], "after_files": [{"content": null, "path": "chaco/serializable.py"}]}