Sometimes magic is necessary but these slides right here contain some serious voodoo.
That said I've used monkey patching before which can be quite useful when you don't want to change the underlying library too much but don't want to make a complete fork. Specifically I've monkey patched methods onto the User model in Django.