Title: Emit the spaced relative lazy import warning like CPython by youknowdot · Pull Request #9999 · RustPython/RustPython · GitHub
Open Graph Title: Emit the spaced relative lazy import warning like CPython by youknowdot · Pull Request #9999 · RustPython/RustPython
X Title: Emit the spaced relative lazy import warning like CPython by youknowdot · Pull Request #9999 · RustPython/RustPython
Description: Summary Match CPython 3.15.2's SyntaxWarning for a relative import of the module named lazy only when whitespace separates the relative dots and the module name. Diagnose the original source range, including when a warning filter promotes it to SyntaxError, and keep parser warnings ordered relative to tokenizer warnings and errors. Restore the three canonical SyntaxWarningTest methods via scripts/update_lib migrate. Existing RustPython adaptations are unchanged. Reference: CPython grammar and helper, CPython tests. This is independent of the grammar restriction test restoration in #9998. Validation Linux focused interpreter build, five canonical SyntaxWarningTest methods, 42 compiler unit tests, targeted compiler/VM Clippy, formatter, and normal pre-commit checks passed. CPython-tagged source comparison plus differential compile checks included ordinary and AST-only compilation, single input, type comments, warning filters, real CR/CRLF sources, malformed import targets, and tokenizer recovery. Corrected all 88 previously identified relative-warning gaps in the 2,880-case malformed-target matrix; the remaining 22 involve an unrelated existing numeric warning. All 576 unrelated controls were unchanged. Independent checks also compared warning event order and promoted exception locations and arguments. Full local workspace and C API suites were not run (the offline workspace resolution lacks aead 0.5.2); this draft requests hosted validation. No performance claim. The standalone Ubuntu frozen_stdlib example has a separate known Malachite resolution failure (#9996 and #9997; tracked in RustPython/pymath#23). AI disclosure: implementation and verification were assisted by OpenAI Codex.
Open Graph Description: Summary Match CPython 3.15.2's SyntaxWarning for a relative import of the module named lazy only when whitespace separates the relative dots and the module name. Diagnose the original source r...
X Description: Summary Match CPython 3.15.2's SyntaxWarning for a relative import of the module named lazy only when whitespace separates the relative dots and the module name. Diagnose the original sour...
Opengraph URL: https://github.com/RustPython/RustPython/pull/9999
X: @github
Domain: github.com
IPv4 address: 140.82.114.3
| 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:af0c870b-657b-f58f-5971-77319d10bb8d |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 91EA:48D18:A88C73:D94688:6B063566 |
| html-safe-nonce | 54040b25a8152f425eede17be457989ecc41e18916927f7c3718db25133866f8 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MUVBOjQ4RDE4OkE4OEM3MzpEOTQ2ODg6NkIwNjM1NjYiLCJ2aXNpdG9yX2lkIjoiMjk3MzkwMTAyMzMwMDk1NzU0MiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | aee3abca45b3ff8f6723aa079d42d0236a4bf8e8f0aaa421b1a321d9444841ab |
| hovercard-subject-tag | pull_request:5452724032 |
| 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/9999/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 Match CPython 3.15.2's SyntaxWarning for a relative import of the module named lazy only when whitespace separates the relative dots and the module name. Diagnose the original source r... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | c3584c853cd39700ecff6e2cf8364295ffdb5313e571046c41cd2479270f7df0 |
| 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 | 9eb3bb1597d09170a5f282cd38ae376dee1a5ec1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | no-cache |
Viewport: width=device-width