Mark Dickinson <dicki...@gmail.com> added the comment:

Does anyone have time to review these patches?  I think the first is 
straightforward, and I'm reasonably sure of the correctness of the second 
patch.  I'm less sure that it's the right thing to do.  The question is 
what should happen when pickling an integer using the LONG opcode (pickle 
protocol 0).  The options are:

- append an 'L' on output in 3.x; accept input with and without trailing
  'L'.  This is what the patch does.  The only downside is the
  continuing presence of the 'L' in 3.x, which some might object to.

- don't append an 'L' on output in 3.x; accept input with and without
  trailing 'L'.  This would retain compatilbiity, but would mean that
  we can get different output *for the same opcode* with 2.x and 3.x.
  I don't think there's a precedent for this, but I can't see why it
  would be harmful.  Still, it seems safer not to do it.

- don't append an 'L' on output in 3.x, and reject input with a trailing
  'L' in 3.x.  This would make 3.x and 2.x pickles incompatible with
  each other, and breaks some tests.  Seems like a bad idea all around to
  me.

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue4842>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to