gh-81432: Make create_autospec generate AsyncMocks for awaitable classes#25347
gh-81432: Make create_autospec generate AsyncMocks for awaitable classes#25347msuozzo wants to merge 4 commits into
Conversation
cjw296
left a comment
There was a problem hiding this comment.
@lindacorbett - not sure this is ready to merge, and it's a tricky PR related to a problem that cropped up elsewhere. I don't have time to look until later this week, but I'd like someone with a lot of familiarity with the mock module to think this through...
Sorry, something went wrong.
|
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
Sorry, something went wrong.
|
Alright this is in a functional state. I'm not too familiar with AsyncMock but I think these changes achieve the intent of the original bug+test. @lisroach PTAL |
Sorry, something went wrong.
|
I must admit the change initially looks a little complicated to review since we had several discussion over how to detect async/coroutine properly, when to return AsyncMock, etc. and just want to understand if there is any behavior change though tests pass. I will review this PR a little later as I am working on few other things. Thanks @msuozzo . |
Sorry, something went wrong.
|
This PR is stale because it has been open for 30 days with no activity. |
Sorry, something went wrong.
Remove skipped test. See discussion on python/cpython#25326. Fix is apparently here, but no-one is confident to review and land: python/cpython#25347. Backports: 984894a9a25c0f8298565b0c0c2e1f41917e4f88 Signed-off-by: Chris Withers <chris@simplistix.co.uk>
Remove skipped test. See discussion on python/cpython#25326. Fix is apparently here, but no-one is confident to review and land: python/cpython#25347. Backports: 984894a9a25c0f8298565b0c0c2e1f41917e4f88 Signed-off-by: Chris Withers <chris@simplistix.co.uk>
See discussion on python/cpython#25326. Fix is apparently here, but no-one is confident to review and land: python/cpython#25347.
|
The following commit authors need to sign the Contributor License Agreement: |
Sorry, something went wrong.
|
This PR is stale because it has been open for 30 days with no activity. |
Sorry, something went wrong.
#81432