Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gh-100227: Lock Around Adding Global Audit Hooks #105515

Conversation

ericsnowcurrently
Copy link
Member

@ericsnowcurrently ericsnowcurrently commented Jun 8, 2023

The risk of a race with this state is relatively low, but we play it safe anyway.

@zooba
Copy link
Member

zooba commented Jun 8, 2023

I'd be just as happy with documenting that you need to self-synchronize when using this function. It should only be being called by embedders anyway.

But this change looks okay. I'm not as familiar with our usual locking pattern though, so I'm trusting you're following that.

@ericsnowcurrently
Copy link
Member Author

But this change looks okay. I'm not as familiar with our usual locking pattern though, so I'm trusting you're following that.

FWIW, we didn't have one before per-interpreter GIL. I've tried to be consistent, though, as I've been inventing the pattern. 😄

@ericsnowcurrently ericsnowcurrently removed the request for review from zooba June 8, 2023 18:32
@ericsnowcurrently ericsnowcurrently marked this pull request as ready for review June 8, 2023 18:32
@ericsnowcurrently ericsnowcurrently enabled auto-merge (squash) June 8, 2023 18:33
@ericsnowcurrently ericsnowcurrently merged commit e822a67 into python:main Jun 8, 2023
@miss-islington
Copy link
Contributor

Thanks @ericsnowcurrently for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12.
🐍🍒⛏🤖

@miss-islington
Copy link
Contributor

Sorry, @ericsnowcurrently, I could not cleanly backport this to 3.12 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker e822a676f1f3bef6c5413e9b856db481c08ac2a5 3.12

@ericsnowcurrently ericsnowcurrently deleted the audit-hooks-state-granular-lock branch June 8, 2023 18:39
@ericsnowcurrently ericsnowcurrently added needs backport to 3.12 bug and security fixes and removed needs backport to 3.12 bug and security fixes labels Jun 8, 2023
@miss-islington
Copy link
Contributor

Thanks @ericsnowcurrently for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12.
🐍🍒⛏🤖

@miss-islington
Copy link
Contributor

Sorry @ericsnowcurrently, I had trouble checking out the 3.12 backport branch.
Please retry by removing and re-adding the "needs backport to 3.12" label.
Alternatively, you can backport using cherry_picker on the command line.
cherry_picker e822a676f1f3bef6c5413e9b856db481c08ac2a5 3.12

@ericsnowcurrently ericsnowcurrently added needs backport to 3.12 bug and security fixes and removed needs backport to 3.12 bug and security fixes labels Jun 8, 2023
@miss-islington
Copy link
Contributor

Thanks @ericsnowcurrently for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12.
🐍🍒⛏🤖

@miss-islington
Copy link
Contributor

Sorry @ericsnowcurrently, I had trouble checking out the 3.12 backport branch.
Please retry by removing and re-adding the "needs backport to 3.12" label.
Alternatively, you can backport using cherry_picker on the command line.
cherry_picker e822a676f1f3bef6c5413e9b856db481c08ac2a5 3.12

@ericsnowcurrently ericsnowcurrently removed the needs backport to 3.12 bug and security fixes label Jun 8, 2023
@ericsnowcurrently ericsnowcurrently added the needs backport to 3.12 bug and security fixes label Jun 8, 2023
@miss-islington
Copy link
Contributor

Thanks @ericsnowcurrently for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12.
🐍🍒⛏🤖

@miss-islington
Copy link
Contributor

Sorry @ericsnowcurrently, I had trouble checking out the 3.12 backport branch.
Please retry by removing and re-adding the "needs backport to 3.12" label.
Alternatively, you can backport using cherry_picker on the command line.
cherry_picker e822a676f1f3bef6c5413e9b856db481c08ac2a5 3.12

ericsnowcurrently added a commit to ericsnowcurrently/cpython that referenced this pull request Jun 8, 2023
The risk of a race with this state is relatively low, but we play it safe anyway.
@bedevere-bot
Copy link

GH-105525 is a backport of this pull request to the 3.12 branch.

@bedevere-bot bedevere-bot removed the needs backport to 3.12 bug and security fixes label Jun 8, 2023
ericsnowcurrently added a commit that referenced this pull request Jun 8, 2023
…h-105525)

The risk of a race with this state is relatively low, but we play it safe anyway.
(cherry picked from commit e822a67)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants