gh-141510: Change marshal version to 6 (#145551)

Fix SliceTestCase: test also that version 4 fails with ValueError.
This commit is contained in:
Victor Stinner 2026-03-06 10:23:11 +01:00 committed by GitHub
parent c3fb0d9d96
commit 4fce98a920
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 29 additions and 5 deletions

View file

@ -580,6 +580,12 @@ w_complex_object(PyObject *v, char flag, WFILE *p)
Py_ssize_t pos;
PyObject *key, *value;
if (PyFrozenDict_CheckExact(v)) {
if (p->version < 6) {
w_byte(TYPE_UNKNOWN, p);
p->error = WFERR_UNMARSHALLABLE;
return;
}
W_TYPE(TYPE_FROZENDICT, p);
}
else {