[issue31442] assertion failures on Windows in Python/traceback.c in case of a bad io.open

2021-10-18 Thread Irit Katriel
Irit Katriel added the comment: Reproduced on 3.11. -- nosy: +iritkatriel versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.7 ___ Python tracker ___

[issue31442] assertion failures on Windows in Python/traceback.c in case of a bad io.open

2017-09-13 Thread Oren Milman
New submission from Oren Milman: the following code causes an assertion failure on my Windows: import io def _bad_open(*args): return 42 io.open = _bad_open 1/0 this is because _Py_DisplaySourceLine() (in Python/traceback.c) assumes that the return value of io.open() is valid. IIUC, this