Message59460
So, here's one big patch. I have updated the behavior of close(), so that
> The profile tests often fail when io.py changes because they happen to
> depend on "golden output" which includes line numbers of code in io.py
> that happens to be traced during the test.
Yes, I knew that. But, how can I fix the test so that it passes even if
_bytesio is not available?
Oh, one more thing. In the misc fixes for io.py, I added a checkClosed
in IOBase.readline(). As a side-effect, this make __next__ raises a
ValueError, instead of StopIteration. Is that correct?
>>> f = open("load.py")
[45681 refs]
>>> next(f)
'import sys\n'
[45700 refs]
>>> f.close()
[45703 refs]
>>> next(f)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/alex/src/python.org/py3k/Lib/io.py", line 1440, in __next__
line = self.readline()
File "/home/alex/src/python.org/py3k/Lib/io.py", line 1449, in readline
raise ValueError("read from closed file")
ValueError: read from closed file
[45703 refs] |
|
| Date |
User |
Action |
Args |
| 2008-01-07 16:19:14 | alexandre.vassalotti | set | spambayes_score: 0.00321232 -> 0.00321232 recipients:
+ alexandre.vassalotti, gvanrossum, brett.cannon |
| 2008-01-07 16:19:14 | alexandre.vassalotti | set | spambayes_score: 0.00321232 -> 0.00321232 messageid: <1199722754.76.0.399229487757.issue1751@psf.upfronthosting.co.za> |
| 2008-01-07 16:19:13 | alexandre.vassalotti | link | issue1751 messages |
| 2008-01-07 16:19:13 | alexandre.vassalotti | create | |
|