Rip out all codecs that can't work in a unicode/bytes world:

base64, uu, zlib, rot_13, hex, quopri, bz2, string_escape.

However codecs.escape_encode() and codecs.escape_decode()
still exist, as they are used for pickling str8 objects
(so those two functions can go, when the str8 type is removed).
This commit is contained in:
Walter Dörwald 2007-06-12 16:40:17 +00:00
parent 6e8fcae38f
commit 42748a8d6d
11 changed files with 6 additions and 730 deletions

View file

@ -34,6 +34,7 @@ import sys
import struct
import re
import io
import codecs
__all__ = ["PickleError", "PicklingError", "UnpicklingError", "Pickler",
"Unpickler", "dump", "dumps", "load", "loads"]
@ -929,7 +930,7 @@ class Unpickler:
break
else:
raise ValueError, "insecure string pickle"
self.append(str8(rep.decode("string-escape")))
self.append(str8(codecs.escape_decode(rep)[0]))
dispatch[STRING[0]] = load_string
def load_binstring(self):