Title: Not properly checking for invalid escape seqeunce \X · Issue #5656 · RustPython/RustPython · GitHub
Open Graph Title: Not properly checking for invalid escape seqeunce \X · Issue #5656 · RustPython/RustPython
X Title: Not properly checking for invalid escape seqeunce \X · Issue #5656 · RustPython/RustPython
Description: Summary RustPython doesn't report any errors running the file RustPython/extra_tests/snippets/builtin_bytes.py cargo run --release -- /home/hbina085/git/RustPython/extra_tests/snippets/builtin_bytes.py Finished `release` profile [optimiz...
Open Graph Description: Summary RustPython doesn't report any errors running the file RustPython/extra_tests/snippets/builtin_bytes.py cargo run --release -- /home/hbina085/git/RustPython/extra_tests/snippets/builtin_byte...
X Description: Summary RustPython doesn't report any errors running the file RustPython/extra_tests/snippets/builtin_bytes.py cargo run --release -- /home/hbina085/git/RustPython/extra_tests/snippets/builtin_...
Opengraph URL: https://github.com/RustPython/RustPython/issues/5656
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Not properly checking for invalid escape seqeunce \\X","articleBody":"## Summary\n\n\u003c!-- Short description of the bug -->\n\nRustPython doesn't report any errors running the file `RustPython/extra_tests/snippets/builtin_bytes.py`\n\n```\ncargo run --release -- /home/hbina085/git/RustPython/extra_tests/snippets/builtin_bytes.py \n Finished `release` profile [optimized] target(s) in 0.15s\n Running `target/release/rustpython /home/hbina085/git/RustPython/extra_tests/snippets/builtin_bytes.py`\n```\n\n## Expected\n\nBut CPython does,\n\n```\npython /home/hbina085/git/RustPython/extra_tests/snippets/builtin_bytes.py \n/home/hbina085/git/RustPython/extra_tests/snippets/builtin_bytes.py:23: SyntaxWarning: invalid escape sequence '\\X'\n assert b\"omkmok\\Xaa\" == bytes([111, 109, 107, 109, 111, 107, 92, 88, 97, 97])\n```\n\nThe issue is that RustPython does not check if `\\X` is a valid escape sequence.","author":{"url":"https://github.com/hbina","@type":"Person","name":"hbina"},"datePublished":"2025-04-01T08:01:58Z","url":"https://github.com/RustPython/RustPython/issues/5656"}
| 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 | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:44a55b1d-1e3e-fd42-1ed1-b4c71f4e79c2 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BEBA:2046A4:311AEC:426A04:6B00267D |
| html-safe-nonce | bdf98e6310848990f580df795bad6a46fb35f97c0af166a7033497613e6d9a55 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCRUJBOjIwNDZBNDozMTFBRUM6NDI2QTA0OjZCMDAyNjdEIiwidmlzaXRvcl9pZCI6IjQ4NTY5OTk4Njc2NzY4OTQ4NDUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 9af53b6928850628ecb8ba4b10ffaa86a058e622d73b3781c5c7eeb36d96f939 |
| hovercard-subject-tag | issue:2962633514 |
| 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/RustPython/RustPython/5656/issue_layout |
| twitter:image | https://opengraph.githubassets.com/5e0dc9d67016fd3881bc61434b43bcbeecc406c07992d3099e844ac715575242/RustPython/RustPython/issues/5656 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/5e0dc9d67016fd3881bc61434b43bcbeecc406c07992d3099e844ac715575242/RustPython/RustPython/issues/5656 |
| og:image:alt | Summary RustPython doesn't report any errors running the file RustPython/extra_tests/snippets/builtin_bytes.py cargo run --release -- /home/hbina085/git/RustPython/extra_tests/snippets/builtin_byte... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | hbina |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4eb4cba0d69f045374ac15de9666d22b0961e1d555cc3824f36b7734c00c78e0 |
| turbo-cache-control | no-preview |
| 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 | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 44c658b24abf00491fb7ae5f56d42c9f38cbeab2 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width