Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #92369
| Path | csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <jeanpierreda@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.002 |
| X-Spam-Evidence | '*H*': 1.00; '*S*': 0.00; 'classes.': 0.07; 'versions.': 0.07; 'backwards': 0.09; 'eat': 0.09; 'executes': 0.09; 'storage.': 0.09; 'subtle': 0.09; '\xe2\x80\x94': 0.09; 'cc:addr:python-list': 0.10; 'instead.': 0.15; 'output': 0.15; 'buffers,': 0.16; 'compatible.': 0.16; 'new-style': 0.16; 'old- style': 0.16; 'py3': 0.16; 'subject:make': 0.16; 'unsafe': 0.16; 'wrote:': 0.16; 'switched': 0.18; 'cc:addr:python.org': 0.21; 'cc:2**1': 0.22; 'environments': 0.22; 'subject:request': 0.22; 'programming': 0.23; 'am,': 0.23; 'code,': 0.23; 'bit': 0.23; '2015': 0.23; 'header:In-Reply-To:1': 0.24; 'cc:addr:gmail.com': 0.24; 'properties': 0.24; 'chris': 0.26; 'message- id:@mail.gmail.com': 0.28; 'subject:/': 0.29; 'pickle': 0.29; 'certainly': 0.31; 'e.g.': 0.31; 'url:mailman': 0.31; 'up.': 0.32; 'anyone': 0.32; 'url:python': 0.33; 'instead,': 0.33; 'languages': 0.34; 'file': 0.34; 'received:google.com': 0.34; 'url:listinfo': 0.35; 'could': 0.35; 'formats': 0.35; 'protocol': 0.35; 'something': 0.35; 'text': 0.36; 'url:org': 0.36; 'there': 0.36; 'should': 0.37; 'agree': 0.37; 'subject:: ': 0.37; 'delete': 0.37; 'tue,': 0.38; 'someone': 0.38; 'files': 0.38; 'means': 0.39; 'pm,': 0.39; 'data': 0.40; 'your': 0.60; 'more': 0.62; 'safe': 0.63; 'else.': 0.66; 'becker': 0.84; 'subject:read': 0.84; 'subject:write': 0.84; 'who,': 0.84; 'canonical': 0.91 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=myfS+qlDK1cYBGz6HOkwHIN57ax8osaNmRrxyGmi1G8=; b=RgOymUnozskC9W3cr848Skses6sTmE5MIFmxPUk/lEidm1v7QtxsF0gDvMhmGC+IIJ Sxy1Jst82V1Q6BE1KU9e20mrwbt4w773teUdTC9E5BNgV9Os9tEr7UY9ycVn3Bkc82/+ lWv/aM7Diz1QX+1CkVcEf9vBciC65ej0IA9B3aSqDUnjQZHYhmHf9bhHCP7iCCbFhTTz oij6DWPt88HvBs4UQBEb/26mYJlO/s6x0HcsGMg/i16u/+nKbi5Vo5XU1iBlVYGxkMlk RmQo9dX1ydcChGEYhFVWxGCs1P9Ty5NyR5lZ/slvS6zzsIpS/wpPZMuTVekrhct+ph23 7vuw== |
| X-Received | by 10.194.172.130 with SMTP id bc2mr45911664wjc.85.1433880486725; Tue, 09 Jun 2015 13:08:06 -0700 (PDT) |
| MIME-Version | 1.0 |
| In-Reply-To | <CAMw+j7K7JmRPo3PnzTE2rZEstdZRF085+VA=v1ieMMHk2Gp6mQ@mail.gmail.com> |
| References | <ml7a2p$hp$1@ger.gmane.org> <CAMw+j7K7JmRPo3PnzTE2rZEstdZRF085+VA=v1ieMMHk2Gp6mQ@mail.gmail.com> |
| From | Devin Jeanpierre <jeanpierreda@gmail.com> |
| Date | Tue, 9 Jun 2015 13:07:26 -0700 |
| Subject | Re: enhancement request: make py3 read/write py2 pickle format |
| To | Chris Warrick <kwpolska@gmail.com> |
| Cc | Neal Becker <ndbecker2@gmail.com>, "comp.lang.python" <python-list@python.org> |
| Content-Type | text/plain; charset=UTF-8 |
| Content-Transfer-Encoding | quoted-printable |
| 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.322.1433880494.13271.python-list@python.org> (permalink) |
| Lines | 40 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1433880494 news.xs4all.nl 2968 [2001:888:2000:d::a6]:34908 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:92369 |
Show key headers only | View raw
There's a lot of subtle issues with pickle compatibility. e.g. old-style vs new-style classes. It's kinda hard and it's better to give up. I definitely agree it's better to use something else instead. For example, we switched to using protocol buffers, which have much better compatibility properties and are a bit more testable to boot (since text format protobufs are always output in a canonical (sorted) form.) -- Devin On Tue, Jun 9, 2015 at 11:35 AM, Chris Warrick <kwpolska@gmail.com> 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. > > -- > Chris Warrick <https://chriswarrick.com/> > PGP: 5EAAEA16 > -- > https://mail.python.org/mailman/listinfo/python-list
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: enhancement request: make py3 read/write py2 pickle format Devin Jeanpierre <jeanpierreda@gmail.com> - 2015-06-09 13:07 -0700
csiph-web