Please do not reply to this email.  You can add comments at
http://bugzilla.ubuntu.com/show_bug.cgi?id=21024
Ubuntu | python-gtk2

           Summary: "import gtk" changes sys.getdefaultencoding()
           Product: Ubuntu
           Version: unspecified
          Platform: Other
        OS/Version: other
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: python-gtk2
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]
         QAContact: [email protected]


>>> import sys
>>> print sys.getdefaultencoding()
'ascii'
>>> import gtk
>>> print sys.getdefaultencoding()
'utf-8'

This is bad.  It is generally a bad idea for a library to change global state
that may break other libraries; it's worse that it does this as a side-effect of
merely being imported.  sys.setdefaultencoding is also generally considered a
misfeature by the Python developers, and changing the default encoding from
'ascii' (except perhaps to 'undefined') is asking for potential bugs to be
hidden, rather than raising exceptions when you'd expect.  There's a reason
sys.setdefaultencoding is not accessible by default.

-- 
Configure bugmail: http://bugzilla.ubuntu.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.

--
desktop-bugs mailing list
[email protected]
http://lists.ubuntu.com/mailman/listinfo/desktop-bugs

Reply via email to