Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
apply victor's comment
  • Loading branch information
shihai1991 committed Sep 24, 2020
commit 5efff220fb0ba9c3bac3454ecbce56fb7f87edf0
3 changes: 1 addition & 2 deletions Doc/whatsnew/3.10.rst
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ codecs
------

Add a :func:`codecs.unregister` to unregister a codec search function.
Comment thread
shihai1991 marked this conversation as resolved.
Outdated
Comment thread
shihai1991 marked this conversation as resolved.
Outdated
(Contributed by Hai Shi in :issue:`41842`.)

curses
------
Expand Down Expand Up @@ -245,8 +246,6 @@ New Features
* Add a :c:func:`PyCodec_Unregister` to unregister a codec search function.
Comment thread
shihai1991 marked this conversation as resolved.
Outdated
(Contributed by Hai Shi in :issue:`41842`.)

=======

Porting to Python 3.10
----------------------

Expand Down
1 change: 1 addition & 0 deletions Lib/test/test_codecs.py
Original file line number Diff line number Diff line change
Expand Up @@ -1648,6 +1648,7 @@ def test_unregister(self):
self.assertRaises(TypeError, codecs.lookup, name)
search_function.assert_called_with(name)
search_function.reset_mock()
Comment thread
shihai1991 marked this conversation as resolved.

codecs.unregister(search_function)
self.assertRaises(LookupError, codecs.lookup, name)
search_function.assert_not_called()
Expand Down