[jira] [Comment Edited] (ARROW-2816) [Python] Add __iter__ method to NativeFile

2018-07-11 Thread Dimitri Vorona (JIRA)


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

Dimitri Vorona edited comment on ARROW-2816 at 7/11/18 8:06 AM:


-On a unrelated note: is it normal that I don't receive notification emails if 
someone posts a comment to an issue I'm watching? The issue creation emails 
arrive just fine...-

 

Disregard that, I think I have it now.


was (Author: alendit):
On a unrelated note: is it normal that I don't receive notification emails if 
someone posts a comment to an issue I'm watching? The issue creation emails 
arrive just fine...

> [Python] Add __iter__ method to NativeFile
> --
>
> Key: ARROW-2816
> URL: https://issues.apache.org/jira/browse/ARROW-2816
> Project: Apache Arrow
>  Issue Type: Improvement
>  Components: Python
>Reporter: Wes McKinney
>Priority: Major
> Fix For: 0.10.0
>
>
> Copied from https://github.com/apache/arrow/issues/2114
> {code}
> Currently, NativeFile does not pass the check of pandas for being a 
> "file-like" object because it does not have __iter__ method. It can be easily 
> added using code from native python io module as a reference. Another way 
> would be to subclass io.IOBase.
> The exact code of pandas check can be found here.
> Code for __iter__ method and io.IOBase can be found here.
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Comment Edited] (ARROW-2816) [Python] Add __iter__ method to NativeFile

2018-07-11 Thread Dimitri Vorona (JIRA)


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

Dimitri Vorona edited comment on ARROW-2816 at 7/11/18 7:36 AM:


Antoine, are you sure? I maybe missunderstand [the 
docs|http://cython.readthedocs.io/en/latest/src/userguide/extension_types.html#subclassing]
 but I think you can only inherit from other extension (i.e. Cython) classes or 
built-in types. At least I couldn't get it working. The other way around works 
fine, of course.


was (Author: alendit):
Antoine, are you sure? I maybe missunderstand [the 
docs|http://cython.readthedocs.io/en/latest/src/userguide/extension_types.html#subclassing]
 but I think you can only inherit from other extension (i.e. Cython) classes or 
built-in types. The other way around works fine, of course.

> [Python] Add __iter__ method to NativeFile
> --
>
> Key: ARROW-2816
> URL: https://issues.apache.org/jira/browse/ARROW-2816
> Project: Apache Arrow
>  Issue Type: Improvement
>  Components: Python
>Reporter: Wes McKinney
>Priority: Major
> Fix For: 0.10.0
>
>
> Copied from https://github.com/apache/arrow/issues/2114
> {code}
> Currently, NativeFile does not pass the check of pandas for being a 
> "file-like" object because it does not have __iter__ method. It can be easily 
> added using code from native python io module as a reference. Another way 
> would be to subclass io.IOBase.
> The exact code of pandas check can be found here.
> Code for __iter__ method and io.IOBase can be found here.
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Comment Edited] (ARROW-2816) [Python] Add __iter__ method to NativeFile

2018-07-11 Thread Dimitri Vorona (JIRA)


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

Dimitri Vorona edited comment on ARROW-2816 at 7/11/18 7:31 AM:


Antoine, are you sure? I maybe missunderstand [the 
docs|[http://cython.readthedocs.io/en/latest/src/userguide/extension_types.html#subclassing]]
 but I think you can only inherit from other extension (i.e. Cython) classes or 
built-in types. The other way around works fine, of course.


was (Author: alendit):
Antoine, are you sure? I maybe missunderstand [the 
docs|[http://cython.readthedocs.io/en/latest/src/userguide/extension_types.html#subclassing],]
 but I think you can only inherit from other extension (i.e. Cython) classes or 
built-in types. The other way around works fine, of course.

> [Python] Add __iter__ method to NativeFile
> --
>
> Key: ARROW-2816
> URL: https://issues.apache.org/jira/browse/ARROW-2816
> Project: Apache Arrow
>  Issue Type: Improvement
>  Components: Python
>Reporter: Wes McKinney
>Priority: Major
> Fix For: 0.10.0
>
>
> Copied from https://github.com/apache/arrow/issues/2114
> {code}
> Currently, NativeFile does not pass the check of pandas for being a 
> "file-like" object because it does not have __iter__ method. It can be easily 
> added using code from native python io module as a reference. Another way 
> would be to subclass io.IOBase.
> The exact code of pandas check can be found here.
> Code for __iter__ method and io.IOBase can be found here.
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Comment Edited] (ARROW-2816) [Python] Add __iter__ method to NativeFile

2018-07-11 Thread Dimitri Vorona (JIRA)


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

Dimitri Vorona edited comment on ARROW-2816 at 7/11/18 7:31 AM:


Antoine, are you sure? I maybe missunderstand [the 
docs|http://cython.readthedocs.io/en/latest/src/userguide/extension_types.html#subclassing]
 but I think you can only inherit from other extension (i.e. Cython) classes or 
built-in types. The other way around works fine, of course.


was (Author: alendit):
Antoine, are you sure? I maybe missunderstand [the 
docs|[http://cython.readthedocs.io/en/latest/src/userguide/extension_types.html#subclassing]]
 but I think you can only inherit from other extension (i.e. Cython) classes or 
built-in types. The other way around works fine, of course.

> [Python] Add __iter__ method to NativeFile
> --
>
> Key: ARROW-2816
> URL: https://issues.apache.org/jira/browse/ARROW-2816
> Project: Apache Arrow
>  Issue Type: Improvement
>  Components: Python
>Reporter: Wes McKinney
>Priority: Major
> Fix For: 0.10.0
>
>
> Copied from https://github.com/apache/arrow/issues/2114
> {code}
> Currently, NativeFile does not pass the check of pandas for being a 
> "file-like" object because it does not have __iter__ method. It can be easily 
> added using code from native python io module as a reference. Another way 
> would be to subclass io.IOBase.
> The exact code of pandas check can be found here.
> Code for __iter__ method and io.IOBase can be found here.
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)