Title: `AssertionError` when running `profile` on code containing generator expression · Issue #110514 · python/cpython · GitHub
Open Graph Title: `AssertionError` when running `profile` on code containing generator expression · Issue #110514 · python/cpython
X Title: `AssertionError` when running `profile` on code containing generator expression · Issue #110514 · python/cpython
Description: Bug report Bug description: Bisected to 411b169. Minimal repro (save it to file and run as python -m profile script.py): next(i for i in range(10)) Output: Exception ignored in:
Open Graph Description: Bug report Bug description: Bisected to 411b169. Minimal repro (save it to file and run as python -m profile script.py): next(i for i in range(10)) Output: Exception ignored in: X Description: Bug report Bug description: Bisected to 411b169. Minimal repro (save it to file and run as python -m profile script.py): next(i for i in range(10)) Output: Exception ignored in: <generator objec...
Opengraph URL: https://github.com/python/cpython/issues/110514
X: @github
Domain: github.com
Links:
Viewport: width=device-width
Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"`AssertionError` when running `profile` on code containing generator expression","articleBody":"# Bug report\n\n### Bug description:\n\nBisected to 411b1692811b2ecac59cb0df0f920861c7cf179a.\n\nMinimal repro (save it to file and run as `python -m profile script.py`):\n```python\nnext(i for i in range(10))\n```\nOutput:\n```\nException ignored in: \u003cgenerator object \u003cgenexpr\u003e at 0x7f48fac29010\u003e\nTraceback (most recent call last):\n File \"/home/radislav/projects/cpython/Lib/profile.py\", line 209, in trace_dispatch_i\n if self.dispatch[event](self, frame, t):\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/home/radislav/projects/cpython/Lib/profile.py\", line 293, in trace_dispatch_return\n assert frame is self.cur[-2].f_back, (\"Bad return\", self.cur[-3])\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nAssertionError: ('Bad return', ('script.py', 1, '\u003cmodule\u003e'))\n 5 function calls in 0.114 seconds\n\n Ordered by: standard name\n\n ncalls tottime percall cumtime percall filename:lineno(function)\n 1 0.000 0.000 0.114 0.114 :0(exec)\n 1 0.000 0.000 0.000 0.000 :0(next)\n 1 0.000 0.000 0.114 0.114 profile:0(\u003ccode object \u003cmodule\u003e at 0x7f48faba08c0, file \"script.py\", line 1\u003e)\n 0 0.000 0.000 profile:0(profiler)\n 1 0.000 0.000 0.000 0.000 script.py:1(\u003cgenexpr\u003e)\n 1 0.114 0.114 0.114 0.114 script.py:1(\u003cmodule\u003e)\n\n```\n\n### CPython versions tested on:\n\n3.12, CPython main branch\n\n### Operating systems tested on:\n\nLinux\n\n\u003c!-- gh-linked-prs --\u003e\n### Linked PRs\n* gh-110524\n* gh-110541\n\u003c!-- /gh-linked-prs --\u003e\n","author":{"url":"https://github.com/chgnrdv","@type":"Person","name":"chgnrdv"},"datePublished":"2023-10-08T00:43:47.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/110514/cpython/issues/110514"}
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:cd924c51-98e0-0a22-2692-5b2ea603a2ea current-catalog-service-hash 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 request-id 974A:280F84:E70563:14286FC:696A3CB3 html-safe-nonce 4cb0d1e33e8be0ddf4c7627246bdcbe6ec5e6757bb000144bd73abbb86fc6476 visitor-payload eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NzRBOjI4MEY4NDpFNzA1NjM6MTQyODZGQzo2OTZBM0NCMyIsInZpc2l0b3JfaWQiOiI0Nzk3OTE1MjgyNDU5NDc1MTIzIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= visitor-hmac e4af5354c68b187d5a72c7da127b3f6faf952f6c294a9483a154ffa747040da0 hovercard-subject-tag issue:1931575209 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/110514/issue_layout twitter:image https://opengraph.githubassets.com/0a1cc91bdeb20d47391aa526f2d167a90a8c053d5cf9d8a07ebc8a60310e7e23/python/cpython/issues/110514 twitter:card summary_large_image og:image https://opengraph.githubassets.com/0a1cc91bdeb20d47391aa526f2d167a90a8c053d5cf9d8a07ebc8a60310e7e23/python/cpython/issues/110514 og:image:alt Bug report Bug description: Bisected to 411b169. Minimal repro (save it to file and run as python -m profile script.py): next(i for i in range(10)) Output: Exception ignored in: og:image:width 1200 og:image:height 600 og:site_name GitHub og:type object og:author:username chgnrdv hostname github.com expected-hostname github.com None 321736bfdb3f591415ae895a0459bec204b26a76caf47ba5c980634cfacc4538 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 13581a31d51edf4a3aca179e10890a4d4f9b6d76 ui-target full theme-color #1e2327 color-scheme light dark
URLs of crawlers that visited me.