Issue437215

classification
Title: newline escaping broken on ascii pickle
Type: Severity: normal
Components: Library Versions:
Milestone:
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: bckfnn Nosy List: bckfnn, mrblah
Priority: normal Keywords: test failure causes

Created on 2001-06-28.21:39:05 by mrblah, last changed 2001-06-30.11:40:30 by bckfnn.

Messages
msg327 (view) Author: Neil Rotstan (mrblah) Date: 2001-06-28.21:39:05
It appears that newlines aren't escaped properly when 
you try to pickle a string in text mode (I actually 
had strings inside a list and was pickling the list). 
When you try to unpickle the data, it blows up.

To duplicate, try something like:

  import pickle
  s1="line1\nline2\nline3"
  s2="line4\nline5\nline6"
  l = [s1, s2]
  p = pickle.dumps(l)   # newlines won't be escaped
  l2 = pickle.loads(p)  # blows up

Pickling in binary mode seems to work fine. ie:
  ...
  p = pickle.dumps(l, 1)
  l2 = pickle.loads(p)  # works correctly

msg328 (view) Author: Finn Bock (bckfnn) Date: 2001-06-30.11:40:30
Logged In: YES 
user_id=4201

I can reproduce this in 2.0. It is fixed in 2.1a1.
History
Date User Action Args
2001-06-28 21:39:05mrblahcreate