[issue2091] file accepts 'rU+' as a mode
Tres Seaver
report at bugs.python.org
Thu Apr 29 22:27:42 CEST 2010
Tres Seaver <tseaver at agendaless.com> added the comment:
I can confirm that:
- the patch applies cleanly to the release26-maint branch, with the
exception of the Misc/NEWS portion::
$ hg branch
release26-maint
$ ./python -E -tt Lib/test/regrtest.py test_file
test_file
1 test OK.
$ patch -p0 < /tmp/issue2091.diff
patching file Objects/fileobject.c
Hunk #1 succeeded at 209 (offset 54 lines).
Hunk #2 succeeded at 2269 (offset 194 lines).
patching file Misc/NEWS
Hunk #1 FAILED at 12.
1 out of 1 hunk FAILED -- saving rejects to file Misc/NEWS.rej
patching file Lib/test/test_file.py
Hunk #1 succeeded at 176 (offset 55 lines).
- the added test fails before rebuilding Objects/fileobject.c::
$ ./python -E -tt Lib/test/regrtest.py test_file
test_file
test test_file failed -- Traceback (most recent call last):
File "/home/tseaver/projects/hg-repo/py-2.6/Lib/test/test_file.py", line 181, in testModeStrings
f = open(TESTFN, mode)
IOError: [Errno 2] No such file or directory: '@test'
1 test failed:
test_file
- the added test passes after rebuilding Objects/fielobject.c::
$ make
gcc -pthread -c -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -IInclude -I./Include -DPy_BUILD_CORE -o Objects/fileobject.o Objects/fileobject.c
...
$ ./python -E -tt Lib/test/regrtest.py test_file
test_file
1 test OK.
----------
nosy: +tseaver
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue2091>
_______________________________________
More information about the Python-bugs-list
mailing list