You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2021/03/04 06:51:14 UTC

[GitHub] [arrow] dmyersturnbull opened a new issue #9628: write_feather incorrectly deletes files

dmyersturnbull opened a new issue #9628:
URL: https://github.com/apache/arrow/issues/9628


   
   I'm happy to fill this out on Jira and/or to submit a pull request.
   I just can't log in to the Jira right now -- as soon as I log in it "forgets".
   
   Two related issues about [write_feather](https://github.com/apache/arrow/blob/b8b44197866242aa1fec6a7f76e3e1005ac3c6de/python/pyarrow/feather.py#L119).
   
   #### pathlib
   `write_feather` could accept a `pathlib.PurePath` since Python 3.6+ is already required.
   
   #### files are deleted
   
   On error, write_feather will delete a file that already existed.
   
   Suppose some code is supposed to read `myfile.feather`, update it, and write it back.
   If the writer throws an error, the original copy of `myfile.feather` is deleted.
   [Here's the culprit](https://github.com/apache/arrow/blob/b8b44197866242aa1fec6a7f76e3e1005ac3c6de/python/pyarrow/feather.py#L185).
   
   
   ```python
       except Exception:
           if isinstance(dest, str):
               try:
                   os.remove(dest)
               except os.error:
                   pass
           raise
   ```python
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [arrow] emkornfield closed issue #9628: write_feather incorrectly deletes files

Posted by GitBox <gi...@apache.org>.
emkornfield closed issue #9628:
URL: https://github.com/apache/arrow/issues/9628


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [arrow] emkornfield commented on issue #9628: write_feather incorrectly deletes files

Posted by GitBox <gi...@apache.org>.
emkornfield commented on issue #9628:
URL: https://github.com/apache/arrow/issues/9628#issuecomment-791183396


   First one seems reasonable to me.
   
   Second one, I'm not sure about it.  This seems intentional: https://github.com/apache/arrow/commit/96f3d6176d8c95717f4ff45e4226161de3168b05 but this could be revisited (maybe discuss on dev@ mailing list before investing time to fix)
   
   Please open JIRAs for each when you get  chance.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [arrow] emkornfield commented on issue #9628: write_feather incorrectly deletes files

Posted by GitBox <gi...@apache.org>.
emkornfield commented on issue #9628:
URL: https://github.com/apache/arrow/issues/9628#issuecomment-800782168


   @dmyersturnbull going to close this for now.  I think JIRA/PRs would be a good place to follow up on the discussion.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org