mirror of
https://github.com/python/cpython.git
synced 2025-07-07 19:35:27 +00:00
gh-122188: Move magic number to its own file (#122243)
* gh-122188: Move magic number to its own file * Add versionadded directive * Do work in C * Integrate launcher.c * Make _pyc_magic_number private * Remove metadata * Move sys.implementation -> _imp * Modernize comment * Move _RAW_MAGIC_NUMBER to the C side as well * _pyc_magic_number -> pyc_magic_number * Remove unused import * Update docs * Apply suggestions from code review Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com> * Fix typo in tests --------- Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
This commit is contained in:
parent
2b163aa9e7
commit
af0a00f022
7 changed files with 307 additions and 295 deletions
|
@ -705,7 +705,7 @@ def _unmarshal_code(self, pathname, fullpath, fullname, data):
|
|||
source_bytes = _get_pyc_source(self, fullpath)
|
||||
if source_bytes is not None:
|
||||
source_hash = _imp.source_hash(
|
||||
_bootstrap_external._RAW_MAGIC_NUMBER,
|
||||
_imp.pyc_magic_number_token,
|
||||
source_bytes,
|
||||
)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue