Message377392
> Just found an internal API which already takes care of
> unregistering a search function: _PyCodec_Forget().
>
> All that needs to be done is to expose this as codecs.unregister()
> and add the clearing of the lookup cache.
Yeah, I saw this function, but it's related to the cache, not to the list of search functions.
> BTW: While you're at it, having a way to access the search function
> list from Python would be nice as well, since this would then open
> up the possibility to reorder search functions.
I didn't hear anyone (ok, apart you) who requested to order search functions.
I dislike the idea of exposing it, since it introduces the risk that someone "unregisters" a search function simply by removing it from the list, without invalidating the cache.
I prefer to hide the internals to ensure that the cache remains consistent. |
|
Date |
User |
Action |
Args |
2020-09-23 14:49:54 | vstinner | set | recipients:
+ vstinner, lemburg, ezio.melotti |
2020-09-23 14:49:54 | vstinner | set | messageid: <1600872594.55.0.261984022225.issue41842@roundup.psfhosted.org> |
2020-09-23 14:49:54 | vstinner | link | issue41842 messages |
2020-09-23 14:49:54 | vstinner | create | |
|