Issue 13225: Failing packaging hooks should not stop operation (original) (raw)

Issue13225

Created on 2011-10-19 20:05 by eric.araujo, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (3)
msg145950 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2011-10-19 20:05
As discussed in #11637, failing hooks should not stop operation. I see different issues: a) a hook is not found b) a hook is not callable c) a hook raises an exception Current code will raise a Packaging exception for a) and b), and let the exception propagate in case of c). I have a patch that makes Packaging ignore all three kinds and issue warning or error logging messages. An option (--strict) would be needed to switch from logging messages to exceptions; I wonder if an elegant way to do that would be a custom logging handler.
msg145957 - (view) Author: Vinay Sajip (vinay.sajip) * (Python committer) Date: 2011-10-19 20:40
> An option (--strict) would be needed to switch from logging messages to > exceptions; I wonder if an elegant way to do that would be a custom logging > handler. I'm not sure a custom logging handler is the way to go. I think it would be better to log the exception condition in all cases, raising it if --strict is specified, and swallowing it otherwise. An application developer can configure loggers/handlers appropriately if they want.
msg213341 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2014-03-13 00:38
Out of date for distutils2, may be considered for metadata 2.0 hooks.
History
Date User Action Args
2022-04-11 14:57:22 admin set github: 57434
2014-03-13 00:38:30 eric.araujo set status: open -> closednosy: + ncoghlanmessages: + resolution: out of datestage: resolved
2011-10-19 20:40:16 vinay.sajip set messages: +
2011-10-19 20:05:36 eric.araujo create