You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I own some code that has been forwarding throw by declaring a three-parameter method with two defaulted to None, but as of py3.11 we have started seeing errors:
TypeError: throw() third argument must be a traceback
This doesn't seem to match the type stubs. Should the second Coroutine.throw overload be changed to remove the final | None?
This has now been fixed in cpython main and a backport PR for 3.11 is open. I don't think we need to do anything here. Thanks, @alicederyn for opening the issue and @hauntsaninja for fixing it in CPython!
Activity
srittau commentedon Jan 25, 2023
I couldn't find anything about this in the release notes. I suspect this is actually a bug in Python 3.11.
hauntsaninja commentedon Jan 25, 2023
Can confirm that this behaviour is changed by the commit you mention python/cpython@0a8b8e0
hauntsaninja commentedon Jan 25, 2023
Not sure why it was changed, possibly unintentionally since the PR is missing a news entry. Let me open an issue against CPython...
srittau commentedon Jan 25, 2023
This has now been fixed in cpython main and a backport PR for 3.11 is open. I don't think we need to do anything here. Thanks, @alicederyn for opening the issue and @hauntsaninja for fixing it in CPython!