Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #92393

Re: enhancement request: make py3 read/write py2 pickle format

Path csiph.com!usenet.pasdenom.info!news.redatomik.org!newsfeed.xs4all.nl!newsfeed2a.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <python-python-list@m.gmane.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.004
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; 'versions.': 0.07; 'backwards': 0.09; 'eat': 0.09; 'executes': 0.09; 'objects.': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'storage.': 0.09; '\xe2\x80\x94': 0.09; 'compatible.': 0.16; 'py3': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'subject:make': 0.16; 'unsafe': 0.16; 'wrote:': 0.16; 'language': 0.19; 'essential': 0.20; 'environments': 0.22; 'subject:request': 0.22; 'programming': 0.23; 'code,': 0.23; '2015': 0.23; 'header :User-Agent:1': 0.26; 'header:X-Complaints-To:1': 0.26; 'chris': 0.26; 'subject:/': 0.29; 'pickle': 0.29; 'certainly': 0.31; 'anyone': 0.32; 'language.': 0.32; 'instead,': 0.33; 'languages': 0.34; 'file': 0.34; 'could': 0.35; 'to:addr:python-list': 0.35; 'formats': 0.35; 'protocol': 0.35; 'something': 0.35; "isn't": 0.35; 'there': 0.36; 'should': 0.37; 'subject:: ': 0.37; 'delete': 0.37; 'tue,': 0.38; 'received:org': 0.38; 'someone': 0.38; 'files': 0.38; 'or,': 0.38; 'means': 0.39; 'pm,': 0.39; 'to:addr:python.org': 0.39; 'data': 0.40; 'your': 0.60; 'safe': 0.63; 'else.': 0.66; 'believe': 0.67; 'becker': 0.84; 'subject:read': 0.84; 'subject:write': 0.84; 'who,': 0.84; 'received:139': 0.91
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From Neal Becker <ndbecker2@gmail.com>
Subject Re: enhancement request: make py3 read/write py2 pickle format
Date Wed, 10 Jun 2015 07:04:33 -0400
References <ml7a2p$hp$1@ger.gmane.org> <CAMw+j7K7JmRPo3PnzTE2rZEstdZRF085+VA=v1ieMMHk2Gp6mQ@mail.gmail.com>
Mime-Version 1.0
Content-Type text/plain; charset="UTF-8"
Content-Transfer-Encoding 8Bit
X-Gmane-NNTP-Posting-Host exa2-in-fw-01-epn.hns.com
User-Agent KNode/4.14.7
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.20+
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.336.1433934285.13271.python-list@python.org> (permalink)
Lines 28
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1433934285 news.xs4all.nl 2932 [2001:888:2000:d::a6]:53397
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:92393

Show key headers only | View raw


Chris Warrick wrote:

> On Tue, Jun 9, 2015 at 8:08 PM, Neal Becker <ndbecker2@gmail.com> wrote:
>> One of the most annoying problems with py2/3 interoperability is that the
>> pickle formats are not compatible.  There must be many who, like myself,
>> often use pickle format for data storage.
>>
>> It certainly would be a big help if py3 could read/write py2 pickle
>> format. You know, backward compatibility?
> 
> Don’t use pickle. It’s unsafe — it executes arbitrary code, which
> means someone can give you a pickle file that will delete all your
> files or eat your cat.
> 
> Instead, use a safe format that has no ability to execute code, like
> JSON. It will also work with other programming languages and
> environments if you ever need to talk to anyone else.
> 
> But, FYI: there is backwards compatibility if you ask for it, in the
> form of protocol versions. That’s all you should know — again, don’t
> use pickle.
> 

I believe a good native serialization system is essential for any modern 
programming language.  If pickle isn't it, we need something else that can 
serialize all language objects.  Or, are you saying, it's impossible to do 
this safely?

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: enhancement request: make py3 read/write py2 pickle format Neal Becker <ndbecker2@gmail.com> - 2015-06-10 07:04 -0400

csiph-web