Title: Restore explicit tracing re-entry in sys.call_tracing by youknowdot · Pull Request #9837 · RustPython/RustPython · GitHub
Open Graph Title: Restore explicit tracing re-entry in sys.call_tracing by youknowdot · Pull Request #9837 · RustPython/RustPython
X Title: Restore explicit tracing re-entry in sys.call_tracing by youknowdot · Pull Request #9837 · RustPython/RustPython
Description: Summary Implement sys.call_tracing() re-entry instead of calling the supplied function with callback tracing still suppressed. This follows CPython 3.15's _PyEval_CallTracing: save the tracing depth, temporarily clear callback-recursion suppression, call the function, and restore the surrounding callback state even when Python raises an exception. RustPython's separate use_tracing fast flag is enabled from the current trace/profile hooks for this explicit call. The surrounding suppressed flag is restored when called inside a callback; outside callbacks, hook changes made by the function remain effective. The ordinary function-call path is unchanged. Remove the expected-failure marker from test_pdb.test_errors_in_command, restoring recursive debugger command execution. Add regressions in the existing stdlib_sys.py snippet for trace/profile callback re-entry, exception restoration, continued suppression of ordinary callback-tail calls, and hook replacement/removal inside and outside callbacks. No changes to profiling dispatch or the pending callable-event work in #9439. Validation Against main 1d1795739 plus only this patch: Default build passed. test_pdb, test_sys_settrace, and test_sys_setprofile: 708 tests, 126 skipped, passed (existing unrelated markers retained). Targeted test_errors_in_command, the full RustPython stdlib_sys.py snippet, and the new call-tracing API comparison cases passed. New regression cases also passed on CPython 3.15.2; the unmodified RustPython main reproduces the missing nested call event. VM all-target Clippy with threading and warnings denied passed. Normal pre-commit hooks passed. Full extra_tests pytest: 495 passed, 20 failed, 15 subtests passed in 326 seconds. This is not a clean full-suite result: 14 failures are CPython/host-runner failures already seen in the preceding baseline run. The six RustPython failures (multiprocessing_condition, multiprocessing_fork_sharer, multiprocessing_sharedctypes, stdlib_os, stdlib_socket, stdlib_sqlite3) were also reproduced using the exact unmodified main binary: sandbox IPC/socket restrictions, ownership expectations, and _sqlite3 absent from the default build. RustPython's full stdlib_sys.py passed; CPython's pre-existing full-snippet failure is not claimed fixed. Full workspace and C-API tests/Clippy were not run because available disk space was about 1.5 GB. No claim of complete workspace or platform coverage. AI assistance: OpenAI Codex.
Open Graph Description: Summary Implement sys.call_tracing() re-entry instead of calling the supplied function with callback tracing still suppressed. This follows CPython 3.15's _PyEval_CallTracing: save the tracing ...
X Description: Summary Implement sys.call_tracing() re-entry instead of calling the supplied function with callback tracing still suppressed. This follows CPython 3.15's _PyEval_CallTracing: save the trac...
Opengraph URL: https://github.com/RustPython/RustPython/pull/9837
X: @github
Domain: github.com
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:08bdfb95-de20-0164-237b-56a748f7615f |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | B572:4BB79:3815DC9:47A59B7:6B01FE2B |
| html-safe-nonce | 340e2afd5a9d2a8f758e2fc84052f9925ee0791a01ac20e1545b8efbca447228 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNTcyOjRCQjc5OjM4MTVEQzk6NDdBNTlCNzo2QjAxRkUyQiIsInZpc2l0b3JfaWQiOiIyMzIyOTM4NTY5OTg0OTY2MTg3IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | a8626cc17f8524ba5d636d5a3679f84df9575c2c2accdc3bcb13db914a181a88 |
| hovercard-subject-tag | pull_request:5312639886 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,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/RustPython/RustPython/pull/9837/files |
| twitter:image | https://avatars.githubusercontent.com/u/336763669?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/336763669?s=400&v=4 |
| og:image:alt | Summary Implement sys.call_tracing() re-entry instead of calling the supplied function with callback tracing still suppressed. This follows CPython 3.15's _PyEval_CallTracing: save the tracing ... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/RustPython/RustPython git https://github.com/RustPython/RustPython.git |
| octolytics-dimension-user_id | 39710557 |
| octolytics-dimension-user_login | RustPython |
| octolytics-dimension-repository_id | 135201145 |
| octolytics-dimension-repository_nwo | RustPython/RustPython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 135201145 |
| octolytics-dimension-repository_network_root_nwo | RustPython/RustPython |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width