[stdlib-sig] Getting simplejson 1.9 into the stdlib

Christian Heimes christian at cheimes.de
Sun May 4 13:55:34 CEST 2008


Brett Cannon schrieb:
> http://bugs.python.org/issue2750 holds the issue to get simplejson 1.9
> into the stdlib as the new 'json' module. I am going to give this SIG
> a week to go through the code and such before I announce on
> python-dev. The todo list is:
> 
> * Get it building in the core.
> * Make sure the tests are good and run without issue.
> * Convert the docs (the docstrings are already in reST, so it should
> mostly be a copy-and-paste job with some added markup).
> * Verify the code is PEP 7/PEP 8 compatible.
> * Convert to 3.0.

Brett, Benjamin and I worked on the json package yesterday. The code is
in
bzr+ssh://pythonbzr@code.python.org/python/users/brett/issue2750-simplejson/

I mostly worked on the C extension with the json speedups:

* Added file as Modules/_json.c
* Added build steps to setup.py, PC/config.c and all four pythoncore
projects for VS 6.0 to 9.0.
* Removed code to support Python versions before 2,5
* Slightly arranged code for PEP 7 compatibility
* Changed Python code so that the C implementation is available as
c_function and the pure Python one as py_function
* Added tests to verify Python uses the optimized functions

The code runs w/o errors or ref leaks on Mac OS X and Linux x86 as UCS2
and UCS4 build. The Windows tests are passing, too.

Christian


More information about the stdlib-sig mailing list