Steve Dower <steve.do...@python.org> added the comment:

I like using the existing event for unmarshalling code objects, assuming we 
have all the arguments available.

I'm not sure whether it's worth auditing all marshal.load() calls (just as we 
don't audit all pickle.load() calls). But depending on the code paths we may 
not have a choice.

Auditing the .pyc import twice (or more) is basically unavoidable, but it's not 
terrible anyway. When no hooks are set, it's negligible impact, and when 
someone adds a hook they are in control of how much work it does. Providing 
both events means they can choose to only handle one and still get the coverage.

Marking this as easy (C), since the hardest part is just going to be finding 
the right place to add the PySys_Audit call.

----------
keywords: +easy (C)

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue41180>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to