[issue6105] json.dumps doesn't respect OrderedDict's iteration order

2010-10-30 Thread Raymond Hettinger
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

[issue6105] json.dumps doesn't respect OrderedDict's iteration order

2010-10-29 Thread Benjamin Peterson
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

[issue6105] json.dumps doesn't respect OrderedDict's iteration order

2010-10-29 Thread Raymond Hettinger
Changes by Raymond Hettinger rhettin...@users.sourceforge.net: -- priority: normal - high ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6105 ___

[issue6105] json.dumps doesn't respect OrderedDict's iteration order

2010-08-07 Thread Benjamin Peterson
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 ___

[issue6105] json.dumps doesn't respect OrderedDict's iteration order

2010-06-22 Thread Raymond Hettinger
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

[issue6105] json.dumps doesn't respect OrderedDict's iteration order

2010-05-20 Thread Skip Montanaro
Changes by Skip Montanaro s...@pobox.com: -- nosy: -skip.montanaro ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6105 ___ ___ Python-bugs-list

[issue6105] json.dumps doesn't respect OrderedDict's iteration order

2009-09-21 Thread Raymond Hettinger
Changes by Raymond Hettinger rhettin...@users.sourceforge.net: -- versions: -Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6105 ___

[issue6105] json.dumps doesn't respect OrderedDict's iteration order

2009-05-27 Thread Raymond Hettinger
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

[issue6105] json.dumps doesn't respect OrderedDict's iteration order

2009-05-26 Thread Robert Lehmann
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

[issue6105] json.dumps doesn't respect OrderedDict's iteration order

2009-05-26 Thread Skip Montanaro
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

[issue6105] json.dumps doesn't respect OrderedDict's iteration order

2009-05-26 Thread Raymond Hettinger
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

[issue6105] json.dumps doesn't respect OrderedDict's iteration order

2009-05-25 Thread Wang Chun
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

[issue6105] json.dumps doesn't respect OrderedDict's iteration order

2009-05-25 Thread Benjamin Peterson
Changes by Benjamin Peterson benja...@python.org: -- assignee: - rhettinger nosy: +rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6105 ___

[issue6105] json.dumps doesn't respect OrderedDict's iteration order

2009-05-25 Thread Raymond Hettinger
Changes by Raymond Hettinger rhettin...@users.sourceforge.net: -- priority: - critical ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6105 ___ ___