[File] [PATCH] python: Add magic values for Python 3.12+

Michał Górny mgorny at gentoo.org
Sun Jun 16 14:37:37 UTC 2024


That said, I wonder if there is a way to avoid having to extend that
version tree further.  Apparently, upstream says:

> Starting with Python 3.11, Python 3.n starts with magic number 2900+50n.
---
 magic/Magdir/python | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/magic/Magdir/python b/magic/Magdir/python
index 00d90d12..af126948 100644
--- a/magic/Magdir/python
+++ b/magic/Magdir/python
@@ -217,7 +217,11 @@
 >>>>>>0		uleshort	<3450		CPython 3.10,
 >>>>>>0		default		x
 >>>>>>>0	uleshort	<3500		CPython 3.11,
->>>>>>>0	default		x		CPython 3.12 or newer,
+>>>>>>>0	default		x
+>>>>>>>>0	uleshort	<3550		CPython 3.12,
+>>>>>>>>0	default		x
+>>>>>>>>>0	uleshort	<3600		CPython 3.13,
+>>>>>>>>>0	default		x		CPython 3.14 or newer,
 >>>0		use		pyc-pep552
 >>0		uleshort	240		Byte-compiled Python module for PyPy3.7,
 !:mime application/x-bytecode.python
-- 
2.45.2



More information about the File mailing list