You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "Wes McKinney (Jira)" <ji...@apache.org> on 2019/09/30 17:03:00 UTC

[jira] [Updated] (ARROW-6740) [Python] Unable to delete closed MemoryMappedFile on Windows

     [ https://issues.apache.org/jira/browse/ARROW-6740?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Wes McKinney updated ARROW-6740:
--------------------------------
    Summary: [Python] Unable to delete closed MemoryMappedFile on Windows  (was: Unable to delete closed MemoryMappedFile on Windows)

> [Python] Unable to delete closed MemoryMappedFile on Windows
> ------------------------------------------------------------
>
>                 Key: ARROW-6740
>                 URL: https://issues.apache.org/jira/browse/ARROW-6740
>             Project: Apache Arrow
>          Issue Type: Bug
>          Components: Python
>    Affects Versions: 0.14.1
>         Environment: Windows 10
>            Reporter: Sergey Mozharov
>            Assignee: Antoine Pitrou
>            Priority: Major
>
> {code:java}
> import os
> import pyarrow as pa
> # Create a file and memory-map it
> file_name = 'path-to-a-new-file'
> mmap = pa.create_memory_map(file_name, 100)
> # or open an existing file
> # file_name = 'path-to-an-existing-file'
> # mmap = pa.memory_map(file_name)
> # close it
> mmap.close()
> mmap.closed  # True
> # try to delete it (can't delete until the python interpreter is killed)
> os.remove(file_name)  # PermissionError
> # Note: opening an existing file as `pa.input_stream` works as expected{code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)