Title: Handle full-width operands in the None-return scanner by youknowdot · Pull Request #9347 · RustPython/RustPython · GitHub
Open Graph Title: Handle full-width operands in the None-return scanner by youknowdot · Pull Request #9347 · RustPython/RustPython
X Title: Handle full-width operands in the None-return scanner by youknowdot · Pull Request #9347 · RustPython/RustPython
Description: Extract the None-return scanner fix from #8954, without capsule hooks or interpreter lifecycle changes. The scanner now uses decoded logical instructions and full-width constant indices. Static example: EXTENDED_ARG 1; LOAD_CONST 0 addresses constant256, not constant0. If constant0 is None and constant256 is True, the old scanner incorrectly accepts the return; reversing those constants causes a false rejection. The split also corrects two issues found during review of the original mega implementation: common-constant decoding is fallible, and loaded constants are checked by None identity rather than converting arbitrary co_consts objects. This avoids new panic paths and unnecessary conversion allocations. Validation: cargo check -p rustpython-vm --lib --locked, with and without --features threading: passed. cargo clippy -p rustpython-vm --lib --locked, with and without --features threading, using -D warnings: passed. Fresh release build with threading, without capi/JIT/frozen Lib: passed. Existing canonical test.test_code.CodeTest.test_returns_only_none: exactly one test passed, no skips. Normal commit hooks: merge-conflict check, rustfmt and cspell passed. The canonical test covers ordinary returns; it does not distinguish the extended-operand case. That correction is supported by source-level operand analysis, not an added runtime probe. CPython3.15 explicitly leaves EXTENDED_ARG handling out of its equivalent scanner, so this is RustPython full-width operand correctness rather than a CPython boundary-parity claim. No Python tests or assertions were changed. Full workspace/C-API suites and capsule lifecycle execution were not run. AI assistance is disclosed in the commit trailer; the exact model identifier was unavailable.
Open Graph Description: Extract the None-return scanner fix from #8954, without capsule hooks or interpreter lifecycle changes. The scanner now uses decoded logical instructions and full-width constant indices. Static exa...
X Description: Extract the None-return scanner fix from #8954, without capsule hooks or interpreter lifecycle changes. The scanner now uses decoded logical instructions and full-width constant indices. Static exa...
Opengraph URL: https://github.com/RustPython/RustPython/pull/9347
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:69151cb4-db67-4b81-582c-6f5eca215272 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | DB68:1050BD:1564364:1C4BC1E:6B01FE44 |
| html-safe-nonce | 3af7b7657ed15f616d7df8ca2015b6e04ef19d6c63ab80e444e81a7983166ec3 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEQjY4OjEwNTBCRDoxNTY0MzY0OjFDNEJDMUU6NkIwMUZFNDQiLCJ2aXNpdG9yX2lkIjoiMzAyMDg3NjkwMTY4MzE2Njc4OCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | ae67cba886ded01f87f6f3a777afda16ed267a5c26bf370c80d4f6b4b5dc716e |
| hovercard-subject-tag | pull_request:5001689227 |
| 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/9347/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 | Extract the None-return scanner fix from #8954, without capsule hooks or interpreter lifecycle changes. The scanner now uses decoded logical instructions and full-width constant indices. Static exa... |
| 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 |
| 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