Activity log for bug #1050061

Date Who What changed Old value New value Message
2012-09-12 21:10:13 Michael Terry bug added bug
2012-09-12 21:10:25 Michael Terry bug task added ubuntu-sso-client (Ubuntu)
2012-09-13 13:53:02 Launchpad Janitor branch linked lp:~mterry/ubuntu-sso-client/no-gettext-install
2012-09-13 14:23:06 dobey nominated for series ubuntu-sso-client/stable-4-0
2012-09-13 14:23:06 dobey bug task added ubuntu-sso-client/stable-4-0
2012-09-13 14:23:06 dobey nominated for series ubuntu-sso-client/trunk
2012-09-13 14:23:06 dobey bug task added ubuntu-sso-client/trunk
2012-09-13 14:23:16 dobey ubuntu-sso-client/trunk: status New In Progress
2012-09-13 14:23:27 dobey ubuntu-sso-client/trunk: assignee Michael Terry (mterry)
2012-09-13 14:23:33 dobey ubuntu-sso-client/stable-4-0: milestone 3.99.92
2012-09-13 14:23:37 dobey ubuntu-sso-client/stable-4-0: status New Triaged
2012-09-13 14:24:03 dobey nominated for series Ubuntu Quantal
2012-09-13 14:24:03 dobey bug task added ubuntu-sso-client (Ubuntu Quantal)
2012-09-13 14:24:12 dobey ubuntu-sso-client (Ubuntu Quantal): milestone ubuntu-12.10-beta-2
2012-09-13 15:17:07 Ubuntu One Auto Pilot ubuntu-sso-client/trunk: status In Progress Fix Committed
2012-09-13 16:52:06 Michael Terry nominated for series Ubuntu Precise
2012-09-13 16:52:06 Michael Terry bug task added ubuntu-sso-client (Ubuntu Precise)
2012-09-13 17:03:09 Michael Terry description In utils/ui.py, the following lines are used: INSTALL_KWARGS = {} if sys.version_info < (3,): INSTALL_KWARGS["unicode"] = True gettext.install('ubuntu-sso-client', **INSTALL_KWARGS) But that causes problems for Python apps that use the module. For example, duplicity ran into a problem where it uses gettext.install, only to be later overridden by ubuntu_sso's gettext.install. It's not suitable for a Python module to attempt to own Python builtins like _(). This can be reproduced like so: > import gettext > gettext.install('duplicity') > print(_) <bound method NullTranslations.gettext of <gettext.NullTranslations instance at 0xb743ceac>> > import ubuntu_sso.credentials > print(_) <bound method NullTranslations.ugettext of <gettext.NullTranslations instance at 0xb6d4cc0c>> You see how it's changed to ugettext instead of gettext? And it's switched default domains. A more suitable thing for ubuntu_sso to do is something like: t = gettext.translation('ubuntu-sso-client') _ = t.ugettext This is what the gettext documentation recommends for modules (http://docs.python.org/library/gettext.html#gettext.NullTranslations.install). [Impact] A consumer of the ubuntu_sso python module will have their translations rendered inoperable after importing ubuntu_sso.utils.ui (which happens accidentally easily, like say importing ubuntuone.platform.credentials). One noticeable side effect of this is that all Deja Dup users that back up to Ubuntu One and have a utf8 filename in the backup, will see an error instead of being able to back up. [Test Case] python > import ubuntu_sso.utils.ui > _ If the fault exists, you'll see: <bound method NullTranslations.ugettext of <gettext.NullTranslations instance at 0x9cbbd0c>> If everything is fine (and the module didn't define _ in the global context), you'll see: Traceback (most recent call last): File "<stdin>", line 1, in <module> NameError: name '_' is not defined [Regression Potential] Unexpected regressions might include lack of translations for ubuntu_sso if the patch messes up grabbing those translations. [Original Report] In utils/ui.py, the following lines are used: INSTALL_KWARGS = {} if sys.version_info < (3,):     INSTALL_KWARGS["unicode"] = True gettext.install('ubuntu-sso-client', **INSTALL_KWARGS) But that causes problems for Python apps that use the module. For example, duplicity ran into a problem where it uses gettext.install, only to be later overridden by ubuntu_sso's gettext.install. It's not suitable for a Python module to attempt to own Python builtins like _(). This can be reproduced like so: > import gettext > gettext.install('duplicity') > print(_) <bound method NullTranslations.gettext of <gettext.NullTranslations instance at 0xb743ceac>> > import ubuntu_sso.credentials > print(_) <bound method NullTranslations.ugettext of <gettext.NullTranslations instance at 0xb6d4cc0c>> You see how it's changed to ugettext instead of gettext? And it's switched default domains. A more suitable thing for ubuntu_sso to do is something like: t = gettext.translation('ubuntu-sso-client') _ = t.ugettext This is what the gettext documentation recommends for modules (http://docs.python.org/library/gettext.html#gettext.NullTranslations.install).
2012-09-13 17:07:05 Michael Terry description [Impact] A consumer of the ubuntu_sso python module will have their translations rendered inoperable after importing ubuntu_sso.utils.ui (which happens accidentally easily, like say importing ubuntuone.platform.credentials). One noticeable side effect of this is that all Deja Dup users that back up to Ubuntu One and have a utf8 filename in the backup, will see an error instead of being able to back up. [Test Case] python > import ubuntu_sso.utils.ui > _ If the fault exists, you'll see: <bound method NullTranslations.ugettext of <gettext.NullTranslations instance at 0x9cbbd0c>> If everything is fine (and the module didn't define _ in the global context), you'll see: Traceback (most recent call last): File "<stdin>", line 1, in <module> NameError: name '_' is not defined [Regression Potential] Unexpected regressions might include lack of translations for ubuntu_sso if the patch messes up grabbing those translations. [Original Report] In utils/ui.py, the following lines are used: INSTALL_KWARGS = {} if sys.version_info < (3,):     INSTALL_KWARGS["unicode"] = True gettext.install('ubuntu-sso-client', **INSTALL_KWARGS) But that causes problems for Python apps that use the module. For example, duplicity ran into a problem where it uses gettext.install, only to be later overridden by ubuntu_sso's gettext.install. It's not suitable for a Python module to attempt to own Python builtins like _(). This can be reproduced like so: > import gettext > gettext.install('duplicity') > print(_) <bound method NullTranslations.gettext of <gettext.NullTranslations instance at 0xb743ceac>> > import ubuntu_sso.credentials > print(_) <bound method NullTranslations.ugettext of <gettext.NullTranslations instance at 0xb6d4cc0c>> You see how it's changed to ugettext instead of gettext? And it's switched default domains. A more suitable thing for ubuntu_sso to do is something like: t = gettext.translation('ubuntu-sso-client') _ = t.ugettext This is what the gettext documentation recommends for modules (http://docs.python.org/library/gettext.html#gettext.NullTranslations.install). [Impact] A consumer of the ubuntu_sso python module will have their translations rendered inoperable after importing ubuntu_sso.utils.ui (which happens accidentally easily, like say importing ubuntuone.platform.credentials). One noticeable side effect of this is that all Deja Dup users that back up to Ubuntu One and have a utf8 filename in the backup, will see an error instead of being able to back up. (bug 989496) [Test Case] python > import ubuntu_sso.utils.ui > _ If the fault exists, you'll see: <bound method NullTranslations.ugettext of <gettext.NullTranslations instance at 0x9cbbd0c>> If everything is fine (and the module didn't define _ in the global context), you'll see: Traceback (most recent call last):   File "<stdin>", line 1, in <module> NameError: name '_' is not defined [Regression Potential] Unexpected regressions might include lack of translations for ubuntu_sso if the patch messes up grabbing those translations. [Original Report] In utils/ui.py, the following lines are used: INSTALL_KWARGS = {} if sys.version_info < (3,):     INSTALL_KWARGS["unicode"] = True gettext.install('ubuntu-sso-client', **INSTALL_KWARGS) But that causes problems for Python apps that use the module. For example, duplicity ran into a problem where it uses gettext.install, only to be later overridden by ubuntu_sso's gettext.install. It's not suitable for a Python module to attempt to own Python builtins like _(). This can be reproduced like so: > import gettext > gettext.install('duplicity') > print(_) <bound method NullTranslations.gettext of <gettext.NullTranslations instance at 0xb743ceac>> > import ubuntu_sso.credentials > print(_) <bound method NullTranslations.ugettext of <gettext.NullTranslations instance at 0xb6d4cc0c>> You see how it's changed to ugettext instead of gettext? And it's switched default domains. A more suitable thing for ubuntu_sso to do is something like: t = gettext.translation('ubuntu-sso-client') _ = t.ugettext This is what the gettext documentation recommends for modules (http://docs.python.org/library/gettext.html#gettext.NullTranslations.install).
2012-09-13 17:19:34 Michael Terry bug added subscriber Ubuntu Stable Release Updates Team
2012-09-19 14:06:22 Ubuntu One Auto Pilot ubuntu-sso-client/stable-4-0: status Triaged Fix Committed
2012-09-19 14:20:54 dobey ubuntu-sso-client/trunk: status Fix Committed Fix Released
2012-09-19 14:20:56 dobey ubuntu-sso-client/stable-4-0: status Fix Committed Fix Released
2012-09-19 14:22:01 dobey nominated for series ubuntu-sso-client/stable-3-0
2012-09-19 14:22:01 dobey bug task added ubuntu-sso-client/stable-3-0
2012-09-19 14:22:10 dobey ubuntu-sso-client/stable-3-0: status New Triaged
2012-09-19 15:30:09 Launchpad Janitor ubuntu-sso-client (Ubuntu Quantal): status New Fix Released
2012-09-19 16:43:01 Launchpad Janitor branch linked lp:ubuntu/ubuntu-sso-client
2012-10-04 23:20:35 Clint Byrum ubuntu-sso-client (Ubuntu Precise): status New Fix Committed
2012-10-04 23:20:38 Clint Byrum bug added subscriber SRU Verification
2012-10-04 23:20:47 Clint Byrum tags verification-needed
2012-10-04 23:51:06 Launchpad Janitor branch linked lp:ubuntu/precise-proposed/ubuntu-sso-client
2012-10-28 19:50:51 Sebastian Bator bug added subscriber Sebastian Bator
2012-11-26 23:57:08 Michael Terry tags verification-needed verification-done
2012-11-27 17:45:05 Colin Watson removed subscriber Ubuntu Stable Release Updates Team
2012-11-27 17:45:16 Launchpad Janitor ubuntu-sso-client (Ubuntu Precise): status Fix Committed Fix Released
2012-11-27 17:52:19 todaioan ubuntu-sso-client/stable-3-0: status Triaged Fix Committed