On 4/21/06, Thomas Wouters <[EMAIL PROTECTED]> wrote:
> While merging the trunk changes into the p3yk branch, I discovered what I
> think is a bug in the stream codecs. It's easily reproduced in the trunk: in
> Lib/codecs.py, make the 'Codec' class new-style. Then, suddenly, test_codecs
> will crash with an exception like this:
[snip]
> I'm not sure whether this attribute conflict is on purpose or not, but since
> it will break in the future, I suggest it gets fixed. It *looks* like
> renaming the _MultibyteStreamWriter attribute is the easiest solution, but I
> don't know which API has precedence.

The readonly attribute "stream" of _MultibyteStreamWriter is exactly
equivalent to codecs.StreamWriter's and it can't be removed to work correctly.
I intended to override all methods of StreamWriters.  The only reason why it
inherits from codecs.StreamWriter is not to break isinstance(x, StreamWriter)
checks and nothing from StreamWriter is used at all.
I'll verify and fix it in p3yk branch soon.  Thank you for the inspection!

Hye-Shik
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to