python / cpython

The Python programming language
https://www.python.org/
Other
60.06k stars 29.09k forks source link

gh-118418: Use a default value for `type_params` in `typing._eval_type` #118431

Closed sobolevn closed 3 weeks ago

sobolevn commented 3 weeks ago

This is a way for libs using undocumented and protected _eval_type not to fail with newly added function parameter.

sobolevn commented 3 weeks ago

Do you have a prefence: should we add a NEWS entry? On one hand, this is a bugfix, on the other hand, _eval_type is private.

JelleZijlstra commented 3 weeks ago

Do you have a prefence: should we add a NEWS entry? On one hand, this is a bugfix, on the other hand, _eval_type is private.

I think we don't need to since we never released the (arguably) broken version.

miss-islington-app[bot] commented 3 weeks ago

Thanks @sobolevn for the PR, and @AlexWaygood for merging it 🌮🎉.. I'm working now to backport this PR to: 3.12. 🐍🍒⛏🤖 I'm not a witch! I'm not a witch!

bedevere-app[bot] commented 3 weeks ago

GH-118436 is a backport of this pull request to the 3.12 branch.