[issue9858] Python and C implementations of io are out of sync

Daniel Stutzbach report at bugs.python.org
Wed Sep 15 15:36:55 CEST 2010


Daniel Stutzbach <daniel at stutzbachenterprises.com> added the comment:

Attached is a script to find all of the mismatches between the C and Python implementations.  There are several.  Below is the output:

RawIOBase C is missing: ['readinto', 'write']
StringIO C is missing: ['name']
StringIO python is missing: ['__getstate__', '__setstate__']
BufferedRandom python is missing: ['raw']
BlockingIOError python is missing: ['characters_written']
TextIOWrapper python is missing: ['buffer']
BufferedReader python is missing: ['raw']
BufferedWriter python is missing: ['raw']
BytesIO python is missing: ['__setstate__']

Since the Python version was the original reference implementation, adding the attributes missing from the C side seems to be a straightforward decision (and it should simply match whatever the Python version does).  It looks like a number of new attributes have creeped into the C side, which will require more thoughtful decision making.

We should probably double-check that each of these is documented, while we're at it.

----------
priority: low -> normal
resolution:  -> accepted
title: RawIOBase doesn't define readinto -> Python and C implementations of io are out of sync
Added file: http://bugs.python.org/file18889/missing_methods.py

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue9858>
_______________________________________


More information about the Python-bugs-list mailing list