gh-84644: Fix singledispatch annotation parsing#143465
gh-84644: Fix singledispatch annotation parsing#143465johnslavik wants to merge 91 commits intopython:mainfrom
Conversation
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>
|
Let's see if merging main will help the CI pass. OfftopicI'll ping Sviat to check if he's interested in debugging this if the issue persists. |
|
Hold on, I'll also think about the prospect of fixing GH-143535 separately. This could be simplified with that other issue in mind. |
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.