-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Open
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 who working on bytecode(compiler) know that the MAGIC_NUMBER should be updated.
NOTE: This issue is not about blaming any contributors, but about automatically preventing problems.
Workaround
Now, if you're blocked by the following errors, you can bypass it by removing all .pyc files. rm -r **/*.pyc
encodings initialization failed. Only utf-8 encoding will be supported.
Traceback (most recent call last):
File "_frozen_importlib", line 1467, in __import__
File "_frozen_importlib", line 1388, in _gcd_import
File "_frozen_importlib", line 1361, in _find_and_load
File "_frozen_importlib", line 1332, in _find_and_load_unlocked
File "_frozen_importlib", line 936, in _load_unlocked
File "_frozen_importlib_external", line 1019, in exec_module
File "_frozen_importlib_external", line 1154, in get_code
File "_frozen_importlib_external", line 781, in _compile_bytecode
ValueError: Couldn't deserialize python bytecode
The above exception was the direct cause of the following exception:
RuntimeError: RustPython could not import the encodings module. It usually means something went wrong. Please carefully read the following messages and follow the steps.
...
Details
I don't have a detail idea yet, but it can be automated if there is a rule to determine MAGIC_NUMBER.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels