]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-87595: Support mmap.size() for anonymous mapping on Unix (GH-24781)
authorZackery Spytz <zspytz@gmail.com>
Tue, 2 Sep 2025 20:24:06 +0000 (13:24 -0700)
committerGitHub <noreply@github.com>
Tue, 2 Sep 2025 20:24:06 +0000 (23:24 +0300)
commit32032ee376fe20670e9a35e56beff48e59201261
treedf7b75a4a7e6ed037a636d4fec61b334e3c628f0
parente4e2390a64593b33d65567179265f9c2cd9acae1
gh-87595: Support mmap.size() for anonymous mapping on Unix (GH-24781)

Previously, the size would be returned on Windows and an OSError would
be raised on Unix.

Also, raise ValueError instead of OSError for trackfd=False.

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Doc/library/mmap.rst
Lib/test/test_mmap.py
Misc/NEWS.d/next/Library/2021-03-07-16-31-36.bpo-43429.Koa0mf.rst [new file with mode: 0644]
Modules/mmapmodule.c