Skip to content

Commit 82e84fd

Browse files
author
Erlend E. Aasland
committed
Add What's New entry
1 parent e467ec4 commit 82e84fd

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

Doc/whatsnew/3.10.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1712,6 +1712,10 @@ New Features
17121712
creating type instances.
17131713
(Contributed by Victor Stinner in :issue:`43916`.)
17141714
1715+
* Add a new :c:data:`Py_TPFLAGS_IMMUTABLETYPE` type flag for creating immutable
1716+
type objects: type attributes cannot be set nor deleted.
1717+
(Contributed by Victor Stinner and Erlend E. Aasland in :issue:`43908`.)
1718+
17151719
Porting to Python 3.10
17161720
----------------------
17171721
@@ -1769,6 +1773,12 @@ Porting to Python 3.10
17691773
been included directly, consider including ``Python.h`` instead.
17701774
(Contributed by Nicholas Sim in :issue:`35134`)
17711775
1776+
* Use the :c:data:`Py_TPFLAGS_IMMUTABLETYPE` type flag to create immutable type
1777+
objects. Do not rely on :c:data:`Py_TPFLAGS_HEAPTYPE` to decide if a type
1778+
object is mutable or not; check for :c:data:`Py_TPFLAGS_IMMUTABLETYPE`
1779+
instead.
1780+
(Contributed by Victor Stinner and Erlend E. Aasland in :issue:`43908`.)
1781+
17721782
Deprecated
17731783
----------
17741784

0 commit comments

Comments
 (0)