You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Call to _imp.source_hash with incorrect arguments in (unreachable?) part of SourceLoader.get_code (importlib._bootstrap_external) #99508
However, as either hash_based is False, source_hash has already been generated or the code returns early I don't think this line can be reached. (Maybe if you have a flaky version of get_data that sometimes raises an ImportError/EOFError??).
Edit: Sorry, as I opened the issue from within the source line via 'reference in new issue' I think I accidentally skipped the bug report format that would have given this a label.
Activity
sobolevn commentedon Nov 16, 2022
Yes, this seems incorrect.
_imp.source_hashalways has two arguments, here one is used.FFY00 commentedon Nov 21, 2022
It seems this was a bug of #4575, which went unnoticed until now. Looks like it is just missing
_RAW_MAGIC_NUMBERas the first argument.pythongh-99508: fix `TypeError` in `Lib/importlib/_bootstrap_external…
closes pythongh-99508: fix `TypeError` in `Lib/importlib/_bootstrap_e…