Description of problem: Django includes a local copy of simplejson: /usr/lib/python2.5/site-packages/django/utils/simplejson/ django needs to use the system simplejson instead. This is described in the following guideline: http://fedoraproject.org/wiki/Packaging/Guidelines#Duplication_of_system_libraries Version-Release number of selected component (if applicable): 1.0-1
Here is a quick list of what is using the snapshot simplejson inside of Django ... [steve@tachikoman django]$ pwd /usr/lib/python2.5/site-packages/django [steve@tachikoman django]$ grep -r "simplejson" * | grep -v Binary core/serializers/json.py:from django.utils import simplejson core/serializers/json.py: simplejson.dump(self.objects, self.stream, cls=DjangoJSONEncoder, **self.options) core/serializers/json.py: for obj in PythonDeserializer(simplejson.load(stream)): core/serializers/json.py:class DjangoJSONEncoder(simplejson.JSONEncoder): test/testcases.py:from django.utils import simplejson test/testcases.py: want_json = simplejson.loads(want) test/testcases.py: got_json = simplejson.loads(got) utils/simplejson/encoder.py: from django.utils.simplejson._speedups import encode_basestring_ascii as c_encode_basestring_ascii utils/simplejson/tool.py:Using simplejson from the shell to validate and utils/simplejson/tool.py: $ echo '{"json":"obj"}' | python -msimplejson utils/simplejson/tool.py: $ echo '{ 1.2:3.4}' | python -msimplejson utils/simplejson/tool.py:import django.utils.simplejson utils/simplejson/tool.py:# curl http://mochikit.com/examples/ajax_tables/domains.json | python -msimplejson.tool utils/simplejson/tool.py: obj = simplejson.load(infile) utils/simplejson/tool.py: simplejson.dump(obj, outfile, sort_keys=True, indent=4) utils/simplejson/__init__.py:simplejson exposes an API familiar to uses of the standard library utils/simplejson/__init__.py: >>> import simplejson utils/simplejson/__init__.py: >>> simplejson.dumps(['foo', {'bar': ('baz', None, 1.0, 2)}]) utils/simplejson/__init__.py: >>> print simplejson.dumps("\"foo\bar") utils/simplejson/__init__.py: >>> print simplejson.dumps(u'\u1234') utils/simplejson/__init__.py: >>> print simplejson.dumps('\\') utils/simplejson/__init__.py: >>> print simplejson.dumps({"c": 0, "b": 0, "a": 0}, sort_keys=True) utils/simplejson/__init__.py: >>> simplejson.dump(['streaming API'], io) utils/simplejson/__init__.py: >>> import simplejson utils/simplejson/__init__.py: >>> simplejson.dumps([1,2,3,{'4': 5, '6': 7}], separators=(',',':')) utils/simplejson/__init__.py: >>> import simplejson utils/simplejson/__init__.py: >>> print simplejson.dumps({'4': 5, '6': 7}, sort_keys=True, indent=4) utils/simplejson/__init__.py: >>> import simplejson utils/simplejson/__init__.py: >>> simplejson.loads('["foo", {"bar":["baz", null, 1.0, 2]}]') utils/simplejson/__init__.py: >>> simplejson.loads('"\\"foo\\bar"') utils/simplejson/__init__.py: >>> simplejson.load(io) utils/simplejson/__init__.py: >>> import simplejson utils/simplejson/__init__.py: >>> simplejson.loads('{"__complex__": true, "real": 1, "imag": 2}', utils/simplejson/__init__.py: >>> simplejson.loads('1.1', parse_float=decimal.Decimal) utils/simplejson/__init__.py: >>> import simplejson utils/simplejson/__init__.py: >>> class ComplexEncoder(simplejson.JSONEncoder): utils/simplejson/__init__.py: ... return simplejson.JSONEncoder.default(self, obj) utils/simplejson/__init__.py:Using simplejson from the shell to validate and utils/simplejson/__init__.py: $ echo '{"json":"obj"}' | python -msimplejson.tool utils/simplejson/__init__.py: $ echo '{ 1.2:3.4}' | python -msimplejson.tool utils/simplejson/__init__.py: warnings.warn('python -msimplejson is deprecated, use python -msiplejson.tool', DeprecationWarning) utils/simplejson/__init__.py: from django.utils.simplejson.decoder import JSONDecoder utils/simplejson/__init__.py: from django.utils.simplejson.encoder import JSONEncoder utils/simplejson/__init__.py: warnings.warn("simplejson.loads(s) should be used instead of decode(s)", utils/simplejson/__init__.py: warnings.warn("simplejson.dumps(s) should be used instead of encode(s)", utils/simplejson/__init__.py: warnings.warn("simplejson.loads(s) should be used instead of read(s)", utils/simplejson/__init__.py: warnings.warn("simplejson.dumps(s) should be used instead of write(s)", utils/simplejson/__init__.py: import simplejson.tool utils/simplejson/__init__.py: simplejson.tool.main() utils/simplejson/decoder.py:from django.utils.simplejson.scanner import Scanner, pattern utils/simplejson/decoder.py: from django.utils.simplejson._speedups import scanstring as c_scanstring one issue I see here is that people may be using "from django.utils import simplejson". To keep apps that use django.utils.simplejson from not working would a link be ok so that it points to the site-lib version of simplejson? Other than that I don't think it will be tough for me or someone else to jump in and patch out the usage internally.
In the python-py review we ran into a similar issue. To keep the public interface compatible the packager and upstream decided to import the module. So something like: rm -rf simplejson/* echo 'from simplejson import *' > simplejson/__init__.py Patching the simplejson imports to be like this: try: import simplejson except ImportError: from django.utils import simplejson Would hopefully be amenable to upstream.
This bug appears to have been reported against 'rawhide' during the Fedora 10 development cycle. Changing version to '10'. More information and reason for this action is here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Django-1.0.2-1.fc10 has been submitted as an update for Fedora 10. http://admin.fedoraproject.org/updates/Django-1.0.2-1.fc10
Django-1.0.2-1.fc9 has been submitted as an update for Fedora 9. http://admin.fedoraproject.org/updates/Django-1.0.2-1.fc9
Django-1.0.2-1.fc8 has been submitted as an update for Fedora 8. http://admin.fedoraproject.org/updates/Django-1.0.2-1.fc8
Django-1.0.2-1.fc8 has been pushed to the Fedora 8 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with su -c 'yum --enablerepo=updates-testing-newkey update Django'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F8/FEDORA-2008-11363
Django-1.0.2-1.fc9 has been pushed to the Fedora 9 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with su -c 'yum --enablerepo=updates-testing-newkey update Django'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F9/FEDORA-2008-11368
Django-1.0.2-1.fc10 has been pushed to the Fedora 10 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with su -c 'yum --enablerepo=updates-testing update Django'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F10/FEDORA-2008-11325
Django-1.0.2-1.fc10 has been pushed to the Fedora 10 stable repository. If problems still persist, please make note of it in this bug report.
Django-1.0.2-1.fc8 has been pushed to the Fedora 8 stable repository. If problems still persist, please make note of it in this bug report.
Django-1.0.2-1.fc9 has been pushed to the Fedora 9 stable repository. If problems still persist, please make note of it in this bug report.