[issue11286] Some "trivial" python 2.x pickles fails to load in Python 3.2

Alexander Belopolsky report at bugs.python.org
Wed Feb 23 23:00:24 CET 2011


Alexander Belopolsky <belopolsky at users.sourceforge.net> added the comment:

I am attaching a new version of issue11286.diff which fixes the issue by removing special handling of n == 0 case from _Unpickler_Read().  Note that _Unpickler_Read() (formerly known as unpickler_read()) only started to return null pointer instead of a pointer to an empty string when given n == 0 after optimizations implemented in issue #9410.  This observation makes me more comfortable with changing the behavior of this function because current behavior is itself a regression from 3.1.

(An off-topic remark:  What was the point of renaming static functions in _pickle.c made in r84653?  There is no need to prefix static C functions with an underscore to make them private and the convention seems to be not to use CamelCase in the names of non-CAPI functions.)

----------
stage: patch review -> commit review
Added file: http://bugs.python.org/file20870/issue11286.diff

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue11286>
_______________________________________


More information about the Python-bugs-list mailing list