[IPython-dev] drop-in replacement for multiprocessing

MinRK benjaminrk at gmail.com
Mon Jun 22 17:48:49 EDT 2015


On Mon, Jun 22, 2015 at 2:23 PM, Michael McKerns <mmckerns at caltech.edu>
wrote:

> >
> > 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.


Not in any of my envs (conda, virtualenv, Python 2.7/3.4, pip 7), it
doesn't. It installs just fine, but is never imported because site-packages
is lower priority than stdlib.

-MinRK


>   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
>
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20150622/f1cc96f7/attachment.html>


More information about the IPython-dev mailing list