-
-
Notifications
You must be signed in to change notification settings - Fork 348
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
Just delay select.epoll
to fix import after gevent monkey patching
#2928
Conversation
select.epoll
to fix import with gevent monkey patchingselect.epoll
to fix import after gevent monkey patching
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2928 +/- ##
=======================================
Coverage 99.63% 99.63%
=======================================
Files 120 120
Lines 17865 17865
Branches 3212 3213 +1
=======================================
Hits 17800 17800
Misses 46 46
Partials 19 19
|
cc @jeongilpark could you see if this works for you? I'm not sure if you're actually ending up using trio. (if you do, maybe we should do a better solution, like... I don't know, maybe use |
@jakkdl @CoolCat467 - is this issue and the one specifically listed below resolved now? |
no? I don't see any reason why they've would've been fixed with no changes to any code. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems simple enough, while obviously not fixing the underlying issue I think not crashing on import is important.
Might be a good idea to add a comment as to why we're using a lambda here. Otherwise someone coming along in the future might "optimise" that out, especially since I know PyLint and therefore Ruff has a rule which would flag this. |
This seems to work:
Fixes: #2848
... While trio still doesn't work under gevent, I think not erroring when importing is a good property to have.