Indeed, if you import gi.repository.Gtk it won't, but it still does if you import pango.
-- You received this bug notification because you are a member of Desktop Packages, which is subscribed to pygtk in Ubuntu. https://bugs.launchpad.net/bugs/27112 Title: "import gtk" changes sys.getdefaultencoding() Status in PyGTK: GTK+ for Python: Confirmed Status in “pygtk” package in Ubuntu: Invalid Bug description: >>> 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. http://bugzilla.gnome.org/show_bug.cgi?id=132040: http://bugzilla.gnome.org/show_bug.cgi?id=132040 To manage notifications about this bug go to: https://bugs.launchpad.net/pygtk/+bug/27112/+subscriptions -- Mailing list: https://launchpad.net/~desktop-packages Post to : desktop-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~desktop-packages More help : https://help.launchpad.net/ListHelp