[issue7720] Errors in tests and C implementation of raw FileIO

2013-03-17 Thread R. David Murray

R. David Murray added the comment:

Looks to me like this issue is out of date.

--
nosy: +r.david.murray
resolution:  -> out of date
stage: test needed -> committed/rejected
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7720] Errors in tests and C implementation of raw FileIO

2010-01-20 Thread STINNER Victor

STINNER Victor  added the comment:

IOTest.test_destructor() is already fixed in Python trunk (future 2.7) by 
r73394 (Issue #6215: backport the 3.1 io lib).

I don't think that it would be possible to backport the 3.1 io lib in Python 
2.6. Would it possible to backport only the io tests?

--
nosy: +haypo

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7720] Errors in tests and C implementation of raw FileIO

2010-01-17 Thread Ezio Melotti

Changes by Ezio Melotti :


--
nosy: +benjamin.peterson, pitrou

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7720] Errors in tests and C implementation of raw FileIO

2010-01-17 Thread Brian Curtin

Changes by Brian Curtin :


--
components: +Tests
priority:  -> normal
stage:  -> test needed
type:  -> behavior

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7720] Errors in tests and C implementation of raw FileIO

2010-01-17 Thread Pascal Chambon

Pascal Chambon  added the comment:

Hum, it seems that in python2.6, the C API for PyArg_ParseTuple isn't yet ready 
for bytes and bytearrays, is it ? "y"-like argument parsers don't exist, so I 
guess we can't easily patch the C api on this, only tests (replacing "xxx" by 
b"xxx")...

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7720] Errors in tests and C implementation of raw FileIO

2010-01-16 Thread Pascal Chambon

New submission from Pascal Chambon :

My own fileio implementation fails against the latests versions of the io test 
suite, under python2.6, because these now require FileIO objects to accept 
unicode strings in their write methods, whereas the doc mentions raw streams 
only deal with bytes/bytearrays.

Below is the faulty test (unicode literals or ON). The unicode "xxx" is written 
to the io.FileIO instance, and the stdlib implementation indeed accepts unicode 
args (in _fileio.c : "if (!PyArg_ParseTuple(args, "s*", &pbuf)...").

In test_io.py :

   def test_destructor(self):
record = []
class MyFileIO(io.FileIO):
def __del__(self):
record.append(1)
io.FileIO.__del__(self)
def close(self):
record.append(2)
io.FileIO.close(self)
def flush(self):
record.append(3)
io.FileIO.flush(self)
f = MyFileIO(test_support.TESTFN, "w")
f.write("xxx")
del f
self.assertEqual(record, [1, 2, 3])

--
components: IO
messages: 97910
nosy: pakal
severity: normal
status: open
title: Errors in tests and C implementation of raw FileIO
versions: Python 2.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com