[issue35743] Broken "Exception ignored in:" message on OSError's

2019-01-15 Thread STINNER Victor
STINNER Victor added the comment: > Sorry, I was confused by how Python 3 prints the traceback of ignored > exceptions, and Python 2 does not. It's not a bug but a nice feature which helps you to debug your code! -- ___ Python tracker

[issue35743] Broken "Exception ignored in:" message on OSError's

2019-01-15 Thread Ori Avtalion
Ori Avtalion added the comment: Sorry, I was confused by how Python 3 prints the traceback of ignored exceptions, and Python 2 does not. (This happens on on any exception and not just OSError) -- resolution: -> not a bug stage: -> resolved status: open -> closed __

[issue35743] Broken "Exception ignored in:" message on OSError's

2019-01-15 Thread STINNER Victor
STINNER Victor added the comment: Python works as expected, I don't understand why you opened a bug report? What looks wrong to you? Closing a closed file descriptor is your fault, not a bug in Python. Python logs an error as expected. -- nosy: +vstinner ___

[issue35743] Broken "Exception ignored in:" message on OSError's

2019-01-15 Thread Ori Avtalion
New submission from Ori Avtalion : When an OSError exception is raised in __del__, both Python 2 and 3 print the "Exception ignored" message, but Python 3 also prints a traceback. This is similar to issue 22836, with dealt with errors in __repr__ while inside __del__. Test script: import os