New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
disable patcher.monkey_patch #209
Comments
There is no reliable way to do "not be applied for other parts of my program". It's very rare that you control all points in code and their order of execution when something may import something else. And once things are imported, they tend to stay in If you really want to shoot in your foot, here's how to disable monkey_patch function:
Though most likely, you need |
well, I am definitely do not want to shoot in my foot ))) I am using code from following answer: On Thu, Mar 5, 2015 at 1:05 PM, Sergey Shepelev notifications@github.com
-------------------------------------------------------------------------- Igor Mazor Rocket Internet AG | Johannisstraße 20 | 10117 Berlin | Deutschland Geschäftsführer: Dr. Johannes Bruder, Arnt Jeschke, Alexander Kudlich |
That's eventlet side problem. There is not fully understood incompatibility between eventlet and multiprocessing. They rarely occur together so it's not a top priority, sorry. You may try following:
In any case minimal code to reproduce the problem is greatly appreciated. |
the first solution thread=false, I already tried. Traceback (most recent call last): I am using still python 2.7, so third solution will not help either. BTW, the solution import eventlet eventlet.monkey_patch = eventlet.patcher.monkey_patch = noop is not helping either ( On Thu, Mar 5, 2015 at 1:30 PM, Sergey Shepelev notifications@github.com
/Igor Mazor |
Yeah, disabling I just tried trivial example and it works. So your code would help.
|
ok, following your example, I have tried to create something similar to import eventlet def foo(x): pool = mp.Pool(3) without the manager.Queue() all works fine. On Thu, Mar 5, 2015 at 1:51 PM, Sergey Shepelev notifications@github.com
-------------------------------------------------------------------------- Igor Mazor Rocket Internet AG | Johannisstraße 20 | 10117 Berlin | Deutschland Geschäftsführer: Dr. Johannes Bruder, Arnt Jeschke, Alexander Kudlich |
Thanks you, I've found what's going on and opened a specific issue #210 I can't provide working patch right now, will keep you updated, though. |
Hello, |
Is there way to disable the monkyk patch during run time ?
For example in case I need to use monkey_patch(all=True) for one part of the program,
but dont want this be applied for other parts of my program since it affects on other stuff in a way that I dont need.
I thought that using monkey_patch(all=False) or even specifying the exact module that need to be "unpatched" monkey_patch(socket=False) will help, but checking it with
patcher.is_monkey_patched('socket') still shows that its patched.
The text was updated successfully, but these errors were encountered: