[ 
https://issues.apache.org/jira/browse/ARROW-1893?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16280966#comment-16280966
 ] 

ASF GitHub Bot commented on ARROW-1893:
---------------------------------------

wesm opened a new pull request #1398: ARROW-1893: [Python] Convert memoryview 
to bytes when loading from pickle in Python 2.7
URL: https://github.com/apache/arrow/pull/1398
 
 
   It seems somewhere in the 2.7.x series, Python 2.7 acquired the ability to 
load from memoryview. To be on the safe side, we'll always convert memoryview 
to bytes. Here's a related workaround from IPython:
   
   
https://github.com/ipython/ipython_genutils/blob/master/ipython_genutils/py3compat.py#L153

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


> [Python] test_primitive_serialization fails on Python 2.7.3
> -----------------------------------------------------------
>
>                 Key: ARROW-1893
>                 URL: https://issues.apache.org/jira/browse/ARROW-1893
>             Project: Apache Arrow
>          Issue Type: Bug
>            Reporter: Uwe L. Korn
>            Assignee: Wes McKinney
>              Labels: pull-request-available
>             Fix For: 0.8.0
>
>
> {{test_primitive_serialization}} fails on with the following error: Python 
> 2.7.3
> {code}
> str = <memory at 0x44dff28>
>  
>      def loads(str):
>  >       file = StringIO(str)
> E       TypeError: expected read buffer, memoryview found
> {code}
> More context:
> {code}
>      def test_primitive_serialization(large_memory_map):
>          with pa.memory_map(large_memory_map, mode="r+") as mmap:
>              for obj in PRIMITIVE_OBJECTS:
>                  serialization_roundtrip(obj, mmap)
> >               serialization_roundtrip(obj, mmap, 
> > pa.pandas_serialization_context)
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to