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. |
CoolCat467
left a comment
There was a problem hiding this comment.
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.