-
Notifications
You must be signed in to change notification settings - Fork 56
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
Fix default_context_manager in conjunction with ExitStack. #344
Closed
Conversation
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 pull request was exported from Phabricator. Differential Revision: D42114206 |
richardjrossiii
pushed a commit
to richardjrossiii/TestSlide
that referenced
this pull request
Dec 17, 2022
) Summary: Pull Request resolved: facebook#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. Differential Revision: D42114206 fbshipit-source-id: 20082f79e87ca7d7e8eca5f119f7fc8ca1c03d55
664b2b4
to
d61b38a
Compare
This pull request was exported from Phabricator. Differential Revision: D42114206 |
Pull Request Test Coverage Report for Build 3717736742
💛 - Coveralls |
richardjrossiii
pushed a commit
to richardjrossiii/TestSlide
that referenced
this pull request
Dec 17, 2022
) Summary: Pull Request resolved: facebook#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. Differential Revision: D42114206 fbshipit-source-id: 7d0ab06716654884e5585003c76b4e82cbad3e8e
d61b38a
to
978a324
Compare
This pull request was exported from Phabricator. Differential Revision: D42114206 |
Summary: 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. Differential Revision: D42114206 fbshipit-source-id: 65d3c17d4c8f8069033cb9cd7cd0734eda8d4d9f
978a324
to
321e6a0
Compare
This pull request was exported from Phabricator. Differential Revision: D42114206 |
This pull request has been merged in 4f9fe23. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary:
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:
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 pythonmethod.
Theoretically; magic could be added to MethodProxy to properly bind via
__get__
, but my knowledge of testslide right now isn't strong enough to feelconfident in that approach, so I'm opting for this.
Differential Revision: D42114206