diff options
author | Brett Cannon <brett@python.org> | 2012-10-28 15:49:00 (GMT) |
---|---|---|
committer | Brett Cannon <brett@python.org> | 2012-10-28 15:49:00 (GMT) |
commit | 6c1da829bac310f555d3f3e8e643e9966d7d77fc (patch) | |
tree | c682aa7ee04dca5433bef4d27b487eafdf244b9f /Doc | |
parent | f873d7c20e9b87e13b27d0eff34c5f50358d4105 (diff) | |
parent | 6294305c2f97eca55789574d8f14aa6765bb3007 (diff) | |
download | cpython-6c1da829bac310f555d3f3e8e643e9966d7d77fc.zip cpython-6c1da829bac310f555d3f3e8e643e9966d7d77fc.tar.gz cpython-6c1da829bac310f555d3f3e8e643e9966d7d77fc.tar.bz2 |
merge
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/Makefile | 5 | ||||
-rw-r--r-- | Doc/library/json.rst | 13 | ||||
-rw-r--r-- | Doc/library/subprocess.rst | 4 | ||||
-rw-r--r-- | Doc/tools/sphinxext/static/version_switch.js | 18 | ||||
-rw-r--r-- | Doc/whatsnew/2.6.rst | 2 | ||||
-rw-r--r-- | Doc/whatsnew/2.7.rst | 2 | ||||
-rw-r--r-- | Doc/whatsnew/3.0.rst | 2 | ||||
-rw-r--r-- | Doc/whatsnew/3.1.rst | 2 | ||||
-rw-r--r-- | Doc/whatsnew/3.2.rst | 2 | ||||
-rw-r--r-- | Doc/whatsnew/3.3.rst | 3 |
10 files changed, 30 insertions, 23 deletions
diff --git a/Doc/Makefile b/Doc/Makefile index a6dc1e2..a774aad 100644 --- a/Doc/Makefile +++ b/Doc/Makefile @@ -187,6 +187,10 @@ autobuild-dev: make update make dist SPHINXOPTS='-A daily=1 -A versionswitcher=1' +# for quick rebuilds (HTML only) +autobuild-html: + make html SPHINXOPTS='-A daily=1 -A versionswitcher=1' + # for stable releases: only build if not in pre-release stage (alpha, beta, rc) autobuild-stable: @case $(DISTVERSION) in *[abc]*) \ @@ -194,3 +198,4 @@ autobuild-stable: exit 1;; \ esac @make autobuild-dev + diff --git a/Doc/library/json.rst b/Doc/library/json.rst index 95f120c..f9547cb 100644 --- a/Doc/library/json.rst +++ b/Doc/library/json.rst @@ -116,7 +116,10 @@ Using json.tool from the shell to validate and pretty-print:: Basic Usage ----------- -.. function:: dump(obj, fp, skipkeys=False, ensure_ascii=True, check_circular=True, allow_nan=True, cls=None, indent=None, separators=None, default=None, **kw) +.. function:: dump(obj, fp, skipkeys=False, ensure_ascii=True, \ + check_circular=True, allow_nan=True, cls=None, \ + indent=None, separators=None, default=None, \ + sort_keys=False, **kw) Serialize *obj* as a JSON formatted stream to *fp* (a ``.write()``-supporting :term:`file-like object`). @@ -159,12 +162,18 @@ Basic Usage *default(obj)* is a function that should return a serializable version of *obj* or raise :exc:`TypeError`. The default simply raises :exc:`TypeError`. + If *sort_keys* is ``True`` (default: ``False``), then the output of + dictionaries will be sorted by key. + To use a custom :class:`JSONEncoder` subclass (e.g. one that overrides the :meth:`default` method to serialize additional types), specify it with the *cls* kwarg; otherwise :class:`JSONEncoder` is used. -.. function:: dumps(obj, skipkeys=False, ensure_ascii=True, check_circular=True, allow_nan=True, cls=None, indent=None, separators=None, default=None, **kw) +.. function:: dumps(obj, skipkeys=False, ensure_ascii=True, \ + check_circular=True, allow_nan=True, cls=None, \ + indent=None, separators=None, default=None, \ + sort_keys=False, **kw) Serialize *obj* to a JSON formatted :class:`str`. The arguments have the same meaning as in :func:`dump`. diff --git a/Doc/library/subprocess.rst b/Doc/library/subprocess.rst index 66d6cbb..34fdf10 100644 --- a/Doc/library/subprocess.rst +++ b/Doc/library/subprocess.rst @@ -341,6 +341,10 @@ default values. The arguments that are most commonly needed are: from this vulnerability; see the Note in the :class:`Popen` constructor documentation for helpful hints in getting ``shell=False`` to work. + When using ``shell=True``, :func:`shlex.quote` can be used to properly + escape whitespace and shell metacharacters in strings that are going to + be used to construct shell commands. + These options, along with all of the other options, are described in more detail in the :class:`Popen` constructor documentation. diff --git a/Doc/tools/sphinxext/static/version_switch.js b/Doc/tools/sphinxext/static/version_switch.js index 363bebf..cc7be1c 100644 --- a/Doc/tools/sphinxext/static/version_switch.js +++ b/Doc/tools/sphinxext/static/version_switch.js @@ -43,19 +43,21 @@ if (new_url != url) { // check beforehand if url exists, else redirect to version's start page - $.get(new_url, function() { - window.location.href = new_url; - }).error(function() { - window.location.href = 'http://docs.python.org/' + selected; + $.ajax({ + url: new_url, + success: function() { + window.location.href = new_url; + }, + error: function() { + window.location.href = 'http://docs.python.org/' + selected; + } }); } } $(document).ready(function() { - var version = DOCUMENTATION_OPTIONS.VERSION.split('.'), - release = DOCUMENTATION_OPTIONS.RELEASE || DOCUMENTATION_OPTIONS.VERSION; - - version = version[0] + '.' + version[1]; + var release = DOCUMENTATION_OPTIONS.VERSION; + var version = release.substr(0, 3); var select = build_select(version, release); $('.version_switcher_placeholder').html(select); diff --git a/Doc/whatsnew/2.6.rst b/Doc/whatsnew/2.6.rst index a84bc19..bdd7ff7 100644 --- a/Doc/whatsnew/2.6.rst +++ b/Doc/whatsnew/2.6.rst @@ -7,8 +7,6 @@ .. XXX add trademark info for Apple, Microsoft, SourceForge. :Author: A.M. Kuchling (amk at amk.ca) -:Release: |release| -:Date: |today| .. $Id$ Rules for maintenance: diff --git a/Doc/whatsnew/2.7.rst b/Doc/whatsnew/2.7.rst index 2e90f96..b26c9b2 100644 --- a/Doc/whatsnew/2.7.rst +++ b/Doc/whatsnew/2.7.rst @@ -3,8 +3,6 @@ **************************** :Author: A.M. Kuchling (amk at amk.ca) -:Release: |release| -:Date: |today| .. hyperlink all the methods & functions. diff --git a/Doc/whatsnew/3.0.rst b/Doc/whatsnew/3.0.rst index 7782663..71b87b8 100644 --- a/Doc/whatsnew/3.0.rst +++ b/Doc/whatsnew/3.0.rst @@ -5,8 +5,6 @@ .. XXX Add trademark info for Apple, Microsoft. :Author: Guido van Rossum -:Release: |release| -:Date: |today| .. $Id$ Rules for maintenance: diff --git a/Doc/whatsnew/3.1.rst b/Doc/whatsnew/3.1.rst index 64ae1c1..ab327f5 100644 --- a/Doc/whatsnew/3.1.rst +++ b/Doc/whatsnew/3.1.rst @@ -3,8 +3,6 @@ **************************** :Author: Raymond Hettinger -:Release: |release| -:Date: |today| .. $Id$ Rules for maintenance: diff --git a/Doc/whatsnew/3.2.rst b/Doc/whatsnew/3.2.rst index 99827ff..a2ee112 100644 --- a/Doc/whatsnew/3.2.rst +++ b/Doc/whatsnew/3.2.rst @@ -3,8 +3,6 @@ **************************** :Author: Raymond Hettinger -:Release: |release| -:Date: |today| .. $Id$ Rules for maintenance: diff --git a/Doc/whatsnew/3.3.rst b/Doc/whatsnew/3.3.rst index bba2415..485cdea 100644 --- a/Doc/whatsnew/3.3.rst +++ b/Doc/whatsnew/3.3.rst @@ -2,9 +2,6 @@ What's New In Python 3.3 **************************** -:Release: |release| -:Date: |today| - .. Rules for maintenance: * Anyone can add text to this document. Do not spend very much time |