mirror of
https://github.com/ultrajson/ultrajson.git
synced 2024-09-20 19:32:05 +02:00
Drop EOL Python 2.5, 2.6, 3.2 and 3.3
This commit is contained in:
parent
16138e97b4
commit
054c0b7a34
@ -1,13 +1,11 @@
|
||||
sudo: false
|
||||
language: python
|
||||
python:
|
||||
- "2.6"
|
||||
- "2.7"
|
||||
- "3.3"
|
||||
- "3.4"
|
||||
- "3.5"
|
||||
- "3.6"
|
||||
install:
|
||||
- pip install six blist unittest2 pytz
|
||||
- pip install six blist
|
||||
- python setup.py install
|
||||
script: python tests/tests.py
|
||||
|
@ -12,7 +12,7 @@ UltraJSON
|
||||
:alt: Travis CI build status
|
||||
:target: https://travis-ci.org/esnme/ultrajson
|
||||
|
||||
UltraJSON is an ultra fast JSON encoder and decoder written in pure C with bindings for Python 2.5+ and 3.
|
||||
UltraJSON is an ultra fast JSON encoder and decoder written in pure C with bindings for Python 2.7 and 3.4+.
|
||||
|
||||
For a more painless day to day C/C++ JSON decoder experience please checkout ujson4c_, based on UltraJSON.
|
||||
|
||||
|
@ -45,10 +45,6 @@ static PyObject* type_decimal = NULL;
|
||||
|
||||
typedef void *(*PFN_PyTypeToJSON)(JSOBJ obj, JSONTypeContext *ti, void *outValue, size_t *_outLen);
|
||||
|
||||
#if (PY_VERSION_HEX < 0x02050000)
|
||||
typedef ssize_t Py_ssize_t;
|
||||
#endif
|
||||
|
||||
typedef struct __TypeContext
|
||||
{
|
||||
JSPFN_ITEREND iterEnd;
|
||||
|
8
setup.py
8
setup.py
@ -2,13 +2,11 @@ try:
|
||||
from setuptools import setup, Extension
|
||||
except ImportError:
|
||||
from distutils.core import setup, Extension
|
||||
import distutils.sysconfig
|
||||
from distutils.sysconfig import customize_compiler
|
||||
from distutils.command.build_clib import build_clib
|
||||
from distutils.command.build_ext import build_ext
|
||||
import os.path
|
||||
import re
|
||||
import sys
|
||||
from glob import glob
|
||||
|
||||
CLASSIFIERS = filter(None, map(str.strip,
|
||||
@ -18,12 +16,8 @@ Intended Audience :: Developers
|
||||
License :: OSI Approved :: BSD License
|
||||
Programming Language :: C
|
||||
Programming Language :: Python :: 2
|
||||
Programming Language :: Python :: 2.5
|
||||
Programming Language :: Python :: 2.6
|
||||
Programming Language :: Python :: 2.7
|
||||
Programming Language :: Python :: 3
|
||||
Programming Language :: Python :: 3.2
|
||||
Programming Language :: Python :: 3.3
|
||||
Programming Language :: Python :: 3.4
|
||||
Programming Language :: Python :: 3.5
|
||||
Programming Language :: Python :: 3.6
|
||||
@ -104,6 +98,6 @@ setup(
|
||||
platforms=['any'],
|
||||
url="http://www.esn.me",
|
||||
cmdclass = {'build_ext': build_ext, 'build_clib': build_clib_without_warnings},
|
||||
python_requires='>=2.5, !=3.0.*, !=3.1.*',
|
||||
python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*',
|
||||
classifiers=CLASSIFIERS,
|
||||
)
|
||||
|
@ -1,23 +1,16 @@
|
||||
# coding=UTF-8
|
||||
from __future__ import print_function, unicode_literals
|
||||
import six
|
||||
from six.moves import range, zip
|
||||
|
||||
import calendar
|
||||
import functools
|
||||
import decimal
|
||||
import functools
|
||||
import json
|
||||
import math
|
||||
import time
|
||||
import sys
|
||||
import pytz
|
||||
import unittest
|
||||
|
||||
if six.PY2:
|
||||
import unittest2 as unittest
|
||||
else:
|
||||
import unittest
|
||||
import six
|
||||
|
||||
import ujson
|
||||
from six.moves import range, zip
|
||||
|
||||
json_unicode = json.dumps if six.PY3 else functools.partial(json.dumps, encoding="utf-8")
|
||||
|
||||
@ -348,7 +341,6 @@ class UltraJSONTests(unittest.TestCase):
|
||||
input = -float('inf')
|
||||
self.assertRaises(OverflowError, ujson.encode, input)
|
||||
|
||||
@unittest.skipIf(sys.version_info < (2, 7), "No Ordered dict in < 2.7")
|
||||
def test_encodeOrderedDict(self):
|
||||
from collections import OrderedDict
|
||||
input = OrderedDict([(1, 1), (0, 0), (8, 8), (2, 2)])
|
||||
|
Loading…
Reference in New Issue
Block a user