Title: annotationlib: namespace can be non-`dict` · Issue #132426 · python/cpython · GitHub
Open Graph Title: annotationlib: namespace can be non-`dict` · Issue #132426 · python/cpython
X Title: annotationlib: namespace can be non-`dict` · Issue #132426 · python/cpython
Description: Hello! I think the following, made so that get_annotate_function is usable in metaclasses' __new__, should check for Mapping since __prepare__ can provide any mapping (see picture from PEP3115. cpython/Lib/annotationlib.py Line 630 in a8...
Open Graph Description: Hello! I think the following, made so that get_annotate_function is usable in metaclasses' __new__, should check for Mapping since __prepare__ can provide any mapping (see picture from PEP3115. cpy...
X Description: Hello! I think the following, made so that get_annotate_function is usable in metaclasses' __new__, should check for Mapping since __prepare__ can provide any mapping (see picture from PEP3115....
Opengraph URL: https://github.com/python/cpython/issues/132426
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"annotationlib: namespace can be non-`dict`","articleBody":"Hello!\n\nI think the following, made so that `get_annotate_function` is usable in metaclasses' `__new__`, should check for `Mapping` since `__prepare__` can provide any mapping (see picture from [PEP3115](https://peps.python.org/pep-3115/#invoking-the-metaclass).\n\nhttps://github.com/python/cpython/blob/a81232c769a4f67ee312c5c67a2148c54c6570d0/Lib/annotationlib.py#L630\n\n\n\n\u003c!-- gh-linked-prs --\u003e\n### Linked PRs\n* gh-132427\n* gh-132490\n\u003c!-- /gh-linked-prs --\u003e\n","author":{"url":"https://github.com/eliegoudout","@type":"Person","name":"eliegoudout"},"datePublished":"2025-04-12T08:35:32.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":4},"url":"https://github.com/132426/cpython/issues/132426"}
| 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:f8c0c302-29d3-31f9-f16b-2dcc69a71269 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | ED14:9124A:50BC6D:6891F6:696AE26E |
| html-safe-nonce | 666d8412701d8d55a5ca6d5ea445a479206442bfa06335024563e1ca7d9f69b2 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFRDE0OjkxMjRBOjUwQkM2RDo2ODkxRjY6Njk2QUUyNkUiLCJ2aXNpdG9yX2lkIjoiOTAxMjc5NTYwNzQ4NjIyNzA1NCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 428cdfe82eb6895de6e951be1f8fce47e7e351f62441aab47e321ffe8ad6e9c0 |
| hovercard-subject-tag | issue:2990344359 |
| 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/132426/issue_layout |
| twitter:image | https://opengraph.githubassets.com/35bb62ce731f16a9246acc844a07037436e6322e8d9df162938257a0fb7206ba/python/cpython/issues/132426 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/35bb62ce731f16a9246acc844a07037436e6322e8d9df162938257a0fb7206ba/python/cpython/issues/132426 |
| og:image:alt | Hello! I think the following, made so that get_annotate_function is usable in metaclasses' __new__, should check for Mapping since __prepare__ can provide any mapping (see picture from PEP3115. cpy... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | eliegoudout |
| 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