-
-
Notifications
You must be signed in to change notification settings - Fork 30.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
3.12 regression: cannot create weak reference to 'typing.TypeVar' object #106403
Comments
Fixing. The new
But neither is the existing UnionType:
So maybe that's fine? |
Thanks @JelleZijlstra!
I suspect that this might cause problems with I did not have time to investigate the details myself yet but @musicinmybrain tried to test your fix in cloudpickle in cloudpipe/cloudpickle#507 (comment) and there are still segfaults to debug. |
…honGH-106418) (cherry picked from commit 945d3cb) Co-authored-by: Jelle Zijlstra <[email protected]>
I merged my PR that re-adds weakref support for TypeVars. I haven't tried to debug the segfaults in the cloudpickle tests, but let me know if those can be minified to something that shows the issue is in CPython. |
Closing this as the original report is (believed to be) fixed. If the other cloudpickle issues are caused by bugs in 3.12 it probably deserves its own issue. |
This works in Python 3.11, but fails in 3.12b3:
I'm assuming it's an unintentional side effect of the PEP-695 implementation? Unfortunately I don't have time to investigate right now, let me know if I should.
Reported in cloudpipe/cloudpickle#507
Linked PRs
The text was updated successfully, but these errors were encountered: