[issue43756] About updating audit events when function gains new arguments

2021-04-21 Thread Steve Dower
Change by Steve Dower : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___ P

[issue43756] About updating audit events when function gains new arguments

2021-04-21 Thread Steve Dower
Steve Dower added the comment: New changeset a32f8fe7133aad4f3cf8946534e3b79a5f2659da by Saiyang Gou in branch 'master': bpo-43756: Add new audit event for new arguments added to glob.glob (GH-25239) https://github.com/python/cpython/commit/a32f8fe7133aad4f3cf8946534e3b79a5f2659da -

[issue43756] About updating audit events when function gains new arguments

2021-04-07 Thread Steve Dower
Steve Dower added the comment: To remove an event, it needs to be deprecated as any public facing feature would be deprecated. I'm not sure how we'd go about publicising it though. There's currently no way to raise a warning, so it'd just have to be very clearly advertised in documentation (

[issue43756] About updating audit events when function gains new arguments

2021-04-06 Thread Saiyang Gou
Saiyang Gou added the comment: And one more question, should we ever remove an old version of event when we add a new version of it? A function whose signature got repeatedly changed may result in several versions of audit event raised together on a single operation, which is probably not go

[issue43756] About updating audit events when function gains new arguments

2021-04-06 Thread Saiyang Gou
Change by Saiyang Gou : -- keywords: +patch pull_requests: +23977 stage: -> patch review pull_request: https://github.com/python/cpython/pull/25239 ___ Python tracker ___

[issue43756] About updating audit events when function gains new arguments

2021-04-06 Thread Steve Dower
Steve Dower added the comment: Solution 1 is definitely out, as PyArg_ParseTuple is a very valid way to implement hooks but won't handle longer tuples. For Solution 2, we already have some events that use a slash to indicate "extra" information, so depending on context I'd either do "glob.gl

[issue43756] About updating audit events when function gains new arguments

2021-04-06 Thread Saiyang Gou
New submission from Saiyang Gou : I'm not sure what to do when a function already being audited gains new arguments which are also worth auditing. For example, issue 38144 brings new `root_dir` and `dir_fd` arguments to `glob.glob`. Currently `glob.glob` is already audited, with `(pathname, r