Title: Expose _PyInterpreterFrame_GetLine in the private API · Issue #96803 · python/cpython · GitHub
Open Graph Title: Expose _PyInterpreterFrame_GetLine in the private API · Issue #96803 · python/cpython
X Title: Expose _PyInterpreterFrame_GetLine in the private API · Issue #96803 · python/cpython
Description: In 3.11 we are using now an opaque pointer to _PyInterpreterFrame in the eval function. The problem is that for PEP 523's APIs, we changed the type of _PyFrameEvalFunction to be PyObject *(*_PyFrameEvalFunction)(PyThreadState *tstate, _P...
Open Graph Description: In 3.11 we are using now an opaque pointer to _PyInterpreterFrame in the eval function. The problem is that for PEP 523's APIs, we changed the type of _PyFrameEvalFunction to be PyObject *(*_PyFram...
X Description: In 3.11 we are using now an opaque pointer to _PyInterpreterFrame in the eval function. The problem is that for PEP 523's APIs, we changed the type of _PyFrameEvalFunction to be PyObject *(*_Py...
Opengraph URL: https://github.com/python/cpython/issues/96803
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Expose _PyInterpreterFrame_GetLine in the private API","articleBody":"In 3.11 we are using now an opaque pointer to `_PyInterpreterFrame` in the eval function. The problem is that for PEP 523's APIs, we changed the type of `_PyFrameEvalFunction` to be `PyObject *(*_PyFrameEvalFunction)(PyThreadState *tstate, _PyInterpreterFrame *frame, int throwflag)` but there is no way to do anything with `_PyInterpreterFrame` because is opaque. Even if the extension defines `PY_BUILD_CORE` the symbols are not exposed in the executable/libpython, which means that including the headers is insufficient.\r\n\r\nThis is a problem because it really limits what users of PEP 523 can do with the frame object that they receive, even if is opaque. Most profilers using PEP 523 API do it for speed reasons and the only thing they need is to get the line number, but that is now impossible because the pointer is opaque and we don't offer any exposed APIs.\n\n\u003c!-- gh-linked-prs --\u003e\n### Linked PRs\n* gh-96849\n* gh-104211\n* gh-107188\n* gh-107195\n\u003c!-- /gh-linked-prs --\u003e\n","author":{"url":"https://github.com/pablogsal","@type":"Person","name":"pablogsal"},"datePublished":"2022-09-13T16:52:05.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":13},"url":"https://github.com/96803/cpython/issues/96803"}
| 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:9402e3db-58f6-8818-e6e5-b740eb6f1934 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B86A:219A86:5F2C3D:81623F:6969E1AA |
| html-safe-nonce | 5f00d17dd8f0ec211a43639701361aa7ffbe8d647d520afa915b9974dd1606a7 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCODZBOjIxOUE4Njo1RjJDM0Q6ODE2MjNGOjY5NjlFMUFBIiwidmlzaXRvcl9pZCI6IjYzODg5NDI5Mjc2NzIwMzc1NCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | ff33b116f4d2dcd64669cf78bf3bfc5ee16089db0242cc7f8a07b930978e3a19 |
| hovercard-subject-tag | issue:1371740221 |
| 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/96803/issue_layout |
| twitter:image | https://opengraph.githubassets.com/3c362ae9cc4e2dc3d10d0de33451046363d553b655918e567663faa1226b2534/python/cpython/issues/96803 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/3c362ae9cc4e2dc3d10d0de33451046363d553b655918e567663faa1226b2534/python/cpython/issues/96803 |
| og:image:alt | In 3.11 we are using now an opaque pointer to _PyInterpreterFrame in the eval function. The problem is that for PEP 523's APIs, we changed the type of _PyFrameEvalFunction to be PyObject *(*_PyFram... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | pablogsal |
| hostname | github.com |
| expected-hostname | github.com |
| None | 7b32f1c7c4549428ee399213e8345494fc55b5637195d3fc5f493657579235e8 |
| 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 | bdde15ad1b403e23b08bbd89b53fbe6bdf688cad |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width