Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
2812d3d9
Commit
2812d3d9
authored
Jan 25, 2018
by
INADA Naoki
Committed by
GitHub
Jan 25, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bpo-32360: Remove OrderedDict usage from json.tool (GH-5315)
`object_pairs_hook=OrderedDict` idiom is deprecated.
parent
f320be77
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
6 deletions
+1
-6
Lib/json/tool.py
Lib/json/tool.py
+1
-6
No files found.
Lib/json/tool.py
View file @
2812d3d9
...
@@ -11,7 +11,6 @@ Usage::
...
@@ -11,7 +11,6 @@ Usage::
"""
"""
import
argparse
import
argparse
import
collections
import
json
import
json
import
sys
import
sys
...
@@ -34,11 +33,7 @@ def main():
...
@@ -34,11 +33,7 @@ def main():
sort_keys
=
options
.
sort_keys
sort_keys
=
options
.
sort_keys
with
infile
:
with
infile
:
try
:
try
:
if
sort_keys
:
obj
=
json
.
load
(
infile
)
obj
=
json
.
load
(
infile
)
else
:
obj
=
json
.
load
(
infile
,
object_pairs_hook
=
collections
.
OrderedDict
)
except
ValueError
as
e
:
except
ValueError
as
e
:
raise
SystemExit
(
e
)
raise
SystemExit
(
e
)
with
outfile
:
with
outfile
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment