@@ -35,24 +35,20 @@ not fit in memory.
35
35
Dependencies
36
36
------------
37
37
38
- - python 2.6 (or compatible)
38
+ - python 2.7+, python 3.3+
39
39
- `yajl <http://lloyd.github.com/yajl/ >`_
40
40
41
41
To run the tests you also require:
42
42
43
43
- make (to run ``make test ``)
44
44
- nose (debian package == ``python-nose ``)
45
- - MiniMockTest (``pip install minimocktest ``)
45
+ - mock (``pip install mock ``)
46
46
47
47
Install
48
48
-------
49
49
50
50
From within the current directory run::
51
51
52
- python setup.py install
53
-
54
- - OR Alternatively -
55
-
56
52
pip install .
57
53
58
54
To install from pypi::
65
61
The examples directory contains full featured JSON Parsers built using
66
62
``yajl `` and ``yajl-py ``. See `examples/README.rst <examples/ >`_ for more info.
67
63
64
+ Notes around strings, python 3, and yajl-py
65
+ -------------------------------------------
66
+
67
+ TLDR; if using python3, yajl-py expects bytes and not strings
68
+
69
+ Python 3 fixed a whole string of issues with strings. Due to these fixes
70
+ somethings taken for granted in python 2 are now explicit in python 3. The
71
+ major change that affects yajl-py is related to a decision made within ctypes.
72
+
73
+ Strings going and coming from the ctypes interface to c-code are now bytes.
74
+ Although we can make an explicit decision to decode and encode strings
75
+ transparently to latin-1 or utf-8, this is an arbitrary choice. Even
76
+ though it can be coded in such a way to make the encoding configurable, the
77
+ decision has been made to keep with the decision made by ctypes and hence put
78
+ the onus on the developer to decode/encode the input/output as necessary.
79
+
68
80
Contributions
69
81
-------------
70
82
0 commit comments