Message79908
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. |
|
Date |
User |
Action |
Args |
2009-01-15 18:04:29 | mark.dickinson | set | recipients:
+ mark.dickinson, rhettinger, pitrou, vstinner |
2009-01-15 18:04:28 | mark.dickinson | set | messageid: <1232042668.89.0.907426453228.issue4842@psf.upfronthosting.co.za> |
2009-01-15 18:04:27 | mark.dickinson | link | issue4842 messages |
2009-01-15 18:04:26 | mark.dickinson | create | |
|