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 graingert
Recipients graingert, mhvk
Date 2021-03-09.09:26:01
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1615281962.28.0.799547859995.issue40720@roundup.psfhosted.org>
In-reply-to
Content
I can confirm this happens on py3.5-3.10

```
import mmap
import pathlib
import tempfile


def main():
    with tempfile.TemporaryDirectory() as tmp:
        tmp_path = pathlib.Path(tmp)
        path = tmp_path / "eg"

        path.write_bytes(b"Hello, World!")

        with path.open("rb") as rf:
            mm = mmap.mmap(rf.fileno(), 0, mmap.MAP_SHARED, mmap.PROT_READ)
            path.write_bytes(b"")
            bytes(mm)

if __name__ == "__main__":
    main()
```
History
Date User Action Args
2021-03-09 09:26:02graingertsetrecipients: + graingert, mhvk
2021-03-09 09:26:02graingertsetmessageid: <1615281962.28.0.799547859995.issue40720@roundup.psfhosted.org>
2021-03-09 09:26:01graingertlinkissue40720 messages
2021-03-09 09:26:01graingertcreate