gh-155354: Document that `sys._clear_type_cache` no longer clears the type cache (#155391)
kumaraditya303 <[email protected]>
| Newsgroups | gmane.comp.python.cvs |
|---|---|
| Message-ID | <[email protected]> |
https://github.com/python/cpython/commit/e2cb8b9bc37b78f9460508d52d33ce23b6caf7ab commit: e2cb8b9bc37b78f9460508d52d33ce23b6caf7ab branch: main author: Vyron Vasileiadis <[email protected]> committer: kumaraditya303 <[email protected]> date: 2026-08-21T21:49:51+05:30 summary: gh-155354: Document that `sys._clear_type_cache` no longer clears the type cache (#155391) files: M Doc/library/sys.rst diff --git a/Doc/library/sys.rst b/Doc/library/sys.rst index b9781de77860bb..bcc8f855c06f71 100644 --- a/Doc/library/sys.rst +++ b/Doc/library/sys.rst @@ -233,15 +233,15 @@ always available. Unless explicitly noted otherwise, all variables are read-only .. function:: _clear_type_cache() - Clear the internal type cache. The type cache is used to speed up attribute - and method lookups. Use the function *only* to drop unnecessary references - during reference leak debugging. - - This function should be used for internal and specialized purposes only. + This function is a no-op. It used to clear the internal type cache, which + is now implemented per-type. .. deprecated:: 3.13 Use the more general :func:`_clear_internal_caches` function instead. + .. versionchanged:: 3.16 + This function is now a no-op. + .. function:: _clear_internal_caches() @@ -250,6 +250,9 @@ always available. Unless explicitly noted otherwise, all variables are read-only .. versionadded:: 3.13 + .. versionchanged:: 3.16 + The type cache is no longer cleared, as it is now implemented per-type. + .. function:: _current_frames() _______________________________________________ Python-checkins mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3//lists/python-checkins.python.org Member address: [email protected]