File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2323from six .moves .configparser import RawConfigParser
2424import six .moves .cPickle as pickle
2525
26- # keep project files compatible with Python 2
27- PDFGUI_PICKLE_PROTOCOL = 2
26+ # protocol=2 keep project files compatible with Python 2
27+ # PDFGUI_PICKLE_PROTOCOL = 2
2828
2929
3030def numericStringSort (lst ):
@@ -59,7 +59,7 @@ def pickle_loads(sdata, encoding="latin1"):
5959
6060def safeCPickleDumps (obj ):
6161 """Get pickle representation of an object possibly containing NaN or Inf.
62- By default it uses PDFGUI_PICKLE_PROTOCOL , but falls back to ASCII
62+ By default it uses pickle.HIGHEST_PROTOCOL , but falls back to ASCII
6363 protocol 0 if there is SystemError frexp() exception.
6464
6565 obj -- object to be pickled
@@ -68,7 +68,7 @@ def safeCPickleDumps(obj):
6868 """
6969 ascii_protocol = 0
7070 try :
71- s = pickle .dumps (obj , PDFGUI_PICKLE_PROTOCOL )
71+ s = pickle .dumps (obj , pickle . HIGHEST_PROTOCOL )
7272 except SystemError :
7373 s = pickle .dumps (obj , ascii_protocol )
7474 return s
You can’t perform that action at this time.
0 commit comments