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


Groups > comp.lang.python > #92436

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

Path csiph.com!usenet.pasdenom.info!nntpfeed.proxad.net!proxad.net!feeder1-2.proxad.net!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!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; 'diff': 0.05; 'lines.': 0.07; 'dict': 0.09; 'objects.': 0.09; 'repr': 0.09; 'cc:addr :python-list': 0.10; 'wed,': 0.15; 'output': 0.15; '4:25': 0.16; 'commented': 0.16; 'compares': 0.16; 'compatible.': 0.16; 'reedy': 0.16; 'subject:make': 0.16; 'two,': 0.16; 'uses,': 0.16; "{'a':": 0.16; 'wrote:': 0.16; 'string': 0.17; 'comparing': 0.18; 'differ': 0.18; 'tests': 0.18; '>>>': 0.20; 'compare': 0.20; 'issue.': 0.20; 'cc:2**0': 0.21; 'cc:addr:python.org': 0.21; 'subject:request': 0.22; 'text,': 0.22; '2015': 0.23; '(like': 0.23; 'changes,': 0.23; 'header:In-Reply-To:1': 0.24; 'written': 0.24; 'sort': 0.25; 'testing': 0.25; 'message-id:@mail.gmail.com': 0.28; 'subject:/': 0.29; 'boundaries': 0.29; 'etc.).': 0.29; 'terry': 0.29; 'objects': 0.29; 'server.': 0.30; 'code': 0.31; 'structure': 0.32; 'problem': 0.33; 'equal': 0.34; 'server': 0.34; 'received:google.com': 0.34; 'along': 0.35; 'formats': 0.35; 'strongly': 0.35; 'but': 0.36; 'text': 0.36; 'except': 0.36; 'possible.': 0.36; 'there': 0.36; 'two': 0.37; 'should': 0.37; 'client': 0.37; 'subject:: ': 0.37; 'difference': 0.38; 'rather': 0.38; 'version': 0.38; 'is,': 0.38; 'pm,': 0.39; 'test': 0.39; 'enough': 0.39; 'easily': 0.39; 'data': 0.40; 'providing': 0.61; 'different': 0.64; 'other.': 0.64; 'between': 0.65; 'guaranteed': 0.67; 'subject:read': 0.84; 'subject:write': 0.84; 'responses': 0.93; 'imagine': 0.96
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; bh=xzIig2Yqbmd5xTL6tBKam5wROtXanIfVtn2ifJKjQts=; b=pBsMHPokfgopEEX3GNgvUZOb6nYu8GTGg/trUg2XEXWO9KuDb41lUQmJaH3V4VErzh Dib2hsm0qH2piQSppGyWVFJVlLjxAX4Lks5pVtO1EZe6aUJuzUpb7WIiiK8fRVzqu1fC kEyemeWFPZQfhKpYjMnkB5xXc7S0ZNLiuL+k+XigerAbd00GGTjmNFKanQIiZa3zazf7 WOQZ5CeHNDMDh8XsSt/VVXcomfwdVncuWbE+g2iKT9pFWxSehodByK45FhA2JMoWBMxU zeBCprS23cZjRjJHRzanGHarCLAjsXh1EEY+d88ImMX1vOt4rddl1XAnt2hoikVvalRL BQ0w==
X-Received by 10.180.94.168 with SMTP id dd8mr23611505wib.76.1433980961943; Wed, 10 Jun 2015 17:02:41 -0700 (PDT)
MIME-Version 1.0
In-Reply-To <mlai96$eot$2@ger.gmane.org>
References <ml7a2p$hp$1@ger.gmane.org> <CAMw+j7K7JmRPo3PnzTE2rZEstdZRF085+VA=v1ieMMHk2Gp6mQ@mail.gmail.com> <CABicbJ+e02OKYi48kbjFFutyLUGgkEQdiPZqiB657AO+QKu11Q@mail.gmail.com> <mailman.325.1433891190.13271.python-list@python.org> <55778208$0$2899$e4fe514c@news2.news.xs4all.nl> <mailman.328.1433897321.13271.python-list@python.org> <5577b46d$0$12975$c3e8da3$5496439d@news.astraweb.com> <mailman.332.1433911768.13271.python-list@python.org> <5578053a$0$11102$c3e8da3@news.astraweb.com> <CABicbJJFURk+kwUO-wz8K5ZXY5TYUpqor1DLr0T30PaLkW5w4A@mail.gmail.com> <mlah2i$f7$1@ger.gmane.org> <CABicbJL5EqxTasVMb8yALSSss5xexf=9_7i-BhC2t5a-TxRCFA@mail.gmail.com> <mlai96$eot$2@ger.gmane.org>
From Devin Jeanpierre <jeanpierreda@gmail.com>
Date Wed, 10 Jun 2015 17:02:01 -0700
Subject Re: enhancement request: make py3 read/write py2 pickle format
To Terry Reedy <tjreedy@udel.edu>
Cc "comp.lang.python" <python-list@python.org>
Content-Type text/plain; charset=UTF-8
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.369.1433980969.13271.python-list@python.org> (permalink)
Lines 45
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1433980969 news.xs4all.nl 2896 [2001:888:2000:d::a6]:56236
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:92436

Show key headers only | View raw


On Wed, Jun 10, 2015 at 4:46 PM, Terry Reedy <tjreedy@udel.edu> wrote:
> On 6/10/2015 7:39 PM, Devin Jeanpierre wrote:
>>
>> On Wed, Jun 10, 2015 at 4:25 PM, Terry Reedy <tjreedy@udel.edu> wrote:
>>>
>>> On 6/10/2015 6:10 PM, Devin Jeanpierre wrote:
>>>
>>>> The problem is that there are two different ways repr might write out
>>>> a dict equal to {'a': 1, 'b': 2}. This can make tests brittle
>
>
> You commented about *tests*
>
>>> Not if one compares objects rather than string representations of
>>> objects.
>>> I am strongly of the view that code and tests should be written to
>>> directly
>>> compare objects as much as possible.
>
>
> I responded about *tests*
>
>> For serialization formats that always output the same string for the
>> same data (like text format protos), there is no practical difference
>> between the two, except that if you're comparing text, you can easily
>> supply a diff to update one to match the other.
>
>
> Serialization is a different issue.

Yes, tests of code that uses serialization (caching, RPCs, etc.).

I mentioned above a sort of test that divides tests of a client and
server along RPC boundaries by providing fake queries and responses,
and testing that those are the queries and responses given by the
client and server. This way you don't need to actually start the
client and server to test them both and their interactions. This is
one example, there are other uses, but they go along the same lines.
For example, one can also imagine testing that a serialized structure
is identical across version changes, so that it's guaranteed to be
forwards/backwards compatible. It is not enough to test that the
deserialized form is, because it might differ substantially, as long
as the communicated serialized structure is the same.

-- Devin

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


Thread

Re: enhancement request: make py3 read/write py2 pickle format Chris Angelico <rosuav@gmail.com> - 2015-06-10 09:06 +1000
  Re: enhancement request: make py3 read/write py2 pickle format Irmen de Jong <irmen.NOSPAM@xs4all.nl> - 2015-06-10 02:17 +0200
    Re: enhancement request: make py3 read/write py2 pickle format Devin Jeanpierre <jeanpierreda@gmail.com> - 2015-06-09 17:47 -0700
      Re: enhancement request: make py3 read/write py2 pickle format Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-06-10 13:52 +1000
        Re: enhancement request: make py3 read/write py2 pickle format random832@fastmail.us - 2015-06-09 23:57 -0400
          Re: enhancement request: make py3 read/write py2 pickle format Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-06-10 15:43 +1000
        Re: enhancement request: make py3 read/write py2 pickle format Chris Angelico <rosuav@gmail.com> - 2015-06-10 14:00 +1000
        Re: enhancement request: make py3 read/write py2 pickle format Devin Jeanpierre <jeanpierreda@gmail.com> - 2015-06-09 21:48 -0700
          Re: enhancement request: make py3 read/write py2 pickle format Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-06-10 19:36 +1000
            Re: enhancement request: make py3 read/write py2 pickle format Irmen de Jong <irmen.NOSPAM@xs4all.nl> - 2015-06-10 19:34 +0200
            Re: enhancement request: make py3 read/write py2 pickle format Devin Jeanpierre <jeanpierreda@gmail.com> - 2015-06-10 15:10 -0700
              Re: enhancement request: make py3 read/write py2 pickle format Steven D'Aprano <steve@pearwood.info> - 2015-06-11 13:21 +1000
                Re: enhancement request: make py3 read/write py2 pickle format Devin Jeanpierre <jeanpierreda@gmail.com> - 2015-06-10 22:39 -0700
                Re: enhancement request: make py3 read/write py2 pickle format Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-06-11 19:20 +1000
            Re: enhancement request: make py3 read/write py2 pickle format Terry Reedy <tjreedy@udel.edu> - 2015-06-10 19:25 -0400
            Re: enhancement request: make py3 read/write py2 pickle format Devin Jeanpierre <jeanpierreda@gmail.com> - 2015-06-10 16:39 -0700
            Re: enhancement request: make py3 read/write py2 pickle format Devin Jeanpierre <jeanpierreda@gmail.com> - 2015-06-10 16:48 -0700
            Re: enhancement request: make py3 read/write py2 pickle format Terry Reedy <tjreedy@udel.edu> - 2015-06-10 19:46 -0400
            Re: enhancement request: make py3 read/write py2 pickle format Chris Angelico <rosuav@gmail.com> - 2015-06-11 09:58 +1000
            Re: enhancement request: make py3 read/write py2 pickle format Devin Jeanpierre <jeanpierreda@gmail.com> - 2015-06-10 17:02 -0700
              Re: enhancement request: make py3 read/write py2 pickle format Marko Rauhamaa <marko@pacujo.net> - 2015-06-11 07:08 +0300
            Re: enhancement request: make py3 read/write py2 pickle format Serhiy Storchaka <storchaka@gmail.com> - 2015-06-11 14:11 +0300
    Re: enhancement request: make py3 read/write py2 pickle format Chris Angelico <rosuav@gmail.com> - 2015-06-10 11:03 +1000

csiph-web