You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Summary:
Modified port of D35118477 from 3.8, and backport of upstream PR
python/cpython#100252
Changes from the 3.8 version:
- We don't need to keep `_spec_asyncs` around at all, it's not public API.
- Changing the `__code__` attribute of an `AsyncMock` to be a real code object
instead of a mock is probably fine, but it's technically backwards incompatible
and could break someone's test suite, so I wasn't sure upstream would go for it.
Instead we can create the mock object in a more manual way that avoids a lot of
the introspection cost (by doing it just once up front.)
Test Plan:
Existing test suite.
See performance results posted on upstream PR.
Reviewers: mpage, #cinder_porting
Reviewed By: mpage
Subscribers: mpage, jackyzhang
Differential Revision: https://phabricator.intern.facebook.com/D42039568
Tasks: T139983135
Tags: commitClose, cinder-310-standalone-upstream-candidate, publish_when_ready
0 commit comments