Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.3k
gh-128661: Fixtyping.evaluate_forward_ref not showing deprecation#128663
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
typing.evaluate_forward_ref not showing deprecataiontyping.evaluate_forward_ref not showing deprecationb725297 intopython:mainUh oh!
There was an error while loading.Please reload this page.
JelleZijlstra commentedJan 10, 2025
I don't think we should have done this; it makes the interface excessively clunky. |
sobolevn commentedJan 10, 2025
@JelleZijlstra what's your opinion about the alternative? |
JelleZijlstra commentedJan 10, 2025
The code was correct as is. Forcing people to write |
sobolevn commentedJan 10, 2025
Hm, looks like other similar APIs also has this pattern. Like I got confused by Lines 1053 to 1055 in1b39b50
_sentinel there, if it is not a default? |
Uh oh!
There was an error while loading.Please reload this page.
Now calling
typing.evaluate_forward_refwithouttype_paramsraises a warning, as it should.Calling
ForwardRef._evaluateonly raises 1 warning, as it should.I've also covered all branches. After:

No backports are needed, this is 3.14 only feature.
typing.evaluate_forward_refis not fully covered #128661