Skip to content

Commit 7b4fb66

Browse files
committed
Merge branch 'master' into jsondiff
2 parents 6b777b7 + b6514dd commit 7b4fb66

File tree

4 files changed

+6
-30
lines changed

4 files changed

+6
-30
lines changed

.travis.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
language: python
22
python:
3-
- "2.6"
43
- "2.7"
54
- "3.3"
65
- "3.4"
@@ -11,7 +10,6 @@ python:
1110

1211
install:
1312
- travis_retry pip install -r requirements.txt
14-
- if [ "$TRAVIS_PYTHON_VERSION" == "3.2" ]; then travis_retry pip install 'coverage<4'; fi
1513
- travis_retry pip install coveralls
1614

1715
script:

doc/index.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
python-json-patch
77
=================
88

9-
*python-json-patch* is a Python library for applying JSON patches (`RFC
10-
6902 <http://tools.ietf.org/html/rfc6902>`_). Python 2.6, 2.7, 3.2, 3.3
11-
and PyPy are supported.
9+
*python-json-patch* is a Python library for applying JSON patches (`RFC 6902
10+
<http://tools.ietf.org/html/rfc6902>`_). Python 2.7 and 3.3-3.6 are
11+
supported. Tests are run on both CPython and PyPy.
1212

1313

1414
**Contents**

jsonpatch.py

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -103,25 +103,9 @@ def multidict(ordered_pairs):
103103
)
104104

105105

106-
def get_loadjson():
107-
""" adds the object_pairs_hook parameter to json.load when possible
108-
109-
The "object_pairs_hook" parameter is used to handle duplicate keys when
110-
loading a JSON object. This parameter does not exist in Python 2.6. This
111-
methods returns an unmodified json.load for Python 2.6 and a partial
112-
function with object_pairs_hook set to multidict for Python versions that
113-
support the parameter. """
114-
115-
if sys.version_info >= (3, 3):
116-
args = inspect.signature(json.load).parameters
117-
else:
118-
args = inspect.getargspec(json.load).args
119-
if 'object_pairs_hook' not in args:
120-
return json.load
121-
122-
return functools.partial(json.load, object_pairs_hook=multidict)
123-
124-
json.load = get_loadjson()
106+
# The "object_pairs_hook" parameter is used to handle duplicate keys when
107+
# loading a JSON object.
108+
json.load = functools.partial(json.load, object_pairs_hook=multidict)
125109

126110

127111
def apply_patch(doc, patch, in_place=False):

setup.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,12 @@
2323
)
2424

2525
REQUIREMENTS = list(open('requirements.txt'))
26-
if sys.version_info < (2, 6):
27-
REQUIREMENTS += ['simplejson']
2826

2927
if has_setuptools:
3028
OPTIONS = {
3129
'install_requires': REQUIREMENTS
3230
}
3331
else:
34-
if sys.version_info < (2, 6):
35-
warnings.warn('No setuptools installed. Be sure that you have '
36-
'json or simplejson package installed')
3732
OPTIONS = {}
3833

3934
AUTHOR_EMAIL = metadata['author']
@@ -61,7 +56,6 @@
6156
'Operating System :: OS Independent',
6257
'Programming Language :: Python',
6358
'Programming Language :: Python :: 2',
64-
'Programming Language :: Python :: 2.6',
6559
'Programming Language :: Python :: 2.7',
6660
'Programming Language :: Python :: 3',
6761
'Programming Language :: Python :: 3.3',

0 commit comments

Comments
 (0)