Nick Coghlan added the comment:

Targeted API to forget a particular codec name.

Normally we don't care about the caching (as evidenced by the fact it took 14+ 
years to want this feature).

The intent with this API is to be able to selective purge a particular codec 
when we either care about getting the latest version of a specific codec (no 
current use cases) or to avoid the appearance of leaking references when 
looking up lots of custom codecs (this case).

I considered dropping the per-test naming scheme, but decided I liked the fact 
it kept these test instances orthogonal, even though they all use the shared 
TEST_CODECS registry. The lack of global side effects is also a benefit of just 
popping the named codec, rather than purging the entire cache.

Added file:

Python tracker <>
Python-bugs-list mailing list

Reply via email to