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
Import fails with dnspython[doh,trio]: module 'eventlet.green.select' has no attribute 'epoll' #805
Comments
Responding for a bump, I ran into this today with Celery:
Note that "trio" is buried for me in gunicorn. |
@mchineboy ran into a similar error today. any luck on a resolution? |
I was able to resolve by pinning dnspython to version 2.3.0. I opened an issue with the dnspython library - rthalley/dnspython#959 |
I also had this error, I deleted the trio from the virtual environment. If you are clearly not using it, try to remove it or make a choice only in favor of one of the libraries (eventlet or trio) eventlet==0.33.3 |
This is Linux related: The following commands:
Works on windows but fails on linux pip freeze on linux & windows are the same:
Note: "trio" is used by "Selenium" while my code use "eventlet"... |
@kakooloukia you should pin dnspython==2.4.0 to 2.3.0 |
@david-engelmann , |
If the consequences are acceptable, the issue can be worked around by disabling greendns: https://github.com/eventlet/eventlet/blob/master/eventlet/green/socket.py#L20 import os
os.environ['EVENTLET_NO_GREENDNS'] = 'yes'
import eventlet This will prevent importing the overridden Nonetheless, this override looks like very dark magic to me. Is it really necessary to implement greendns like this? Requiring users to downgrade dnspython to 0.23 is not a solution and will lead to serious problems when something depends on a newer version or downgrading isn't possible. |
We ran into the very same error when building e.g. pgadmin4.
The difference between 'working' and 'not working' could be worked out to httpcore 0.17.1 upgrade (over 0.17.0, which works) This means we are now running into multiple variations on how to trigger the bug |
Same issue. Using |
Wouldn't the "proper" fix be to add support for a monkey-patched epoll()? |
I think the proper fix would be to get rid of any code that silently overrides core Python functionality, and avoid messing up code in unrelated modules. |
I am also getting similar error on Python 3.10 Traceback (most recent call last): For resolving this issue, any help is appreciated ! |
The |
If you are using trio or if you are in capacity of using asyncio, I'd suggest to move away from eventlet https://eventlet.readthedocs.io/en/latest/asyncio/migration.html#migration-guide Users should get rid of monkey patching and use explicit asynchronous machisms. We don't have the resources to properly maintain the compatibility between eventlet and all the patched modules. |
Eventlet is not anymore a perennial path. |
I installed eventlet and dnspython with some extensions (
dnspython[doh,trio]
) and am getting this stack trace when importing:It works if I import trio first, and then eventlet:
Versions:
The text was updated successfully, but these errors were encountered: