[issue26789] Please do not log during shutdown

2020-01-31 Thread Sandeep
Sandeep added the comment: I did import aiohttp and called function sys.is_finalizing() just before logging.basicConfig but still the same error. Has logging.basicConfig worked in past ? If yes what additional package I need to add Thanks -- nosy: +Sandeep

[issue26789] Please do not log during shutdown

2019-03-18 Thread Peer Sommerlund
Change by Peer Sommerlund : -- nosy: +Peer Sommerlund ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue26789] Please do not log during shutdown

2017-04-06 Thread Vinay Sajip
Vinay Sajip added the comment: In the OP, the error is caused by `open` being unavailable, which is a builtin. According to what Serhiy says, this error would be after step 6 in his list, so `sys` wouldn't be available either, and nor perhaps would any other builtins. As some termination

[issue26789] Please do not log during shutdown

2017-04-05 Thread Charles Bouchard-Légaré
Changes by Charles Bouchard-Légaré : -- nosy: +Charles Bouchard-Légaré ___ Python tracker ___

[issue26789] Please do not log during shutdown

2017-02-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There are no guaranties. But in recent Python versions the order of finalising is more predicable. It is hard to reproduce a case when some builtins or sys member is not available (with some exceptions). The order of clearing (see PyImport_Cleanup() in

[issue26789] Please do not log during shutdown

2017-02-21 Thread Vinay Sajip
Vinay Sajip added the comment: > sys.is_finalizing() Good to know. Is the "sys" binding guaranteed to be around even when other builtins like "open" aren't available? In order to handle things "nicely" during shutdown, what guarantees can logging code rely on in terms of what's available?

[issue26789] Please do not log during shutdown

2017-02-21 Thread INADA Naoki
INADA Naoki added the comment: I'm -1 on suppress log silently. While error message is bit surprising, Traceback (most recent call last): File "/usr/lib/python3.5/asyncio/tasks.py", line 93, in __del__ File "/usr/lib/python3.5/asyncio/base_events.py", line 1160, in call_exception_handler

[issue26789] Please do not log during shutdown

2017-02-21 Thread Guido van Rossum
Changes by Guido van Rossum : -- nosy: -gvanrossum ___ Python tracker ___ ___

[issue26789] Please do not log during shutdown

2017-02-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > How does a particular piece of logging package code know it's being called > during Python finalization? sys.is_finalizing() -- nosy: +serhiy.storchaka ___ Python tracker

[issue26789] Please do not log during shutdown

2017-02-21 Thread R. David Murray
R. David Murray added the comment: If I understand correctly, the logging during shutdown coming out of asyncio helps debug errors in asyncio programs, and this logging can't happen before shutdown starts (so the application calling logging.shutdown would just hide the errors, I think). Yes,

[issue26789] Please do not log during shutdown

2017-02-21 Thread Vinay Sajip
Vinay Sajip added the comment: Calling logging.shutdown() when you know you're about to exit should eliminate some of the issues. -- ___ Python tracker

[issue26789] Please do not log during shutdown

2017-02-21 Thread Vinay Sajip
Vinay Sajip added the comment: > The logging module should be be enhanced to handle more nicely such error > during Python finalization. How does a particular piece of logging package code know it's being called during Python finalization? This sort of problem (exceptions caused by

[issue26789] Please do not log during shutdown

2017-02-21 Thread STINNER Victor
STINNER Victor added the comment: > Please do not log during shutdown These logs are supposed to help you to find bugs in your application. Sadly, it's hard to log errors during Python shutdown because Pyhon is destroying its world: many basic functions are broken during shutdown. We already

[issue26789] Please do not log during shutdown

2017-02-21 Thread Jan Vorwerk
Jan Vorwerk added the comment: Indeed, the error message is quite... surprising and misleading. To reproduce, please run the attached (admittedly wrong) program that I could simplify a lot. It seems to occur when a exception is raised at the wrong time... I hope this helps nail down (at least)

[issue26789] Please do not log during shutdown

2016-04-17 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +vinay.sajip ___ Python tracker ___ ___

[issue26789] Please do not log during shutdown

2016-04-17 Thread Matthias Urlichs
New submission from Matthias Urlichs: … or, if you do, ignore errors. This is during program shutdown. Unfortunately, I am unable to create a trivial example which exhibits the order of destruction necessary to trigger this problem. Traceback (most recent call last): File