Skip to content

Commit

Permalink
gh-119180: Update the magic number (#119397)
Browse files Browse the repository at this point in the history
PR #119321 added a comment about the magic number bump
but did not actually apply the new magic number.
  • Loading branch information
JelleZijlstra committed May 25, 2024
1 parent 49c3ade commit 84be524
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Lib/importlib/_bootstrap_external.py
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ def _write_atomic(path, data, mode=0o666):
# Whenever MAGIC_NUMBER is changed, the ranges in the magic_values array
# in PC/launcher.c must also be updated.

MAGIC_NUMBER = (3571).to_bytes(2, 'little') + b'\r\n'
MAGIC_NUMBER = (3600).to_bytes(2, 'little') + b'\r\n'

_RAW_MAGIC_NUMBER = int.from_bytes(MAGIC_NUMBER, 'little') # For import.c

Expand Down
1 change: 1 addition & 0 deletions PC/launcher.c
Original file line number Diff line number Diff line change
Expand Up @@ -1271,6 +1271,7 @@ static PYC_MAGIC magic_values[] = {
{ 3450, 3499, L"3.11" },
{ 3500, 3549, L"3.12" },
{ 3550, 3599, L"3.13" },
{ 3600, 3649, L"3.14" },
{ 0 }
};

Expand Down

0 comments on commit 84be524

Please sign in to comment.