[issue32011] Restore loading of TYPE_INT64 in marshal

Serhiy Storchaka report at bugs.python.org
Sun Nov 12 12:50:16 EST 2017


New submission from Serhiy Storchaka <storchaka+cpython at gmail.com>:

TYPE_INT64 is supported in the marshal module since Python 1.5. Since its use causes instability of marhalled files produced on different platforms, the marshal module in Python 3.3 no longer use it when write new files (see issue15466). And in Python 3.4 it stopped reading files containing the TYPE_INT64 code (see issue15480).

This is backward incompatible change. Python 2.7 still produce files containing the TYPE_INT64 code (though this code is rare, because integers in ranges -9223372036854775808..-2147483649 and 2147483648..9223372036854775807 are rare), and there may be marshal files produced by older versions of Python 3, Python 2 and Python 1. Formally Python 3 supports marshal formats produced by all previous versions, except the code objects and the TYPE_INT64 code.

Supporting loading the TYPE_INT64 code don't create problems like using it for saving data. But it is needed for backward compatibility.

I think that removing the TYPE_INT64 code was a mistake.

----------
assignee: serhiy.storchaka
components: Extension Modules
messages: 306128
nosy: serhiy.storchaka
priority: normal
severity: normal
status: open
title: Restore loading of TYPE_INT64 in marshal
type: behavior
versions: Python 3.6, Python 3.7

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue32011>
_______________________________________


More information about the Python-bugs-list mailing list