Received: by 10.68.222.225 with SMTP id qp1mr1120328pbc.8.1350039871501;
Fri, 12 Oct 2012 04:04:31 -0700 (PDT)
Path: s9ni2362pbb.0!nntp.google.com!npeer03.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!nx02.iad01.newshosting.com!newshosting.com!87.79.20.101.MISMATCH!newsreader4.netcologne.de!news.netcologne.de!xlned.com!feeder7.xlned.com!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path: <animelo...@gmail.com>
X-Original-To: python-l...@python.org
Delivered-To: python-l...@mail.python.org
X-Spam-Status: OK 0.007
X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'subject:skip:s 10': 0.05;
'constructor': 0.07; 'suppose': 0.07; 'python': 0.09; 'received
:mail-qc0-f174.google.com': 0.09; 'cc:addr:python-list': 0.10;
'(but': 0.15; '__version__': 0.16; 'argument.': 0.16;
'necessary).': 0.16; 'oct': 0.16; 'wrote:': 0.17; 'translate':
0.20; 'issue.': 0.20; 'defined': 0.22; 'cc:2**0': 0.23; 'cc:no
real name:2**0': 0.24; 'cc:addr:python.org': 0.25; 'header:In-
Reply-To:1': 0.25; 'guess': 0.27; 'wonder': 0.27; 'url:mailman':
0.29; 'objects': 0.29; 'class': 0.29; 'fri,': 0.30; 'expect':
0.31; 'code': 0.31; 'url:python': 0.32; '(2)': 0.32; 'could':
0.32; 'url:listinfo': 0.32; 'handle': 0.33; 'recommended': 0.33;
'version': 0.34; 'received:google.com': 0.34; 'protocol': 0.35;
'received:209.85': 0.35; 'there': 0.35; 'but': 0.36; 'message-
id:@gmail.com': 0.36; 'url:org': 0.36; 'useful': 0.36; 'charset
:us-ascii': 0.36; 'does': 0.37; 'received:209': 0.37;
'received:209.85.216': 0.37; 'data': 0.37; 'subject:: ': 0.38;
'header:Received:5': 0.40; 'url:mail': 0.40; 'easy': 0.60;
'further': 0.61; 'header:Message-Id:1': 0.62; 'received:96': 0.62;
'provide': 0.62; 'imagine': 0.96
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
h=date:from:to:cc:subject:message-id:in-reply-to:references:x-mailer
:mime-version:content-type:content-transfer-encoding;
bh=rPh1d+dQkYVgK6PthWf5Bbm/zLktjjRJusbs7UdLsms=;
b=06/ccpg6lvl0DJAZsFIAD5zfkSUvIFc9jxPT4tf2aW7JXdH84E7KoHsBoHdJiT7eVz
o+nJF0O+PhuSjZ4hMFsOh7HwPHTclbTs0Gl5WeSM+54Tz3EqVhI0LvN4V+5cAf4gAOsQ
nApihJTcwbVSXCoeWRZnaCqqi6oTi4T3GcaCkyfSa4njoMeTg3r63E34+2WQ1dgpsRQA
lkVVy0dFzGber2+5TOiDEGgJmLa4XupZS8Fx8wyRiPAriaxCmItHbdbwu9CNS4nma2Ci
vCBup7lRU8kDrJimHmVqwEocksNzDhuWG/xy+zsPE+gic2PgBOM7GULA2rUf8Bl2ZQF1
oJiA==
Date: Fri, 12 Oct 2012 07:04:37 -0400
From: Etienne Robillard <animelo...@gmail.com>
To: Neal Becker <ndbeck...@gmail.com>
Subject: Re: serialization and versioning
In-Reply-To: <k58s5q$vh...@ger.gmane.org>
References: <k58s5q$vh...@ger.gmane.org>
X-Mailer: Sylpheed 3.2.0 (GTK+ 2.24.10; i686-pc-linux-gnu)
Mime-Version: 1.0
Cc: python-l...@python.org
X-BeenThere: python-l...@python.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: General discussion list for the Python programming language
<python-list.python.org>
List-Unsubscribe: <http://mail.python.org/mailman/options/python-list>,
<mailto:python-list-requ...@python.org?subject=unsubscribe>
List-Archive: <http://mail.python.org/pipermail/python-list/>
List-Post: <mailto:python-l...@python.org>
List-Help: <mailto:python-list-requ...@python.org?subject=help>
List-Subscribe: <http://mail.python.org/mailman/listinfo/python-list>,
<mailto:python-list-requ...@python.org?subject=subscribe>
Newsgroups: comp.lang.python
Message-ID: <mailman.2082.1350039870.27098.python-l...@python.org>
Lines: 23
NNTP-Posting-Host: 2001:888:2000:d::a6
X-Trace: 1350039870 news.xs4all.nl 6842 [2001:888:2000:d::a6]:56769
X-Complaints-To: ab...@xs4all.nl
X-Received-Bytes: 4417
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
On Fri, 12 Oct 2012 06:42:03 -0400
Neal Becker <ndbeck...@gmail.com> wrote:
> I wonder if there is a recommended approach to handle this issue.
>
> Suppose objects of a class C are serialized using python standard pickling.
> Later, suppose class C is changed, perhaps by adding a data member and a new
> constructor argument.
>
> It would see the pickling protocol does not directly provide for this - but is
> there a recommended method?
>
> I could imagine that a class could include a class __version__ property that
> might be useful - although I would further expect that it would not have been
> defined in the original version of class C (but only as an afterthought when it
> became necessary).
>
> --
> http://mail.python.org/mailman/listinfo/python-list
i guess a easy answer is to say to try python 3.3 but how would this translate in
python (2) code ?