https://bugzilla.redhat.com/show_bug.cgi?id=1970626
Bug ID: 1970626 Summary: emoji-picker broken by python-3.10 Product: Fedora Version: rawhide Status: NEW Component: ibus-typing-booster Assignee: mfabian@redhat.com Reporter: kevin@scrye.com QA Contact: extras-qa@fedoraproject.org CC: anish.developer@gmail.com, i18n-bugs@lists.fedoraproject.org, mfabian@redhat.com Target Milestone: --- Classification: Fedora
Trying to run emoji-picker with:
python3-3.10.0~b2-3.fc35.x86_64 ibus-typing-booster-2.11.4-1.fc35.noarch
gives:
✗ emoji-picker /usr/lib64/python3.10/enum.py:73: Warning: unsupported arithmetic operation for flags type num &= num - 1 Traceback (most recent call last): File "/usr/share/ibus-typing-booster/engine/emoji_picker.py", line 42, in <module> import itb_util File "/usr/share/ibus-typing-booster/engine/itb_util.py", line 3191, in <module> class InputHints(Flag): File "/usr/lib64/python3.10/enum.py", line 484, in __new__ raise exc File "/usr/lib64/python3.10/enum.py", line 246, in __set_name__ and _is_single_bit(value) File "/usr/lib64/python3.10/enum.py", line 73, in _is_single_bit num &= num - 1 TypeError: unsupported operand type(s) for &=: 'InputHints' and 'NoneType'
https://bugzilla.redhat.com/show_bug.cgi?id=1970626
Kevin Fenzi kevin@scrye.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |mhroncok@redhat.com Doc Type|--- |If docs needed, set a value
--- Comment #1 from Kevin Fenzi kevin@scrye.com --- Miro, should this block some python 3.10 tracker?
https://bugzilla.redhat.com/show_bug.cgi?id=1970626
Miro Hrončok mhroncok@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Blocks| |1890881 (PYTHON3.10)
Referenced Bugs:
https://bugzilla.redhat.com/show_bug.cgi?id=1890881 [Bug 1890881] Python 3.10 tracker
https://bugzilla.redhat.com/show_bug.cgi?id=1970626
--- Comment #2 from Miro Hrončok mhroncok@redhat.com --- This is the minimal failing example extracted from /usr/share/ibus-typing-booster/engine/itb_util.py:
from enum import Flag from gi.repository import Gtk
class InputHints(Flag): def __new__(cls, attr: str): obj = object.__new__(cls) if hasattr(Gtk, 'InputHints') and hasattr(Gtk.InputHints, attr): obj._value_ = getattr(Gtk.InputHints, attr) print(f'{obj._value_=}') else: obj._value_ = 0 return obj
SPELLCHECK = ('SPELLCHECK')
The output is:
$ python3 reproducer.py ... obj._value_=<flags GTK_INPUT_HINT_SPELLCHECK of type Gtk.InputHints> /usr/lib64/python3.10/enum.py:73: Warning: unsupported arithmetic operation for flags type num &= num - 1 Traceback (most recent call last): File "//reproducer.py", line 20, in <module> class InputHints(Flag): File "/usr/lib64/python3.10/enum.py", line 484, in __new__ raise exc File "/usr/lib64/python3.10/enum.py", line 246, in __set_name__ and _is_single_bit(value) File "/usr/lib64/python3.10/enum.py", line 73, in _is_single_bit num &= num - 1 TypeError: unsupported operand type(s) for &=: 'InputHints' and 'NoneType'
Setting obj._value_ = 0 does not produce the traceback.
Actually setting obj._value_ to any number does not produce the traceback.
My guess is that with the enum.Flag implementation overhaul, some internals have changed. I don't think messing with obj._value_ in __new__ is a supported thing to do, so I won't consider this a Python bug per se -- obj._value_ is supposed to be a numeric value, not another Flag member.
Replacing:
obj._value_ = getattr(Gtk.InputHints, attr)
With:
obj._value_ = int(getattr(Gtk.InputHints, attr))
In both InputHints and InputPurpose seems to get the job done.
https://bugzilla.redhat.com/show_bug.cgi?id=1970626
Miro Hrončok mhroncok@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Link ID| |Github | |mike-fabian/ibus-typing-boo | |ster/pull/168
--- Comment #3 from Miro Hrončok mhroncok@redhat.com --- Upstream PR: https://github.com/mike-fabian/ibus-typing-booster/pull/168
https://bugzilla.redhat.com/show_bug.cgi?id=1970626
Miro Hrončok mhroncok@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Flags| |needinfo?(mfabian@redhat.co | |m)
--- Comment #4 from Miro Hrončok mhroncok@redhat.com --- Mike, could you please have a look at the proposed Pull Request and backport it to rawhide if possible? Thanks
https://bugzilla.redhat.com/show_bug.cgi?id=1970626
Mike FABIAN mfabian@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Flags|needinfo?(mfabian@redhat.co | |m) |
--- Comment #5 from Mike FABIAN mfabian@redhat.com --- Looking ...
https://bugzilla.redhat.com/show_bug.cgi?id=1970626
--- Comment #6 from Mike FABIAN mfabian@redhat.com --- python3-enchant seems broken in rawhide:
https://bugzilla.redhat.com/show_bug.cgi?id=1974452
(I noticed this because a test case for Czech failed when I wanted to fix this bug for ibus-typing-booster in rawhide)
https://bugzilla.redhat.com/show_bug.cgi?id=1970626
Fedora Update System updates@fedoraproject.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |MODIFIED
--- Comment #7 from Fedora Update System updates@fedoraproject.org --- FEDORA-2021-52fe390975 has been submitted as an update to Fedora 35. https://bodhi.fedoraproject.org/updates/FEDORA-2021-52fe390975
https://bugzilla.redhat.com/show_bug.cgi?id=1970626
Fedora Update System updates@fedoraproject.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|MODIFIED |CLOSED Fixed In Version| |ibus-typing-booster-2.11.5- | |1.fc35 Resolution|--- |ERRATA Last Closed| |2021-06-22 07:34:10
--- Comment #8 from Fedora Update System updates@fedoraproject.org --- FEDORA-2021-52fe390975 has been pushed to the Fedora 35 stable repository. If problem still persists, please make note of it in this bug report.
https://bugzilla.redhat.com/show_bug.cgi?id=1970626
--- Comment #9 from Fedora Update System updates@fedoraproject.org --- FEDORA-2021-48e5f2056e has been submitted as an update to Fedora 34. https://bodhi.fedoraproject.org/updates/FEDORA-2021-48e5f2056e
https://bugzilla.redhat.com/show_bug.cgi?id=1970626
--- Comment #10 from Fedora Update System updates@fedoraproject.org --- FEDORA-2021-468626eba4 has been submitted as an update to Fedora 33. https://bodhi.fedoraproject.org/updates/FEDORA-2021-468626eba4
https://bugzilla.redhat.com/show_bug.cgi?id=1970626
--- Comment #11 from Mike FABIAN mfabian@redhat.com --- Included in https://github.com/mike-fabian/ibus-typing-booster/releases/tag/2.11.5
https://bugzilla.redhat.com/show_bug.cgi?id=1970626
--- Comment #12 from Fedora Update System updates@fedoraproject.org --- FEDORA-2021-48e5f2056e has been pushed to the Fedora 34 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-48e5f2056e` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-48e5f2056e
See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
https://bugzilla.redhat.com/show_bug.cgi?id=1970626
--- Comment #13 from Fedora Update System updates@fedoraproject.org --- FEDORA-2021-468626eba4 has been pushed to the Fedora 33 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-468626eba4` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-468626eba4
See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
https://bugzilla.redhat.com/show_bug.cgi?id=1970626
Fedora Update System updates@fedoraproject.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed In Version|ibus-typing-booster-2.11.5- |ibus-typing-booster-2.11.5- |1.fc35 |1.fc35 | |ibus-typing-booster-2.11.5- | |1.fc34
--- Comment #14 from Fedora Update System updates@fedoraproject.org --- FEDORA-2021-48e5f2056e has been pushed to the Fedora 34 stable repository. If problem still persists, please make note of it in this bug report.
https://bugzilla.redhat.com/show_bug.cgi?id=1970626
Fedora Update System updates@fedoraproject.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed In Version|ibus-typing-booster-2.11.5- |ibus-typing-booster-2.11.5- |1.fc35 |1.fc35 |ibus-typing-booster-2.11.5- |ibus-typing-booster-2.11.5- |1.fc34 |1.fc34 | |ibus-typing-booster-2.11.5- | |1.fc33
--- Comment #15 from Fedora Update System updates@fedoraproject.org --- FEDORA-2021-468626eba4 has been pushed to the Fedora 33 stable repository. If problem still persists, please make note of it in this bug report.
i18n-bugs@lists.fedoraproject.org