STINNER Victor added the comment:
IMO test_codecs_fix1.patch is still needed.
Review of Nick's change:
+ interp = PyThreadState_GET()->interp;
+ if (interp->codec_search_path == NULL) {
+ return -1;
+ }
I don't think that this line raises an exception. You should use an assertion
here (or raises an exception, but it would be overkill).
+ encodings._cache.pop(self.codec_name, None)
+ try:
+ _forget_codec(self.codec_name)
+ except KeyError:
+ pass
You may move these lines to a private encoding._forget() function.
By the way, codecs._forget() should maybe catch and ignore KeyError?
> _TEST_CODECS.pop(self.codec_name, None)
This line may be moved to set_codec() using self.addCleanup(). (Well, it's not
directly related to your change.)
----------
resolution: fixed ->
status: closed -> open
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue22166>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com