File tree Expand file tree Collapse file tree 2 files changed +3
-25
lines changed Expand file tree Collapse file tree 2 files changed +3
-25
lines changed Original file line number Diff line number Diff line change @@ -96,25 +96,9 @@ def multidict(ordered_pairs):
96
96
)
97
97
98
98
99
- def get_loadjson ():
100
- """ adds the object_pairs_hook parameter to json.load when possible
101
-
102
- The "object_pairs_hook" parameter is used to handle duplicate keys when
103
- loading a JSON object. This parameter does not exist in Python 2.6. This
104
- methods returns an unmodified json.load for Python 2.6 and a partial
105
- function with object_pairs_hook set to multidict for Python versions that
106
- support the parameter. """
107
-
108
- if sys .version_info >= (3 , 3 ):
109
- args = inspect .signature (json .load ).parameters
110
- else :
111
- args = inspect .getargspec (json .load ).args
112
- if 'object_pairs_hook' not in args :
113
- return json .load
114
-
115
- return functools .partial (json .load , object_pairs_hook = multidict )
116
-
117
- json .load = get_loadjson ()
99
+ # The "object_pairs_hook" parameter is used to handle duplicate keys when
100
+ # loading a JSON object.
101
+ json .load = functools .partial (json .load , object_pairs_hook = multidict )
118
102
119
103
120
104
def apply_patch (doc , patch , in_place = False ):
Original file line number Diff line number Diff line change 23
23
)
24
24
25
25
REQUIREMENTS = list (open ('requirements.txt' ))
26
- if sys .version_info < (2 , 6 ):
27
- REQUIREMENTS += ['simplejson' ]
28
26
29
27
if has_setuptools :
30
28
OPTIONS = {
31
29
'install_requires' : REQUIREMENTS
32
30
}
33
31
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' )
37
32
OPTIONS = {}
38
33
39
34
AUTHOR_EMAIL = metadata ['author' ]
61
56
'Operating System :: OS Independent' ,
62
57
'Programming Language :: Python' ,
63
58
'Programming Language :: Python :: 2' ,
64
- 'Programming Language :: Python :: 2.6' ,
65
59
'Programming Language :: Python :: 2.7' ,
66
60
'Programming Language :: Python :: 3' ,
67
61
'Programming Language :: Python :: 3.3' ,
You can’t perform that action at this time.
0 commit comments