-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
bpo-37251: Removes __code__ check from _is_async_obj. #15830
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
Conversation
Misc/NEWS.d/next/Library/2019-09-10-10-59-50.bpo-37251.8zn2o3.rst
Outdated
Show resolved
Hide resolved
tirkarthi
left a comment
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.
LGTM. Thanks Lisa.
Co-Authored-By: Xtreak <[email protected]>
asvetlov
left a comment
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.
LGTM
|
Added backport label |
|
Thanks @lisroach for the PR 🌮🎉.. I'm working now to backport this PR to: 3.8. |
(cherry picked from commit f1a297a) Co-authored-by: Lisa Roach <[email protected]>
|
GH-15837 is a backport of this pull request to the 3.8 branch. |
(cherry picked from commit f1a297a) Co-authored-by: Lisa Roach <[email protected]>
It should be possible that an awaitable object does not have a
__code__, so technically checking for the__code__attribute in_is_async_objis incorrect. This faulty code check is also why things like:mock.MagicMock(spec=lambda x: x)evaluate to True, even though they are not asynchronous.https://bugs.python.org/issue37251