On 23.09.2020 14:56, STINNER Victor wrote: > Marc-Andre Lemburg explained: > > "There is no API to unregister a codec search function, since deregistration > would break the codec cache used by the registry to speedup codec > lookup." > > One simple solution would be to clear the cache > (PyInterpreterState.codec_search_cache) when codecs.unregister() removes a > search function. I expect that calling unregister() is an uncommon operation, > so the performance is not a blocker issue.
+1 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. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Experts (#1, Sep 23 2020) >>> Python Projects, Coaching and Support ... https://www.egenix.com/ >>> Python Product Development ... https://consulting.egenix.com/ ________________________________________________________________________ ::: We implement business ideas - efficiently in both time and costs ::: eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48 D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg Registered at Amtsgericht Duesseldorf: HRB 46611 https://www.egenix.com/company/contact/ https://www.malemburg.com/ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com