[IPython-dev] drop-in replacement for multiprocessing

Michael McKerns mmckerns at caltech.edu
Mon Jun 22 17:23:40 EDT 2015


>
> Yeah… a monkeypach is probably the right way to go...
>

I remember now why I didn't monkeypatch.

A basic monkeypatch will replace the module in
sys.modules after calling "mymodule.patch()"…
but that only works for the python instance in
the master… not on the workers.  The workers
would not have the patch applied unless you
do some magic to bootstrap a "patch" call on
any new process instantiation.  So it suddenly
becomes much harder to do the right thing.

So maybe really the easier approach is submit
a patch, as Thomas suggested.

Oh, and, "pip install multiprocess" does work as
of right now.  I agree that it probably shouldn't,
but it does.  Min, I guess your patch to block that
should be motivation enough for me to submit a
patch to CPython to allow overriding the serializer
in multiprocessing.

---

Mike McKerns
http://www.its.caltech.edu/~mmckerns




More information about the IPython-dev mailing list