New submission from Richard Oudkerk: With Python 2.7 on Windows the following crashes with an assertion:
>>> import os [43042 refs] >>> f = open("foobar", "wb") [43048 refs] >>> os.close(f.fileno()) [43048 refs] >>> f.close() <Failed assertion> A box pops up with Program: C:\Repos\cpython-27\PCbuild\python_d.exe File: f:\dd\vctools\crt_bld\self_x86\crt\src\close.c Line: 48 Expression: (_osfile(fh) & FOPEN) Python 3.2 and 3.3 give IOError(EBADF, ...) as expected. Compare #15261 and #15263. ---------- messages: 170188 nosy: sbt priority: normal severity: normal stage: needs patch status: open title: file,close() can fail assert on Windows in 2.7 type: crash versions: Python 2.7 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue15904> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com