This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Ramchandra Apte
Recipients Ramchandra Apte, alexandre.vassalotti, pitrou, sbt
Date 2011-12-09.14:23:58
SpamBayes Score 5.0699828e-06
Marked as misclassified No
Message-id <1323440639.5.0.00598237235239.issue13566@psf.upfronthosting.co.za>
In-reply-to
Content
The problem is that pickle is calling array.array(u'i',[1,2,3]) and array.array in Python 2 doesn't allow unicode strings as a typecode (typecode is the first argument)

The docs in Python 2 and Py3k doesn't specify the type of the typecode argument of array.array.
In Python 2 it seems that typecode has to be a bytes string.
In Python 3 it seems that typecode has to be a unicode string.

I suggest that array.array be changed in Python 2 to allow unicode strings as a typecode or that pickle detects array.array being called and fixes the call.
History
Date User Action Args
2011-12-09 14:23:59Ramchandra Aptesetrecipients: + Ramchandra Apte, pitrou, alexandre.vassalotti, sbt
2011-12-09 14:23:59Ramchandra Aptesetmessageid: <1323440639.5.0.00598237235239.issue13566@psf.upfronthosting.co.za>
2011-12-09 14:23:58Ramchandra Aptelinkissue13566 messages
2011-12-09 14:23:58Ramchandra Aptecreate