A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2015-March/138792.html below:

[Python-Dev] backwards and forwards compatibility, the exact contents of pickle files, and IntEnum

[Python-Dev] backwards and forwards compatibility, the exact contents of pickle files, and IntEnumSerhiy Storchaka storchaka at gmail.com
Sun Mar 15 08:13:55 CET 2015
On 15.03.15 07:52, Ethan Furman wrote:
> So how do we fix it?  There are a couple different options:
>
>    - modify IntEnum pickle methods to return the name only
>
>    - modify IntEnum pickle methods to pickle just like the int they represent
>
> The first option has the advantage that in 3.4 and above, you'll get back the IntEnum version.
>
> The second option has the advantage that the actual pickle contents are the same [1] as in previous versions.
>
> So, the final question:  Do the contents of a pickle file at a certain protocol have to be the some between versions, or
> is it enough if unpickling them returns the correct object?

With the second option you lost the type even for 3.5+. This is a step back.


More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4