Package: release.debian.org
Severity: normal
User: release.debian....@packages.debian.org
Usertags: unblock
X-Debbugs-Cc: debian-input-met...@lists.debian.org
Control: affects -1 + src:ibus-pinyin
Please unblock package ibus-pinyin.
[ Reason ]
https://bugs.debian.org/1036197 pointed out that a python file includes
a gettext API which was removed in python3.10. When fixing that I also
noticed that the Gtk version was not specified, which it needs to be on
systems where gtk4 is present.
These issues have been fixed in ibus-pinyin 1.5.0-10 through two small
patches.
[ Impact ]
Without the mentioned patches, the user can't open the Preferences
window, which significantly reduces the usability of the package.
[ Tests ]
Manually installed the binary built by version 1.5.0-10 of the
ibus-pinyin source, and confirmed that the issues were fixed as expected.
[ Risks ]
The fixes are standard python3 fixes, and should have been done long
ago. Can't see any risk for adverse side effects.
[ Checklist ]
[x] all changes are documented in the d/changelog
[x] I reviewed all changes and I approve them
[x] attach debdiff against the package in testing
--
Cheers,
Gunnar Hjalmarsson
diff --git a/debian/changelog b/debian/changelog
index e163562..67e8e68 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,19 @@
+ibus-pinyin (1.5.0-10) unstable; urgency=medium
+
+ * Team upload
+ * Upload to unstable
+
+ -- Gunnar Hjalmarsson <gunna...@debian.org> Wed, 17 May 2023 19:14:23 +0200
+
+ibus-pinyin (1.5.0-9) experimental; urgency=medium
+
+ * Team upload
+ * Fix removed python gettext API (closes: #1036197, LP: #2019921)
+ * Bump Standards-Version to 4.6.2
+ * Specify Gtk version (LP: #2019921)
+
+ -- Gunnar Hjalmarsson <gunna...@debian.org> Wed, 17 May 2023 08:17:28 +0200
+
ibus-pinyin (1.5.0-8) unstable; urgency=medium
* Team upload
diff --git a/debian/control b/debian/control
index 2a49cc4..630f00a 100644
--- a/debian/control
+++ b/debian/control
@@ -18,7 +18,7 @@ Build-Depends:
python3-dev,
sqlite3,
uuid-dev,
-Standards-Version: 4.6.1
+Standards-Version: 4.6.2
Homepage: https://github.com/ibus/ibus-pinyin
Vcs-Git: https://salsa.debian.org/input-method-team/ibus-pinyin.git
Vcs-Browser: https://salsa.debian.org/input-method-team/ibus-pinyin
diff --git a/debian/patches/Fix-removed-python-gettext-API.patch
b/debian/patches/Fix-removed-python-gettext-API.patch
new file mode 100644
index 0000000..f800cd0
--- /dev/null
+++ b/debian/patches/Fix-removed-python-gettext-API.patch
@@ -0,0 +1,28 @@
+From: znwu <znjame...@gmail.com>
+Date: Sun, 7 May 2023 18:17:11 -0700
+Subject: Fix removed python gettext API
+
+Origin: https://github.com/ibus/ibus-pinyin/commit/e2e10c40
+Bug-Debian: https://bugs.debian.org/1036197
+---
+ setup/main.py | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/setup/main.py b/setup/main.py
+index 3c13c4c..3f153a5 100644
+--- a/setup/main.py
++++ b/setup/main.py
+@@ -45,7 +45,12 @@ def __init__(self, engine):
+ locale.setlocale(locale.LC_ALL, "")
+ localedir = os.getenv("IBUS_LOCALEDIR")
+ gettext.bindtextdomain("ibus-pinyin", localedir)
+- gettext.bind_textdomain_codeset("ibus-pinyin", "UTF-8")
++ # Python's gettext module doesn't provide all methods in
++ # new Python version since Python 3.10
++ try:
++ gettext.bind_textdomain_codeset("ibus-pinyin", "UTF-8")
++ except AttributeError:
++ pass
+
+ self.__bus = IBus.Bus()
+ self.__config = self.__bus.get_config()
diff --git a/debian/patches/Specify-Gtk-version.patch
b/debian/patches/Specify-Gtk-version.patch
new file mode 100644
index 0000000..925aaf0
--- /dev/null
+++ b/debian/patches/Specify-Gtk-version.patch
@@ -0,0 +1,15 @@
+Description: Specify Gtk version
+Author: Gunnar Hjalmarsson <gunna...@debian.org>
+Applied-Upstream: https://github.com/ibus/ibus-pinyin/commit/61677008
+
+--- a/setup/main.py
++++ b/setup/main.py
+@@ -27,6 +27,8 @@
+ import os
+ import sys
+
++from gi import require_version
++require_version ('Gtk', '3.0')
+ from gi.repository import GLib
+ from gi.repository import Gtk
+ from gi.repository import IBus
diff --git a/debian/patches/series b/debian/patches/series
index d467c09..c483696 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -15,3 +15,6 @@ ibus-pinyin-default-full.patch
# python3 support
python3.patch
lua-5.4.patch
+
+Fix-removed-python-gettext-API.patch
+Specify-Gtk-version.patch