-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix default_context_manager in conjunction with ExitStack. (#344)
Summary: Pull Request resolved: #344 As outlined in the comment; because our MethodProxy objects don't get bound to the object (via __get__); when (Async)ExitStack comes along and invokes: ``` enter_fn = cm.__class_.__enter__ enter_fn(cm) ``` A problem occurs - while the attribute lookup succeeds (yay); it's not expecting a `self` paramter explicitly passed here, as it's not a bound python method. Theoretically; magic could be added to MethodProxy to properly bind via `__get__`, but my knowledge of testslide right now isn't strong enough to feel confident in that approach, so I'm opting for this. Reviewed By: deathowl Differential Revision: D42114206 fbshipit-source-id: 9473fe59d30c93c56717f92117180f1b6f9e31c1
- Loading branch information
1 parent
eb0e389
commit 4f9fe23
Showing
2 changed files
with
82 additions
and
11 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