mirror of https://github.com/kivy/kivy.git
Use pickle protocol 0 and use lambda for sorted key to avoid unicode problem for str.lower
This commit is contained in:
parent
30617fda05
commit
9b3f2bbe80
|
@ -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)
|
||||
|
|
|
@ -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}
|
||||
|
|
Loading…
Reference in New Issue