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

Override Modules' tp_setattro #73

Open
insertinterestingnamehere opened this issue May 11, 2021 · 0 comments
Open

Override Modules' tp_setattro #73

insertinterestingnamehere opened this issue May 11, 2021 · 0 comments
Labels
enhancement New feature or request VECs Related to Virtual Execution Contexts

Comments

@insertinterestingnamehere
Copy link
Member

Currently we only override the default module tp_getattro. We should do the same thing for tp_setattro to enable monkey patching modules inside VECs. As weird as this sounds, it's actually super easy to do since we already have the idiom sorted out for tp_getattro. If the aim is compatibility we may as well support this too since monkey-patching can be used as a last-ditch effort to get an old third-party module to behave. While I'm not aware of any modules that patch in attributes across root module boundaries during setup it's technically not disallowed normally and this would fix that as well.

@insertinterestingnamehere insertinterestingnamehere added enhancement New feature or request VECs Related to Virtual Execution Contexts labels May 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request VECs Related to Virtual Execution Contexts
Projects
None yet
Development

No branches or pull requests

1 participant