Raymond Hettinger rhettin...@users.sourceforge.net added the comment:
Backported to 2.7
See r85966
--
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6105
Benjamin Peterson benja...@python.org added the comment:
Upon further consideration, I think this could be backported.
--
assignee: benjamin.peterson - rhettinger
resolution: wont fix -
status: closed - open
___
Python tracker rep...@bugs.python.org
Changes by Raymond Hettinger rhettin...@users.sourceforge.net:
--
priority: normal - high
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6105
___
Benjamin Peterson benja...@python.org added the comment:
I think we should close it.
--
resolution: - wont fix
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6105
___
Raymond Hettinger rhettin...@users.sourceforge.net added the comment:
Benjamin, it's a little late for this one for 2.7. Do you prefer to close it
forever or to treat it as a bug fix for 2.7.1?
--
assignee: rhettinger - benjamin.peterson
nosy: +benjamin.peterson
Changes by Skip Montanaro s...@pobox.com:
--
nosy: -skip.montanaro
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6105
___
___
Python-bugs-list
Changes by Raymond Hettinger rhettin...@users.sourceforge.net:
--
versions: -Python 3.1
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6105
___
Raymond Hettinger rhettin...@users.sourceforge.net added the comment:
r72961 Fixed for Py3.1. Leaving open until backported to 2.7.
--
priority: critical - normal
versions: +Python 3.1
___
Python tracker rep...@bugs.python.org
Robert Lehmann lehman...@gmail.com added the comment:
This only seems to be the case with the C implementation of json (_json).
json.encoder.c_make_encoder = None
json.dumps(OrderedDict(items))
'{one: 1, two: 2, three: 3, four: 4, five: 5}'
I think the culprit is encoder_listencode_dict
Skip Montanaro s...@pobox.com added the comment:
I can't see that the order of keys should matter for language-neutral
serialization libs like json or xmlrpclib. You're quite possibly
going to be communicating with something on the other end which doesn't
have an OrderedDict-like class. Why
Raymond Hettinger rhettin...@users.sourceforge.net added the comment:
Skip, the json API for 2.7/3.1 includes an object_pairs_hook that allows
an OrderedDict to be generated from a json file. The OP is pointing out
that the latest C upgrade prevents round-tripping while preserving
order. Use
New submission from Wang Chun yaohua2...@gmail.com:
PEP-0372 and Issue 5381 both say json.dumps respect OrderedDict's
iteration order, but the example in them do not work on my latest trunk
build.
$ uname -a
Linux 12.38 2.6.18-128.el5 #1 SMP Wed Dec 17 11:41:38 EST 2008 x86_64
x86_64 x86_64
Changes by Benjamin Peterson benja...@python.org:
--
assignee: - rhettinger
nosy: +rhettinger
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6105
___
Changes by Raymond Hettinger rhettin...@users.sourceforge.net:
--
priority: - critical
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6105
___
___
14 matches
Mail list logo