This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author gregory.p.smith
Recipients Mark.Shannon, barry, brandtbucher, carljm, dino.viehland, gregory.p.smith, itamaro
Date 2022-03-03.20:44:21
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1646340261.97.0.668581079838.issue46896@roundup.psfhosted.org>
In-reply-to
Content
Per interpreter seems best.

If someone using this feature writes a buggy implementation of a callback that doesn't chain reliably, that is a bug in their code and all of the fallout from that is "just" a bug to be fixed in said code.

Think of it like a C signal handler, the OS doesn't chain for you - it is the signal handler installer's responsibility to chain to the previous one.  Not an unusual pattern for callback hooks in C.

We already have such global C callback hooks in SetProfile and SetTrace. https://docs.python.org/3/c-api/init.html#profiling-and-tracing

Those don't even provide for chaining.  We could do the same here and not let a hook be set more than once instead of providing a Get API to allow for manual chaining.  That seems less useful.
History
Date User Action Args
2022-03-03 20:44:21gregory.p.smithsetrecipients: + gregory.p.smith, barry, carljm, dino.viehland, Mark.Shannon, brandtbucher, itamaro
2022-03-03 20:44:21gregory.p.smithsetmessageid: <1646340261.97.0.668581079838.issue46896@roundup.psfhosted.org>
2022-03-03 20:44:21gregory.p.smithlinkissue46896 messages
2022-03-03 20:44:21gregory.p.smithcreate