mahsoud / boar

Automatically exported from code.google.com/p/boar
0 stars 0 forks source link

Boar breaks on some versions of Python 2.7 due to Python bug #72

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a repository and a session
2. Check out the session

What is the expected output? What do you see instead?
There is an assertion error where a string is expected to be a unicode string, 
but actually is a regular string.

Please use labels and text to provide additional information.
This problem is because the behaviour of the json module has changed from 
Python 2.6. In 2.6, all json decoded strings were returned as unicode strings. 
In earlier python 2.7 versions, it depends on the contents of the string, and 
is only returned as unicode if the string contains non-ascii chars. This seems 
to have been considered a bug (http://bugs.python.org/issue10038), and is 
likely fixed in later 2.7 versions. Details pending investigation.

Original issue reported on code.google.com by ekb...@gmail.com on 27 Apr 2012 at 8:26

GoogleCodeExporter commented 9 years ago
This issue was fixed in Python 2.7.2 (Issue 10038 in 
http://hg.python.org/cpython/raw-file/eb3c9b74884c/Misc/NEWS)

Original comment by ekb...@gmail.com on 27 Apr 2012 at 11:31

GoogleCodeExporter commented 9 years ago
Fixed in changeset 38413fa40748. The fix consists of checking for the bug and 
then simply telling the user the following error message:

Your Python version seems to contain a known json decoding bug 
http://bugs.python.org/issue10038). It affects Python 2.7 and 2.7.1. You should 
upgrade (or downgrade) your Python installation.

Original comment by ekb...@gmail.com on 21 May 2012 at 7:21