-
Notifications
You must be signed in to change notification settings - Fork 319
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do not allow failed patching to stop execution
There are some cases where monkey_patching cannot always be performed early enough; such as sphinx autodoc importing. To help handle these cases, exceptions during patching are logged and execution is allowed to continue. This fixed an issue in OpenStack Manila docs generation caused by an upgrade to eventlet 0.35.0.
- Loading branch information
Showing
4 changed files
with
41 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
__test__ = False | ||
|
||
|
||
class BadDict(dict): | ||
def items(self): | ||
raise Exception() | ||
|
||
|
||
if __name__ == '__main__': | ||
import threading | ||
test_lock = threading.RLock() | ||
test_lock.acquire() | ||
baddict = BadDict(testkey='testvalue') | ||
|
||
import eventlet | ||
eventlet.monkey_patch() | ||
|
||
print('pass') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters