-
-
Notifications
You must be signed in to change notification settings - Fork 33.9k
gh-84644: Fix singledispatch annotation parsing #143465
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
base: main
Are you sure you want to change the base?
gh-84644: Fix singledispatch annotation parsing #143465
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
This comment was marked as resolved.
This comment was marked as resolved.
|
Hm, sorry, I think I was wrong. I've forgotten that a workaround for any potential (still unlikely) breakage is dead simple -- just |
Co-authored-by: Bartosz Sławecki <bartosz@ilikepython.com>
A very practical but more general approach than GH-140255 to fixing annotation parsing in
functools.singledispatchandfunctools.singledispatchmethod.Fixes issues GH-84644, GH-130827, and GH-143886.
It can be broken if one uses a user-defined alternative implementation of
staticmethodor something analogous.Will break incorrect but working registrees.
I haven't investigated strippingAnnotatedtypeforms yet.Consulting a test which fails with this fix at https://github.com/python/cpython/pull/130309/changes#r2663516538 -- I think that the test is wrong.