Skip to content

Conversation

@p-sawicki
Copy link
Collaborator

Fixes mypyc/mypyc#1170

Fixed a bug introduced when adding the async function wrapper in 81eaa5d that would result in TypeErrors being raised when the wrapped function was called using the vectorcall protocol.

The exception was caused by the wrapper keeping the self argument of methods in the args vector instead of extracting it to a separate c function argument. The called function would not expect the self argument to be part of args so it appeared as if too many arguments were passed.

@JukkaL JukkaL merged commit 6adb7a4 into python:master Dec 11, 2025
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TypeError: __aenter__() takes at most 0 arguments

2 participants