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):
9696 )
9797
9898
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 )
118102
119103
120104def apply_patch (doc , patch , in_place = False ):
Original file line number Diff line number Diff line change 2323)
2424
2525REQUIREMENTS = list (open ('requirements.txt' ))
26- if sys .version_info < (2 , 6 ):
27- REQUIREMENTS += ['simplejson' ]
2826
2927if has_setuptools :
3028 OPTIONS = {
3129 'install_requires' : REQUIREMENTS
3230 }
3331else :
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
3934AUTHOR_EMAIL = metadata ['author' ]
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' ,
You can’t perform that action at this time.
0 commit comments