GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||
GeezerVison is showing github.com — gh-94912: Adjusted check for non-standard coroutine function marker. by carltongibson · Pull Request #100935 · python/cpython Conversation
|
|
I think this could skip news? 🤔 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Confirming this resolves the issues for Django ✔️ Thanks! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| while ismethod(f): | ||
| f = f.__func__ | ||
| f = functools._unwrap_partial(f) | ||
| if not (isfunction(f) or _signature_is_functionlike(f)): |
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
What else can we mark as coroutine-like? Functions, methods, other callables like partial, classes. Anything else?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Hi @sobolevn. I'm not sure I follow 🤔
The cases that have occurred up to Python 3.11, using the old asyncio version, have been callable classes and sync functions. Those are (now) covered. We also added tests for static and class method and lambdas (but I've not seen anyone using those).
The other case that would simplify client code is automatic detection of the __call__ method (either async def or marked) but I think the preference is not to add that.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I will merge this.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.