1. imbolc
  2. pysi

Commits

imbolc  committed 95fe59a

use asjson package

  • Participants
  • Parent commits 1dd5aa0
  • Branches default

Comments (0)

Files changed (2)

File pysi/template.py

View file
 
 @cached_function
 def _json_dumps():
-    try:
-        import simplejson as json
-    except ImportError:
-        import json
-    except ImportError:
-        from django.utils import simplejson as json
-    except ImportError:
-        raise ImportError('Json module not found')
-    kw = {'default': json_default_handler}
-    if cfg.DEBUG:
-        kw['indent'] = 2
-    return lambda obj: json.dumps(obj, **kw)
-
-def json_default_handler(obj):
-    return obj.isoformat() if isinstance(obj, datetime) else None
+    import asjson
+    return lambda obj: asjson.dumps(obj, debug=cfg.DEBUG)
 
 
 @cached_function

File setup.py

View file
 import os
 from setuptools import setup
 
-VERSION = '0.14.0'
+VERSION = '0.15.0'
 PACKAGE = 'pysi'
 
 if __name__ == '__main__':
         name = PACKAGE,
         packages = packages,
         package_data = {'pysi': data_files},
-        license = "BSD",
+        license = "MIT",
         keywords = "web framework",
         classifiers=[
             'Development Status :: 4 - Beta',
             'Topic :: Software Development :: Libraries :: Application Frameworks',
             'Topic :: Software Development :: Libraries :: Python Modules',
         ],
-        install_requires=['simplejson', 'jinja2'],
+        install_requires=['asjson', 'simplejson', 'jinja2'],
     )