Files
Wei-Ting Yang 9412243052 python-idna: bump to 3.18
Release notes:
https://github.com/kjd/idna/releases/tag/v3.18

Remove the test for UTS 46 transitional processing, which is now
deprecated and emits a warning. See [1].

[1] https://github.com/kjd/idna/commit/94bcdc38fd75ae8a259132f7e3f5f1fb5373c717

Signed-off-by: Wei-Ting Yang <williamatcg@gmail.com>
2026-07-27 09:35:43 +03:00

22 lines
636 B
Bash

#!/bin/sh
[ "$1" = python3-idna ] || exit 0
python3 - << 'EOF'
import idna
import idna.codec
assert idna.encode('ドメイン.テスト') == b'xn--eckwd4c7c.xn--zckzah'
assert idna.decode('xn--eckwd4c7c.xn--zckzah') == 'ドメイン.テスト'
assert 'домен.испытание'.encode('idna2008') == b'xn--d1acufc.xn--80akhbyknj4f'
assert b'xn--d1acufc.xn--80akhbyknj4f'.decode('idna2008') == 'домен.испытание'
assert idna.alabel('测试') == b'xn--0zwm56d'
assert idna.encode('Königsgäßchen', uts46=True) == b'xn--knigsgchen-b4a3dun'
assert idna.decode('xn--knigsgchen-b4a3dun') == 'königsgäßchen'
EOF