-
Notifications
You must be signed in to change notification settings - Fork 232
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
Geven monkey patching not being set in subprocesses #1069
Comments
Currently there's no built-in way to auto monkepatch on startup of a worker I think we would need to extend execmodels |
Any hint how I can try to hard fix it? That codebase looks complex, hard to find my way around it. |
No I'm rather unfamiliar with gevent and similar and currently not in a position to work on extra gestures regarding it |
@ddorian perhaps you can implement def pytest_configure():
if os.environ.get("PYTEST_XDIST_WORKER", "").startswith("gw"):
from gevent import monkey
monkey.patch_all() |
That made the process hang. So the underlying module is not compatible (or the patching was done too late).
|
Ahh possibly this then. You might try |
Still stuck.
I just need a way to execute the monkey patching first then when the worker is started, but can't understand the code of execnet to see where it happens. |
This pretty much needs a new execmodels that invokes the patches on usage |
Hi,
I have a simple test file of:
When I run pytest normally with monkey patching it works:
But running with xdist it breaks:
How can I monkey patch the workers too?
The text was updated successfully, but these errors were encountered: