You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On Posix platforms without mremap() (FreeBSD, OpenBSD, NetBSD, OpenIndiana) mmap.resize() raises SystemError.
SystemError: mmap: resizing not available--no mremap()
SystemError should only be raised in case of the misuse of the C API or breaking internal consistency of the Python core. It is one step away from a segmentation fault or undefined behavior. If some function cannot be implemented, it should either do not exist (causing AttributeError) or raise more appropriate exception when called, like NotImplemenedError, or OSError(ENOTSUP), or simply RuntimeError.
I'd like to just remove the method on platforms which doesn't support it for consistent reasons, just like the madvise method is not exist on platforms which doesn't support it.
Activity
YvesDup commentedon Aug 27, 2025
This also happens on MacOSX 15.1, M4 pro
serhiy-storchaka commentedon Aug 28, 2025
There was other improper use of
SystemErrorin themmapmodule: #7381.aisk commentedon Aug 31, 2025
I'd like to just remove the method on platforms which doesn't support it for consistent reasons, just like the
madvisemethod is not exist on platforms which doesn't support it.gh-138205: Remove the `resize` method on `mmap` object on platforms d…
serhiy-storchaka commentedon Sep 6, 2025
Since this is a very old behavior, it is not worth to backport the change.
pythongh-138205: Remove the `resize` method on `mmap` object on platf…
gh-138205: explicit mention to `mmap.mmap.resize` in "Porting to Pyth…
pythongh-138205: explicit mention to `mmap.mmap.resize` in "Porting t…