Skip to content

Commit e2cb8b9

Browse files
authored
gh-155354: Document that sys._clear_type_cache no longer clears the type cache (#155391)
1 parent 9c48dfe commit e2cb8b9

1 file changed

Lines changed: 8 additions & 5 deletions

File tree

Doc/library/sys.rst

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -233,15 +233,15 @@ always available. Unless explicitly noted otherwise, all variables are read-only
233233

234234
.. function:: _clear_type_cache()
235235

236-
Clear the internal type cache. The type cache is used to speed up attribute
237-
and method lookups. Use the function *only* to drop unnecessary references
238-
during reference leak debugging.
239-
240-
This function should be used for internal and specialized purposes only.
236+
This function is a no-op. It used to clear the internal type cache, which
237+
is now implemented per-type.
241238

242239
.. deprecated:: 3.13
243240
Use the more general :func:`_clear_internal_caches` function instead.
244241

242+
.. versionchanged:: 3.16
243+
This function is now a no-op.
244+
245245

246246
.. function:: _clear_internal_caches()
247247

@@ -250,6 +250,9 @@ always available. Unless explicitly noted otherwise, all variables are read-only
250250

251251
.. versionadded:: 3.13
252252

253+
.. versionchanged:: 3.16
254+
The type cache is no longer cleared, as it is now implemented per-type.
255+
253256

254257
.. function:: _current_frames()
255258

0 commit comments

Comments
 (0)