Title: ForwardRef.evaluate() mishandles type_params · Issue #137226 · python/cpython · GitHub
Open Graph Title: ForwardRef.evaluate() mishandles type_params · Issue #137226 · python/cpython
X Title: ForwardRef.evaluate() mishandles type_params · Issue #137226 · python/cpython
Description: Bug report Bug description: The implementation of annotationlib.ForwardRef.evaluate handles its type_params argument in a complex yet incorrect way. Fixing this unfortunately leads to some test failures in typing.get_type_hints() because...
Open Graph Description: Bug report Bug description: The implementation of annotationlib.ForwardRef.evaluate handles its type_params argument in a complex yet incorrect way. Fixing this unfortunately leads to some test fai...
X Description: Bug report Bug description: The implementation of annotationlib.ForwardRef.evaluate handles its type_params argument in a complex yet incorrect way. Fixing this unfortunately leads to some test fai...
Opengraph URL: https://github.com/python/cpython/issues/137226
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"ForwardRef.evaluate() mishandles type_params","articleBody":"# Bug report\n\n### Bug description:\n\nThe implementation of `annotationlib.ForwardRef.evaluate` handles its `type_params` argument in a complex yet incorrect way. Fixing this unfortunately leads to some test failures in `typing.get_type_hints()` because it does additional confusing things to the globals and locals. Still, I think we should fix the behavior of the new public `.evaluate()` method.\n\n### CPython versions tested on:\n\nCPython main branch\n\n### Operating systems tested on:\n\n_No response_\n\n\u003c!-- gh-linked-prs --\u003e\n### Linked PRs\n* gh-137227\n* gh-137709\n* gh-138953\n* gh-138989\n\u003c!-- /gh-linked-prs --\u003e\n","author":{"url":"https://github.com/JelleZijlstra","@type":"Person","name":"JelleZijlstra"},"datePublished":"2025-07-30T04:17:37.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":13},"url":"https://github.com/137226/cpython/issues/137226"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:7d99a2bb-a77b-2f6c-5938-aa8df40b4320 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B9B8:385F9F:291CE88:378F1AB:696AE61E |
| html-safe-nonce | 200b470d8fafd95c72ced4b619b7ac6914f55be893b5d9e1d064bc825e951281 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCOUI4OjM4NUY5RjoyOTFDRTg4OjM3OEYxQUI6Njk2QUU2MUUiLCJ2aXNpdG9yX2lkIjoiNzE2NDcwMTM4MDk2NTEwNDk0IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | ed2b62b808991314ee17c2bbefa30ccf41f40f68e7250545f3eb00ff32d8b26e |
| hovercard-subject-tag | issue:3275613418 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/137226/issue_layout |
| twitter:image | https://opengraph.githubassets.com/799d8e65aa8582f87c0a4c3a0e4bafa10ebb93ac7d667b8f593a95387de131ec/python/cpython/issues/137226 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/799d8e65aa8582f87c0a4c3a0e4bafa10ebb93ac7d667b8f593a95387de131ec/python/cpython/issues/137226 |
| og:image:alt | Bug report Bug description: The implementation of annotationlib.ForwardRef.evaluate handles its type_params argument in a complex yet incorrect way. Fixing this unfortunately leads to some test fai... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | JelleZijlstra |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5f99f7c1d70f01da5b93e5ca90303359738944d8ab470e396496262c66e60b8d |
| turbo-cache-control | no-preview |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 3d84d50b3c75fa36755c3cf392edbc09e626f979 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width