Skip to content

Fix TypeError('cancel() takes exactly one argument (2 given)') with Python 3.9#368

Closed
shadchin wants to merge 2 commits into
MagicStack:masterfrom
shadchin:fix_39
Closed

Fix TypeError('cancel() takes exactly one argument (2 given)') with Python 3.9#368
shadchin wants to merge 2 commits into
MagicStack:masterfrom
shadchin:fix_39

Conversation

@shadchin
Copy link
Copy Markdown
Contributor

This fix #361

Comment thread uvloop/cbhandles.pyx

return '<' + ' '.join(info) + '>'

def cancel(self):
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is Handle.cancel() which doesn't have the msg parameter.

Comment thread uvloop/loop.pyx
self.__loop = loop

def cancel(self):
def cancel(self, msg=None):
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should pass on this parameter to the super call below.

Comment thread uvloop/request.pyx
Py_DECREF(self)

cdef cancel(self):
cdef cancel(self, msg=None):
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again, this is an internal API that shouldn't be changed.

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('cancel() takes exactly one argument (2 given)') with py3.9.0rc2

2 participants