-
Notifications
You must be signed in to change notification settings - Fork 15
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
The Popen
patching is a little fragile
#116
Comments
Ah, right - it may depend on the order of imports that in some cases the Feel free to file a PR for the documentation change, that would be very welcome. |
thanks for the prompt feedback, I'll try to schedule some time to update the documentation. |
I also faced the issue where I imported my Popen like this:
Fixed my issue for fp.register() |
Yes, if you're using |
What if you patched |
That's definitely worth exploring - it could work. I'll try to play with it a bit during the weekend, thanks! |
@terencehonles - I've just tried it, and unfortunately it won't work. Attempting to override AttributeError: 'method' object attribute '__new__' is read-only |
If you use
from multiprocess import Popen
the library is not able to swap the implementation, I don't know if it's an intended behavior, maybe should be explicitly indicated in the documentation.Minimal reproducible example: imagine you have the module
benchmarking.py
with the following function:and then you have a separate file with your test
then the test it's gonna fail because (probably) at the moment the test is run it's too late to swap the implementation.
The text was updated successfully, but these errors were encountered: