Web frameworks such as Django and Rails rely on monkey patching to enable support for plugins.
Are there web frameworks, using Python or Ruby, that support plugins without having to resort to monkey patching? And how would it be possible to architect the code to support plugins without monkey patching, especially if one moved to a statically typed language?