[Python-checkins] CVS: python/dist/src/Lib pickle.py,1.39,1.39.2.1

Moshe Zadka moshez@users.sourceforge.net
Fri, 30 Mar 2001 09:21:00 -0800


Update of /cvsroot/python/python/dist/src/Lib
In directory usw-pr-cvs1:/tmp/cvs-serv30389/Lib

Modified Files:
      Tag: release20-maint
	pickle.py 
Log Message:
#126161 and 123634 -- Unicode strings could not be pickled correctly.
This is *backwards incompatible* with the previous pickling scheme,
which wasnot reversible


Index: pickle.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/pickle.py,v
retrieving revision 1.39
retrieving revision 1.39.2.1
diff -C2 -r1.39 -r1.39.2.1
*** pickle.py	2000/09/15 15:14:51	1.39
--- pickle.py	2001/03/30 17:20:58	1.39.2.1
***************
*** 289,292 ****
--- 289,294 ----
              self.write(BINUNICODE + s + encoding)
          else:
+             object = object.replace(u"\\", u"\\u005c")
+             object = object.replace(u"\n", u"\\u000a")
              self.write(UNICODE + object.encode('raw-unicode-escape') + '\n')