"import gtk" changes sys.getdefaultencoding()
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
PyGTK |
Won't Fix
|
Medium
|
|||
pygtk (Ubuntu) |
Invalid
|
Medium
|
Sebastien Bacher |
Bug Description
>>> import sys
>>> print sys.getdefaulte
'ascii'
>>> import gtk
>>> print sys.getdefaulte
'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.setdefaulte
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.setdefaulte
http://
Changed in pygtk: | |
status: | Unconfirmed → Confirmed |
status: | Unconfirmed → Confirmed |
Changed in pygtk: | |
status: | Unconfirmed → Confirmed |
Changed in pygtk: | |
importance: | Unknown → Medium |
Changed in pygtk: | |
status: | Confirmed → Won't Fix |
Thanks for your bug. I've forwarded it upstream: bugzilla. gnome.org/ show_bug. cgi?id= 324323
http://