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: 
http://bugs.python.org/file36563/issue22166_with_forget_codec_helper_api.diff

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue22166>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to