]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-42846: Convert CJK codec extensions to multiphase init (GH-24157)
authorVictor Stinner <vstinner@python.org>
Thu, 7 Jan 2021 23:15:22 +0000 (00:15 +0100)
committerGitHub <noreply@github.com>
Thu, 7 Jan 2021 23:15:22 +0000 (00:15 +0100)
commit07f2cee93f1b619650403981c455f47bfed8d818
treeded46be4aac83cba64d786c780101386ec2a6607
parent07dcd86ceed0bd88d1e96dcf53b1de2fea024385
bpo-42846: Convert CJK codec extensions to multiphase init (GH-24157)

Convert the 6 CJK codec extension modules (_codecs_cn, _codecs_hk,
_codecs_iso2022, _codecs_jp, _codecs_kr and _codecs_tw) to the
multiphase initialization API (PEP 489).

Remove getmultibytecodec() local cache: always import
_multibytecodec. It should be uncommon to get a codec. For example,
this function is only called once per CJK codec module.

Fix a reference leak in register_maps() error path.
Lib/test/test_multibytecodec.py
Misc/NEWS.d/next/Library/2021-01-07-23-31-17.bpo-42846.kukDjw.rst [new file with mode: 0644]
Modules/cjkcodecs/cjkcodecs.h