Patch #462635 by Andrew Kuchling correcting bugs in the new
codecs -- the self argument does matter for Python functions (it
does not for C functions which most other codecs use).
diff --git a/Lib/encodings/zlib_codec.py b/Lib/encodings/zlib_codec.py
index 035bb04..d9f7d04 100644
--- a/Lib/encodings/zlib_codec.py
+++ b/Lib/encodings/zlib_codec.py
@@ -45,8 +45,10 @@
 
 class Codec(codecs.Codec):
 
-    encode = zlib_encode
-    decode = zlib_decode
+    def encode(self, input, errors='strict'):
+        return zlib_encode(input, errors)
+    def decode(self, input, errors='strict'):
+        return zlib_decode(input, errors)
 
 class StreamWriter(Codec,codecs.StreamWriter):
     pass