# Immutable types with mutable bases

**URL:** <https://discuss.python.org/t/immutable-types-with-mutable-bases/17764>\
**Category:** Core Development\
**Created:** [July 29, 2022, 8:30am UTC](https://discuss.python.org/t/immutable-types-with-mutable-bases/17764 "2022-07-29T08:30:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![encukou](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/encukou/32/2461_2.png) [@encukou](https://discuss.python.org/u/encukou)\
**Post date:** [July 29, 2022, 8:30am UTC](https://discuss.python.org/t/immutable-types-with-mutable-bases/17764/1 "2022-07-29T08:30:19Z")

</div>

Hello,  
The C API currently allows creating an [immutable type](https://docs.python.org/3/c-api/typeobj.html?highlight=py_tpflags_immutable#Py_TPFLAGS_IMMUTABLETYPE) with a mutable base: the type’s attributes are immutable, but inherited ones can be changed through the base.  
The implications of this on cache invalidation are twisting my brain, and I doubt it’s useful for anyone, so I plan to deprecate it (and disable it in 3.14): [gh-95388](https://github.com/python/cpython/issues/95388)

- Do you see a need for this? (In that case it’ll need proper tests.)
- Do you know if it actually breaks something? If it never worked, it should probably be a disabled in 3.12.
