diff --git a/examples/demo/multistroke/gesturedatabase.py b/examples/demo/multistroke/gesturedatabase.py index 15e57ac9a..9b4d97cd1 100644 --- a/examples/demo/multistroke/gesturedatabase.py +++ b/examples/demo/multistroke/gesturedatabase.py @@ -100,7 +100,7 @@ class GestureDatabase(GridLayout): self.selected_count = 0 self.ids.gesture_list.clear_widgets() - for k in sorted(self.gdict, key=str.lower): + for k in sorted(self.gdict, key=lambda n: n.lower()): gitem = GestureDatabaseItem(name=k, gesture_list=self.gdict[k]) gitem.bind(on_select=self.select_item) gitem.bind(on_deselect=self.deselect_item) diff --git a/kivy/multistroke.py b/kivy/multistroke.py index e66a3e327..fdbe86245 100644 --- a/kivy/multistroke.py +++ b/kivy/multistroke.py @@ -390,7 +390,7 @@ class Recognizer(EventDispatcher): This method accepts optional :meth:`Recognizer.filter` arguments. ''' io = BytesIO() - p = pickle.Pickler(io) + p = pickle.Pickler(io, protocol=0) multistrokes = [] defaults = {'priority': 100, 'numpoints': 16, 'stroke_sens': True, 'orientation_sens': False, 'angle_similarity': 30.0}