Title: Issue · GitHub
Open Graph Title: Issue · python/cpython
X Title: Issue · python/cpython
Description: The Python programming language. Contribute to python/cpython development by creating an account on GitHub.
Open Graph Description: The Python programming language. Contribute to python/cpython development by creating an account on GitHub.
X Description: The Python programming language. Contribute to python/cpython development by creating an account on GitHub.
Opengraph URL: https://github.com/python/cpython
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"typing._allow_reckless_class_checks doesn't work when _abc doesn't exist.","articleBody":"# Bug report\n\n### Bug description:\n\n~When `typing._caller`'s `sys._getframe` fallback is triggered without `_abc` module, `_typing._allow_reckless_class_checks` fails to check `_py_abc` while running `abc.ABCMeta.__instancecheck__`.~\n\nWithout `_abc` module, `_typing._allow_reckless_class_checks`fails to check `_py_abc`\n\nRelated code in typing.py:\nhttps://github.com/python/cpython/blob/v3.14.0b3/Lib/typing.py#L1846-L1863\n\nThis is technically a bug of typing.py, but really hard to be triggered on CPython.\n\n### CPython versions tested on:\n\nCPython main branch\n\n### Operating systems tested on:\n\nmacOS\n\n# Solution suggestion\n\n## Patch typing._allow_reckless_class_checks to also check `_py_abc`\n~This is the most conservative approach. Compatible with all of previous scenarios and additionally fixing the bug.~\n\n## ~Patch typing._caller to remove sys._getframe or raise warning when fallback~\n~If the the `typing` requires to work with sys._getframemodulename, then let the users to know it has a caveat.~\n\n\n\u003c!-- gh-linked-prs --\u003e\n### Linked PRs\n* gh-136115\n\u003c!-- /gh-linked-prs --\u003e\n","author":{"url":"https://github.com/youknowone","@type":"Person","name":"youknowone"},"datePublished":"2025-06-27T16:00:41.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/136047/cpython/issues/136047"}
| route-pattern | /:user_id/:repository/issues/:id(.:format) |
| route-controller | issues |
| route-action | show |
| fetch-nonce | v2:f0cdca67-d6fe-25f4-2866-a27b19a72f58 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 94DA:FA21D:67F707:94D7A4:6A632ECB |
| html-safe-nonce | d193ef0d8884d3d7e7c2d3c0387672cac903c278311fab3944f28c797a858c16 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NERBOkZBMjFEOjY3RjcwNzo5NEQ3QTQ6NkE2MzJFQ0IiLCJ2aXNpdG9yX2lkIjoiNDg4NzczOTI0MDY2MTg1NTk0NyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 93cdddb82b1fb9f9f76fb8c0b71cf51a482734cd66bd1fdaeffed26f4740fb60 |
| hovercard-subject-tag | repository:81598961 |
| 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/python/cpython/issues/136047 |
| twitter:image | https://opengraph.githubassets.com/1e99e1d47208e89ff15993dbf83ec7640f40c10cc56966b373c2a1b2667f3f9f/python/cpython |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/1e99e1d47208e89ff15993dbf83ec7640f40c10cc56966b373c2a1b2667f3f9f/python/cpython |
| og:image:alt | The Python programming language. Contribute to python/cpython development by creating an account on GitHub. |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | df6e1c2adcceb061ec8c4106a1b34f38280f08e13f2b195c661c202834cbc3b1 |
| turbo-cache-control | no-cache |
| 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 | 822a0ff2a479845adcdd40a1a7b1734a56e05818 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width