Title: Check `_boostrap_external.MAGIC_NUMBER` has changed when bytecode compatibility was broken to before merging in CI · Issue #6814 · RustPython/RustPython · GitHub
Open Graph Title: Check `_boostrap_external.MAGIC_NUMBER` has changed when bytecode compatibility was broken to before merging in CI · Issue #6814 · RustPython/RustPython
X Title: Check `_boostrap_external.MAGIC_NUMBER` has changed when bytecode compatibility was broken to before merging in CI · Issue #6814 · RustPython/RustPython
Description: Summary I think a GitHub Actions workflow to check _boostrap_external.MAGIC_NUMBER has changed when bytecode compatibility was broken, is needed to help contributors without blocking from bytecode cache(.pyc files), and let contributors ...
Open Graph Description: Summary I think a GitHub Actions workflow to check _boostrap_external.MAGIC_NUMBER has changed when bytecode compatibility was broken, is needed to help contributors without blocking from bytecode ...
X Description: Summary I think a GitHub Actions workflow to check _boostrap_external.MAGIC_NUMBER has changed when bytecode compatibility was broken, is needed to help contributors without blocking from bytecode ...
Opengraph URL: https://github.com/RustPython/RustPython/issues/6814
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Check `_boostrap_external.MAGIC_NUMBER` has changed when bytecode compatibility was broken to before merging in CI","articleBody":"## Summary\n\nI think a GitHub Actions workflow to check `_boostrap_external.MAGIC_NUMBER` has changed when bytecode compatibility was broken, is needed to help contributors without blocking from bytecode cache(`.pyc` files), and let contributors who working on bytecode(compiler) know that the MAGIC_NUMBER should be updated.\n\nNOTE: This issue is not about blaming any contributors, but about automatically preventing problems.\n\n## Workaround\n\nNow, if you're blocked by the following errors, you can bypass it by removing all .pyc files. `rm -r **/*.pyc`\n\n```\nencodings initialization failed. Only utf-8 encoding will be supported.\nTraceback (most recent call last):\n File \"_frozen_importlib\", line 1467, in __import__\n File \"_frozen_importlib\", line 1388, in _gcd_import\n File \"_frozen_importlib\", line 1361, in _find_and_load\n File \"_frozen_importlib\", line 1332, in _find_and_load_unlocked\n File \"_frozen_importlib\", line 936, in _load_unlocked\n File \"_frozen_importlib_external\", line 1019, in exec_module\n File \"_frozen_importlib_external\", line 1154, in get_code\n File \"_frozen_importlib_external\", line 781, in _compile_bytecode\nValueError: Couldn't deserialize python bytecode\n\nThe above exception was the direct cause of the following exception:\n\nRuntimeError: RustPython could not import the encodings module. It usually means something went wrong. Please carefully read the following messages and follow the steps.\n...\n```\n\n## Details\n\nI don't have a detail idea yet, but it can be automated if there is a rule to determine `MAGIC_NUMBER`.","author":{"url":"https://github.com/moreal","@type":"Person","name":"moreal"},"datePublished":"2026-01-20T09:54:20.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/6814/RustPython/issues/6814"}
| 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:f56437e1-5711-beff-1a54-e4866c2078bd |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | AC18:3CEDB:874D3B:C00A6C:696FB096 |
| html-safe-nonce | 77f71151f326601ce6779d9535d1a7fc13814a5a4cada132c5cf00cc1e900d56 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBQzE4OjNDRURCOjg3NEQzQjpDMDBBNkM6Njk2RkIwOTYiLCJ2aXNpdG9yX2lkIjoiNTQyNTY3MDQ1NTUxNzIyOTIwNiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 483c48f35a06bae2d5ec087225428c0eea114a634a2691370fa72462fb841041 |
| hovercard-subject-tag | issue:3832945430 |
| 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/6814/issue_layout |
| twitter:image | https://opengraph.githubassets.com/f783a86d6b2985e7d95e823cce02330875208949a843c4a5d111e35081d4bcef/RustPython/RustPython/issues/6814 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/f783a86d6b2985e7d95e823cce02330875208949a843c4a5d111e35081d4bcef/RustPython/RustPython/issues/6814 |
| og:image:alt | Summary I think a GitHub Actions workflow to check _boostrap_external.MAGIC_NUMBER has changed when bytecode compatibility was broken, is needed to help contributors without blocking from bytecode ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | moreal |
| hostname | github.com |
| expected-hostname | github.com |
| None | d146dfd2c89f9048de9fd6d73ec4ffcf201cc2c89880fcf1c73ff73970d46e64 |
| 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 | 1866f0fdabd6ce28d22bf272fe23b56a9d475be6 |
| ui-target | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width