fix(python): pin only the 3.14 and 3.15 magics checked locally

Keep magic 3627 (CPython 3.14.6) and 3666 (CPython 3.15.0b3), whose code
layout and inline-cache tables match those interpreters' opcode tables and
whose decoded code objects match marshal.loads across a stdlib sample. Leave
the 3.15.0a8 magic 3663 unpinned, since no 3.15.0a8 interpreter was available
to check it, and regenerate the 3.15 slice fixture with 3.15.0b3.

Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
This commit is contained in:
gensokyo-devandgensokyo-dev authored and Ysopwnable committed 2026-11-14 13:37:55 +01:00
1 parent 1d08253ff2
commit 9d3eb083dd
7 files changed
+108 -148

No files matched your search

+1 -6
View File
@@ -88,15 +88,10 @@ it("keeps pinned CPython identity separate from standalone marshal coverage", ()
pythonVersion: "3.15",
headerBytes: 16,
});
expect(pythonBytecodeIdentity(3663)).toEqual({
pythonVersion: "3.15",
headerBytes: 16,
});
expect(pythonPycMarshalProfile(3663)?.code_layout).toBe("py311");
expect(pythonPycMarshalProfile(3666)?.code_layout).toBe("py311");
// Only magics checked against real CPython are pinned: the neighbouring
// 3.14 and 3.15 pre-release magics and the 3.16 magics stay unknown.
for (const magic of [3600, 3626, 3650, 3662, 3664, 3665, 3706]) {
for (const magic of [3600, 3626, 3650, 3662, 3663, 3664, 3665, 3706]) {
expect(pythonBytecodeIdentity(magic), String(magic)).toBeNull();
expect(pythonPycMarshalProfile(magic), String(magic)).toBeNull();
}