This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients eric.snow, jeremy.kloth, jkloth, nanjekyejoannah, ncoghlan, vstinner
Date 2020-02-01.12:10:29
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
I vaguely recall discussions about immortal Python objects.

(*) Instagram gc.freeze()


(*) Python immortal strings

* PyUnicode_InternImmortal()
* They are only destroyed if Python is compiled with Valgrind or Purify support: unicode_release_interned() function


* When Python is built with COUNT_ALLOCS macro defined, types are immortal
* Many tests have to be skipped if COUNT_ALLOCS is used
* I plan to remove COUNT_ALLOCS feature in bpo-39489 :-)

(*) Static types

* Types which are not allocated on the heap but "static" are immortal
* These types cause various issues and should go away
* For example, they are incompatible with multi-phase initialization module (PEP 489) and stable ABI (PEP 384)
Date User Action Args
2020-02-01 12:10:29vstinnersetrecipients: + vstinner, ncoghlan, jkloth, jeremy.kloth, eric.snow, nanjekyejoannah
2020-02-01 12:10:29vstinnersetmessageid: <>
2020-02-01 12:10:29vstinnerlinkissue39511 messages
2020-02-01 12:10:29vstinnercreate