Bug 1254775 - hangs when run with language other than English under Python 3
Summary: hangs when run with language other than English under Python 3
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: system-config-language
Version: 23
Hardware: All
OS: All
unspecified
high
Target Milestone: ---
Assignee: Parag Nemade
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-08-18 20:05 UTC by Adam Williamson
Modified: 2015-08-26 04:33 UTC (History)
4 users (show)

Fixed In Version: 3.2.0-2.fc23
Clone Of:
Environment:
Last Closed: 2015-08-26 04:33:19 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
fix the bug (by swiping the _ definition from anaconda) (3.07 KB, application/mbox)
2015-08-18 20:05 UTC, Adam Williamson
no flags Details

Description Adam Williamson 2015-08-18 20:05:37 UTC
Created attachment 1064474 [details]
fix the bug (by swiping the _ definition from anaconda)

system-config-language runs OK in Python 3 in English, or in Python 2 in any other language, but when running in a non-English language in Python 3 it hangs such that it can't even be ctrl-C'ed (has to be kill'ed from another terminal):

root@adam system-config-language (master *%)]# LANGUAGE=de_DE.UTF-8 /usr/share/system-config-language/system-config-language.py 
Traceback (most recent call last):
  File "/usr/share/system-config-language/language_gui.py", line 341, in do_activate
    win = ChildWindow(self)
  File "/usr/share/system-config-language/language_gui.py", line 41, in __init__
    self.title = Gtk.Label.new(_("Language Selection"))
TypeError: Must be string, not bytes

This can be fixed by swiping anaconda's definition of '_' (the conventional name for the function for 'translate this string'). One of system-config-language's files currently defines it as 'gettext.gettext', which seems to cause the hang.

Patch attached. I just stole anaconda's '_' definition. Tested in both py2 and py3. I'll apply this patch in the package spec for now, once it's applied upstream it can be removed from the package.

Comment 1 Fedora Update System 2015-08-20 06:49:19 UTC
system-config-language-3.2.0-2.fc23 has been submitted as an update to Fedora 23. https://bugzilla.redhat.com/show_bug.cgi?id=1254775

Comment 2 Fedora Update System 2015-08-22 16:25:45 UTC
system-config-language-3.2.0-2.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.\nIf you want to test the update, you can install it with \n su -c 'yum --enablerepo=updates-testing update system-config-language'. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-13792

Comment 3 Fedora Update System 2015-08-26 04:33:17 UTC
system-config-language-3.2.0-2.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.