[issue14570] Document json sort_keys parameter properly

2012-10-28 Thread Chris Rebert

Chris Rebert added the comment:

Per Chris Jerdonek, here's a combined patch that also makes the docs changes 
comply with the antiquated line length limit.

--
Added file: http://bugs.python.org/file27759/issue14570.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14570
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14570] Document json sort_keys parameter properly

2012-10-28 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 40aedc7da30f by Andrew Svetlov in branch '3.2':
Issue #14570: Document json sort_keys parameter properly.
http://hg.python.org/cpython/rev/40aedc7da30f

New changeset 090484ccba7d by Andrew Svetlov in branch '3.3':
Merge issue #14570: Document json sort_keys parameter properly.
http://hg.python.org/cpython/rev/090484ccba7d

New changeset 27ce005372a5 by Andrew Svetlov in branch 'default':
Merge issue #14570: Document json sort_keys parameter properly.
http://hg.python.org/cpython/rev/27ce005372a5

--
nosy: +python-dev

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14570
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14570] Document json sort_keys parameter properly

2012-10-28 Thread Andrew Svetlov

Andrew Svetlov added the comment:

Thanks, Chris!
I have pushed the patch for 3.2-3.4
It cannot be applied to 2.7, please make separate patch for this version.

--
nosy: +asvetlov

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14570
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14570] Document json sort_keys parameter properly

2012-10-28 Thread Chris Rebert

Chris Rebert added the comment:

Patch for 2.7. This assumes that changing the parameter notation is permissible.

--
Added file: http://bugs.python.org/file27765/issue14570-2.7.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14570
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14570] Document json sort_keys parameter properly

2012-10-28 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 7784008e9ade by Andrew Svetlov in branch '2.7':
Issue #14570: Document json sort_keys parameter properly.
http://hg.python.org/cpython/rev/7784008e9ade

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14570
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14570] Document json sort_keys parameter properly

2012-10-28 Thread Andrew Svetlov

Andrew Svetlov added the comment:

Fixed, thanks again!

--
resolution:  - fixed
stage: patch review - committed/rejected
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14570
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14570] Document json sort_keys parameter properly

2012-09-15 Thread Chris Rebert

Chris Rebert added the comment:

Any reactions? The patch is pretty straightforward...

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14570
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14570] Document json sort_keys parameter properly

2012-09-15 Thread Ezio Melotti

Changes by Ezio Melotti ezio.melo...@gmail.com:


--
nosy: +petri.lehtinen
stage: needs patch - patch review

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14570
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14570] Document json sort_keys parameter properly

2012-09-15 Thread Chris Jerdonek

Chris Jerdonek added the comment:

I would recommend making the added and modified lines not exceed 79 characters 
in both files.  Also, for the .rst file, you can use slashes to break lines as 
shown in the following example:

http://hg.python.org/cpython/file/09011896374d/Doc/library/argparse.rst#l133

--
nosy: +cjerdonek

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14570
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14570] Document json sort_keys parameter properly

2012-09-15 Thread Chris Jerdonek

Chris Jerdonek added the comment:

Also, while not strictly necessary, it is more customary and convenient to 
provide a single patch file for all files.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14570
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14570] Document json sort_keys parameter properly

2012-09-01 Thread Chris Rebert

Changes by Chris Rebert pyb...@rebertia.com:


Added file: http://bugs.python.org/file27090/json.rst.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14570
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14570] Document json sort_keys parameter properly

2012-09-01 Thread Chris Rebert

Chris Rebert added the comment:

Attached updated patches.

--
Added file: http://bugs.python.org/file27091/json_init.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14570
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14570] Document json sort_keys parameter properly

2012-08-27 Thread Chris Rebert

Chris Rebert added the comment:

Erm, the patch seems to have some ANSI terminal coloring escape code junk (e.g. 
) in it...

--
nosy: +cvrebert

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14570
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14570] Document json sort_keys parameter properly

2012-04-30 Thread Michal Nowikowski

Michal Nowikowski godf...@gmail.com added the comment:

Attached a patch.
To preserve current order of arguments in dumps/dump functions sort_keys 
argument has been added to the end of arguments just before **kw.

--
keywords: +patch
Added file: http://bugs.python.org/file25427/json-sort-keys.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14570
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14570] Document json sort_keys parameter properly

2012-04-28 Thread Michal Nowikowski

Michal Nowikowski godf...@gmail.com added the comment:

In json module there are dump/dumps methods which internally instantiate 
encoder class JSONEncoder (or some other user-defined encoder clas).
They look as follows:

json.dump(obj, fp, 
  skipkeys=False,
  ensure_ascii=True,
  check_circular=True, 
  allow_nan=True,
  cls=None,
  indent=None,
  separators=None,
  default=None, 
  **kw)

json.JSONEncoder(skipkeys=False, 
 ensure_ascii=True,
 check_circular=True,
 allow_nan=True,
 sort_keys=False,
 indent=None,
 separators=None,
 default=None)

Some of dump/dumps arguments are passed to encoder class:
- skipkeys
- ensure_ascii
- check_circular
- allow_nan
- indent
- separators
- default

And it looks that sort_keys is just missing in keyword args in dump/dumps 
method.
But it still can be passed implicitly using **kw arg.

I would propose to do:
- add explicitly sort_keys keyword arg to dump/dumps methods
- add passing it to encoder class
- and adjust documentation accordingly.

--
nosy: +godfryd

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14570
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14570] Document json sort_keys parameter properly

2012-04-13 Thread Ezio Melotti

Changes by Ezio Melotti ezio.melo...@gmail.com:


--
nosy: +ezio.melotti

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14570
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14570] Document json sort_keys parameter properly

2012-04-12 Thread Nick Coghlan

New submission from Nick Coghlan ncogh...@gmail.com:

The json sort_keys parameter is actually supported as an argument to dump() 
and dumps() (and is used that way in the examples), but is only documented as 
an argument to the JSONEncoder constructor.

--
assignee: docs@python
components: Documentation
keywords: easy
messages: 158194
nosy: docs@python, ncoghlan
priority: normal
severity: normal
stage: needs patch
status: open
title: Document json sort_keys parameter properly
type: enhancement
versions: Python 2.7, Python 3.2, Python 3.3

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14570
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com