Skip to content

Commit

Permalink
Python: Add newer magic numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
vstinner committed Dec 19, 2024
1 parent e4b13af commit e2646f7
Showing 1 changed file with 62 additions and 0 deletions.
62 changes: 62 additions & 0 deletions hachoir/parser/program/python.py
Original file line number Diff line number Diff line change
Expand Up @@ -493,6 +493,8 @@ class PythonCompiledFile(Parser):
3423: ("Python 3.9a2", VERSION(3, 9)),
3424: ("Python 3.9a2", VERSION(3, 9)),
3425: ("Python 3.9a2", VERSION(3, 9)),

# Python 3.10
3430: ("Python 3.10a1", VERSION(3, 10)),
3431: ("Python 3.10a1", VERSION(3, 10)),
3432: ("Python 3.10a2", VERSION(3, 10)),
Expand All @@ -503,6 +505,8 @@ class PythonCompiledFile(Parser):
3437: ("Python 3.10b1", VERSION(3, 10)),
3438: ("Python 3.10b1", VERSION(3, 10)),
3439: ("Python 3.10b1", VERSION(3, 10)),

# Python 3.11
3450: ("Python 3.11a1", VERSION(3, 11)),
3451: ("Python 3.11a1", VERSION(3, 11)),
3452: ("Python 3.11a1", VERSION(3, 11)),
Expand Down Expand Up @@ -548,6 +552,8 @@ class PythonCompiledFile(Parser):
3492: ("Python 3.11a7", VERSION(3, 11)),
3493: ("Python 3.11a7", VERSION(3, 11)),
3494: ("Python 3.11a7", VERSION(3, 11)),

# Python 3.12
3500: ("Python 3.12a1", VERSION(3, 12)),
3501: ("Python 3.12a1", VERSION(3, 12)),
3502: ("Python 3.12a1", VERSION(3, 12)),
Expand All @@ -560,6 +566,62 @@ class PythonCompiledFile(Parser):
3509: ("Python 3.12a1", VERSION(3, 12)),
3510: ("Python 3.12a1", VERSION(3, 12)),
3511: ("Python 3.12a1", VERSION(3, 12)),
3512: ("Python 3.12a2", VERSION(3, 12)),
3513: ("Python 3.12a4", VERSION(3, 12)),
3514: ("Python 3.12a4", VERSION(3, 12)),
3515: ("Python 3.12a5", VERSION(3, 12)),
3516: ("Python 3.12a5", VERSION(3, 12)),
3517: ("Python 3.12a5", VERSION(3, 12)),
3518: ("Python 3.12a6", VERSION(3, 12)),
3519: ("Python 3.12a6", VERSION(3, 12)),
3520: ("Python 3.12a6", VERSION(3, 12)),
3521: ("Python 3.12a7", VERSION(3, 12)),
3522: ("Python 3.12a7", VERSION(3, 12)),
3523: ("Python 3.12a7", VERSION(3, 12)),
3524: ("Python 3.12a7", VERSION(3, 12)),
3525: ("Python 3.12b1", VERSION(3, 12)),
3526: ("Python 3.12b1", VERSION(3, 12)),
3527: ("Python 3.12b1", VERSION(3, 12)),
3528: ("Python 3.12b1", VERSION(3, 12)),
3529: ("Python 3.12b1", VERSION(3, 12)),
3530: ("Python 3.12b1", VERSION(3, 12)),
3531: ("Python 3.12b1", VERSION(3, 12)),

# Python 3.13
3550: ("Python 3.13a1", VERSION(3, 13)),
3551: ("Python 3.13a1", VERSION(3, 13)),
3552: ("Python 3.13a1", VERSION(3, 13)),
3553: ("Python 3.13a1", VERSION(3, 13)),
3554: ("Python 3.13a1", VERSION(3, 13)),
3555: ("Python 3.13a1", VERSION(3, 13)),
3556: ("Python 3.13a1", VERSION(3, 13)),
3557: ("Python 3.13a1", VERSION(3, 13)),
3558: ("Python 3.13a1", VERSION(3, 13)),
3559: ("Python 3.13a1", VERSION(3, 13)),
3560: ("Python 3.13a1", VERSION(3, 13)),
3561: ("Python 3.13a1", VERSION(3, 13)),
3562: ("Python 3.13a1", VERSION(3, 13)),
3563: ("Python 3.13a1", VERSION(3, 13)),
3564: ("Python 3.13a1", VERSION(3, 13)),
3565: ("Python 3.13a1", VERSION(3, 13)),
3566: ("Python 3.13a1", VERSION(3, 13)),
3567: ("Python 3.13a1", VERSION(3, 13)),
3568: ("Python 3.13a1", VERSION(3, 13)),
3569: ("Python 3.13a5", VERSION(3, 13)),
3570: ("Python 3.13a6", VERSION(3, 13)),
3571: ("Python 3.13b1", VERSION(3, 13)),

# Python 3.14
3600: ("Python 3.14a1", VERSION(3, 14)),
3601: ("Python 3.14a1", VERSION(3, 14)),
3602: ("Python 3.14a1", VERSION(3, 14)),
3603: ("Python 3.14a1", VERSION(3, 14)),
3604: ("Python 3.14a1", VERSION(3, 14)),
3605: ("Python 3.14a1", VERSION(3, 14)),
3606: ("Python 3.14a1", VERSION(3, 14)),
3607: ("Python 3.14a1", VERSION(3, 14)),
3608: ("Python 3.14a1", VERSION(3, 14)),
3609: ("Python 3.14a2", VERSION(3, 14)),
}

# Dictionnary which associate the pyc signature (4-byte long string)
Expand Down

0 comments on commit e2646f7

Please sign in to comment.