ut-parla/Parla.py

Override Modules' `tp_setattro`

insertinterestingnamehere opened this issue · 0 comments

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.