I have a (beginner) question.
I intend to run more than one webapp (pyramid web apps) and I have a common library (let's call that base app) that may be used by both webapps and includes pyramid configuration includes etc. These webapps will eventually be separate wsgi scripts (probably) ending up sitting in the same virtualenv.
My question is: What is the isolation level in python if I monkey patch classes in this library (I am currently dynamically changing bases for some of the classes in that library that may be referenced from both webapps).
for example:
in base app:
class_from_baseapp(grandparent):
pass
in derived app 2:
from baseapp import class_from_baseapp
#do some stuff with this class
#and have another bunch of child classes too!
class_from_childapp2(class_from_baseapp):
pass
in derived app 1:
from baseapp import class_from_baseapp
# then what I do is I change this dynamically to
# class_from_baseapp(grandparent, mixin_class):
# by altering the class' __bases__
class_from_childapp1(class_from_baseapp):
pass
So again, my question is: Will this monkey patching leak to the other web app (web app 1), if it imports/uses the same class as above? I don't know how process and thread isolation in python interpreters work.