Bug#1036197: ibus-pinyin setup broken with Python >= 3.10 due to gettext.bind_textdomain_codeset
Package: ibus-pinyin
Version: 1.5.0-8
Severity: important
Dear Maintainer,
How to reproduce?
- ensure you are running a flavour of Debian that features Python >= 3.10
- install ibus and ibus-pinyin
- run ibus-setup in a terminal
- select the "Input Method" tab
- click "Add" > Chinese > Pinyin > Add
- select "Chinese - Pinyin"
- click Preferences
Outcome:
1. no dialog appear on screen
2. the following Python stacktrace appears in the terminal:
Traceback (most recent call last):
File "/usr/share/ibus-pinyin/setup/main.py", line 428, in <module>
main()
File "/usr/share/ibus-pinyin/setup/main.py", line 424, in main
PreferencesDialog(name).run()
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/share/ibus-pinyin/setup/main.py", line 44, in __init__
gettext.bind_textdomain_codeset("ibus-pinyin", "UTF-8")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'gettext' has no attribute 'bind_textdomain_codeset'
The python documentation[1] reports that
gettext.bind_textdomain_codeset(domain, codeset=None) is "Deprecated since
version 3.8, removed in version 3.10", hence the stacktrace.
Let me know if you need further information.
[1] https://docs.python.org/3.10/library/gettext.html
-- System Information:
Debian Release: 12.0
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)
Kernel: Linux 6.1.0-8-amd64 (SMP w/4 CPU threads; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages ibus-pinyin depends on:
ii gir1.2-gtk-3.0 3.24.37-2
ii gir1.2-ibus-1.0 1.5.27-5
ii libc6 2.36-9
ii libgcc-s1 12.2.0-14
ii libglib2.0-0 2.74.6-2
ii libibus-1.0-5 1.5.27-5
ii liblua5.4-0 5.4.4-3
ii libpyzy-1.0-0v5 1.0.1-8
ii libsqlite3-0 3.40.1-2
ii libstdc++6 12.2.0-14
ii python3 3.11.2-1+b1
ii python3-gi 3.42.2-3+b1
ii python3-xdg 0.28-2
ibus-pinyin recommends no packages.
ibus-pinyin suggests no packages.
-- no debconf information
Reply to: