◐ Shell
clean mode source ↗

bpo-43908: Add Py_TPFLAGS_IMMUTABLETYPE flag by erlend-aasland · Pull Request #25520 · python/cpython

gvanrossum

shreyanavigyan

@erlend-aasland erlend-aasland changed the title bpo-43908: Add Py_TPFLAGS_IMMUTABLE flag and use it in arraymodule bpo-43908: Add Py_TPFLAGS_IMMUTABLE flag

Apr 26, 2021

@erlend-aasland erlend-aasland changed the title bpo-43908: Add Py_TPFLAGS_IMMUTABLE flag bpo-43908: Add Py_TPFLAGS_IMMUTABLETYPE flag

Apr 26, 2021

pablogsal

vstinner

shreyanavigyan

Erlend Egeberg Aasland and others added 3 commits

April 28, 2021 17:16
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Victor Stinner <vstinner@python.org>

vstinner

Erlend Egeberg Aasland and others added 3 commits

April 28, 2021 17:27
Co-authored-by: Victor Stinner <vstinner@python.org>

vstinner

Erlend Egeberg Aasland and others added 2 commits

April 28, 2021 17:37
Co-authored-by: Victor Stinner <vstinner@python.org>

vstinner

shreyanavigyan

da-woods pushed a commit to cython/cython that referenced this pull request

Jan 1, 2023
Since python/cpython#25520 types are automatically marked as immutable if they are static.
While we still have the Py_TPFLAGS_HEAPTYPE hack in place we need to manually mark our types as immutable.
It's possible to crash Python by trying to modify mutable static types.