GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-94924: support `inspect.iscoroutinefunction` in `create_autospec(async_def)` by graingert · Pull Request #94962 · python/cpython

Conversation

@graingert

@graingert graingert commented Jul 18, 2022 •
edited by bedevere-bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor
  • Issue: unitest.mock.create_autospec(async_def) does not create functions valid for inspect.iscoroutinefunction #94924

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@graingert
graingert requested a review from cjw296 as a code owner July 18, 2022 14:16
@bedevere-bot bedevere-bot added the awaiting review label Jul 18, 2022
@graingert

graingert commented Jul 18, 2022

Copy link
Copy Markdown
Contributor Author

see also #84753

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@graingert
graingert force-pushed the mock-create-autospec-async-def branch from cd43e01 to e0424d2 Compare July 18, 2022 14:28
graingert
graingert commented Jul 18, 2022
View reviewed changes
Comment thread Lib/unittest/mock.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

graingert and others added 4 commits July 18, 2022 15:31
@graingert
support inspect.iscoroutinefunction in create_autospec(async_def)
1a39312
@graingert
test create_autospec with inspect.iscoroutine and inspect.iscoroutine…
0596416
…function
@graingert
test when create_autospec functions check their signature
4ab38df
@blurb-it @graingert
📜🤖 Added by blurb_it.
034f947
@graingert
graingert force-pushed the mock-create-autospec-async-def branch from ccd885e to 034f947 Compare July 18, 2022 14:31
@graingert graingert mentioned this pull request Sep 12, 2022
gh-96127: Fix inspect.signature call on mocks #96335
Merged
@graingert
Merge branch 'main' into mock-create-autospec-async-def
79f6eb7
cjw296
cjw296 approved these changes Jun 9, 2023
View reviewed changes
@bedevere-bot bedevere-bot added awaiting merge and removed awaiting review labels Jun 9, 2023
@cjw296
Merge branch 'main' into mock-create-autospec-async-def
c521958
@bedevere-bot bedevere-bot mentioned this pull request Jun 9, 2023
unitest.mock.create_autospec(async_def) does not create functions valid for inspect.iscoroutinefunction #94924
Closed
@cjw296
cjw296 enabled auto-merge (squash) June 9, 2023 13:00
@cjw296
cjw296 merged commit 9bf8d82 into python:main Jun 9, 2023
@bedevere-bot bedevere-bot removed the awaiting merge label Jun 9, 2023
cjw296
cjw296 reviewed Jul 10, 2023
View reviewed changes
Comment thread Lib/unittest/mock.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

cjw296
cjw296 reviewed Jul 10, 2023
View reviewed changes
Comment thread Lib/unittest/mock.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

@cjw296 cjw296 mentioned this pull request Jul 10, 2023
gh-61215: New mock to wait for multi-threaded events to happen #16094
Merged
@hugovk

hugovk commented Mar 15, 2024

Copy link
Copy Markdown
Member

@cjw296 Should this be backported to 3.12 and 3.11, or can the issue be closed?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@graingert
graingert deleted the mock-create-autospec-async-def branch March 15, 2024 17:15
@cjw296

cjw296 commented Mar 18, 2024

Copy link
Copy Markdown
Contributor

I think the issue can be closed, if folks need this in 3.12 or 3.11 they can comment here and I'll crank the handle to get it into the backport release on pypi.

hugovk reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@cjw296 cjw296 mentioned this pull request Sep 15, 2025
Patched async function not registering calls until coroutine is awaited #137594
Open
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@cjw296 cjw296 cjw296 approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@graingert @hugovk @cjw296 @bedevere-bot
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.