[issue47158] logging.handlers.SysLogHandler doesn't get cleaned up properly on exit if it throws an exception

2022-03-31 Thread Enji Cooper
Enji Cooper added the comment: Grégory: that will fix this issue, but what I really need is some of the other changes, like moving the getaddrinfo logic into a separate route (connect). -- ___ Python tracker

[issue47158] logging.handlers.SysLogHandler doesn't get cleaned up properly on exit if it throws an exception

2022-03-31 Thread Grégory Starck
Grégory Starck added the comment: Enji : you can use this then: ``` In [6]: class Fixed(logging.handlers.SysLogHandler): ...: def __init__(self, *a, **kw): ...: self.socket = None ...: super().__init__(*a, **kw) ...: def close(self): ...: if

[issue47158] logging.handlers.SysLogHandler doesn't get cleaned up properly on exit if it throws an exception

2022-03-31 Thread Vinay Sajip
Vinay Sajip added the comment: The 3.8 branch is security-fix-only now, I'm afraid. And I'm not sure it's worth backporting this. -- versions: -Python 3.8 ___ Python tracker

[issue47158] logging.handlers.SysLogHandler doesn't get cleaned up properly on exit if it throws an exception

2022-03-30 Thread Enji Cooper
Enji Cooper added the comment: Grégory: good question. I would personally advocate for doing it out of selfish interests. I'm working with middleware based on 3.8 (moving to 3.9+ is non-trivial), and we have a common fault scenario where the system breaks if logging.handlers.SysLogHandler

[issue47158] logging.handlers.SysLogHandler doesn't get cleaned up properly on exit if it throws an exception

2022-03-30 Thread Ned Deily
Change by Ned Deily : -- nosy: +vinay.sajip ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue47158] logging.handlers.SysLogHandler doesn't get cleaned up properly on exit if it throws an exception

2022-03-30 Thread Grégory Starck
Grégory Starck added the comment: I guess it could be done relatively easily. but the question is more: should it be done ? -- ___ Python tracker ___

[issue47158] logging.handlers.SysLogHandler doesn't get cleaned up properly on exit if it throws an exception

2022-03-29 Thread Enji Cooper
Enji Cooper added the comment: Yup! Looks like it! Just needs a back port. -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue47158] logging.handlers.SysLogHandler doesn't get cleaned up properly on exit if it throws an exception

2022-03-29 Thread Grégory Starck
Grégory Starck added the comment: I think this is fixed in main, thanks to this: https://github.com/python/cpython/blob/main/Lib/logging/handlers.py#L862-L863 -- nosy: +gstarck ___ Python tracker

[issue47158] logging.handlers.SysLogHandler doesn't get cleaned up properly on exit if it throws an exception

2022-03-29 Thread Enji Cooper
New submission from Enji Cooper : Something I noticed when trying to repro another issue: % python Python 3.8.13 (default, Mar 16 2022, 17:28:59) [GCC 7.5.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import logging.handlers >>>