Message162415
I find that on Python 2.7.3 64-bit Windows, the deletion of locale.encodings is also necessary:
PS C:\Users\jaraco> python
Python 2.7.3 (default, Apr 10 2012, 23:24:47) [MSC v.1500 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> b'x'.decode('utf-8')
u'x'
>>> del sys.modules['encodings.utf_8'], sys.modules['encodings']
>>> b'x'.decode('utf-8')
u'x'
>>> ^Z
PS C:\Users\jaraco> python
Python 2.7.3 (default, Apr 10 2012, 23:24:47) [MSC v.1500 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> b'x'.decode('utf-8')
u'x'
>>> import locale; del locale.encodings # Not necessary with python2
>>> del sys.modules['encodings.utf_8'], sys.modules['encodings']
>>> b'x'.decode('utf-8')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "c:\python\lib\encodings\utf_8.py", line 16, in decode
return codecs.utf_8_decode(input, errors, True)
AttributeError: 'NoneType' object has no attribute 'utf_8_decode' |
|
Date |
User |
Action |
Args |
2012-06-06 16:53:19 | jaraco | set | recipients:
+ jaraco, amaury.forgeotdarc, weirdink13 |
2012-06-06 16:53:19 | jaraco | set | messageid: <1339001599.14.0.552137942368.issue14847@psf.upfronthosting.co.za> |
2012-06-06 16:53:18 | jaraco | link | issue14847 messages |
2012-06-06 16:53:17 | jaraco | create | |
|