From e2646f79876b367e7e3690dcd4ccac31415c9138 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Thu, 19 Dec 2024 14:55:31 +0100 Subject: [PATCH] Python: Add newer magic numbers --- hachoir/parser/program/python.py | 62 ++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) diff --git a/hachoir/parser/program/python.py b/hachoir/parser/program/python.py index 8a5fd79c..19197a9f 100644 --- a/hachoir/parser/program/python.py +++ b/hachoir/parser/program/python.py @@ -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)), @@ -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)), @@ -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)), @@ -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)