Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6c1da82

Browse files
committed
merge
2 parents f873d7c + 6294305 commit 6c1da82

16 files changed

Lines changed: 84 additions & 37 deletions

File tree

Doc/Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,10 +187,15 @@ autobuild-dev:
187187
make update
188188
make dist SPHINXOPTS='-A daily=1 -A versionswitcher=1'
189189

190+
# for quick rebuilds (HTML only)
191+
autobuild-html:
192+
make html SPHINXOPTS='-A daily=1 -A versionswitcher=1'
193+
190194
# for stable releases: only build if not in pre-release stage (alpha, beta, rc)
191195
autobuild-stable:
192196
@case $(DISTVERSION) in *[abc]*) \
193197
echo "Not building; $(DISTVERSION) is not a release version."; \
194198
exit 1;; \
195199
esac
196200
@make autobuild-dev
201+

Doc/library/json.rst

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,10 @@ Using json.tool from the shell to validate and pretty-print::
116116
Basic Usage
117117
-----------
118118

119-
.. function:: dump(obj, fp, skipkeys=False, ensure_ascii=True, check_circular=True, allow_nan=True, cls=None, indent=None, separators=None, default=None, **kw)
119+
.. function:: dump(obj, fp, skipkeys=False, ensure_ascii=True, \
120+
check_circular=True, allow_nan=True, cls=None, \
121+
indent=None, separators=None, default=None, \
122+
sort_keys=False, **kw)
120123
121124
Serialize *obj* as a JSON formatted stream to *fp* (a ``.write()``-supporting
122125
:term:`file-like object`).
@@ -159,12 +162,18 @@ Basic Usage
159162
*default(obj)* is a function that should return a serializable version of
160163
*obj* or raise :exc:`TypeError`. The default simply raises :exc:`TypeError`.
161164

165+
If *sort_keys* is ``True`` (default: ``False``), then the output of
166+
dictionaries will be sorted by key.
167+
162168
To use a custom :class:`JSONEncoder` subclass (e.g. one that overrides the
163169
:meth:`default` method to serialize additional types), specify it with the
164170
*cls* kwarg; otherwise :class:`JSONEncoder` is used.
165171

166172

167-
.. function:: dumps(obj, skipkeys=False, ensure_ascii=True, check_circular=True, allow_nan=True, cls=None, indent=None, separators=None, default=None, **kw)
173+
.. function:: dumps(obj, skipkeys=False, ensure_ascii=True, \
174+
check_circular=True, allow_nan=True, cls=None, \
175+
indent=None, separators=None, default=None, \
176+
sort_keys=False, **kw)
168177
169178
Serialize *obj* to a JSON formatted :class:`str`. The arguments have the
170179
same meaning as in :func:`dump`.

Doc/library/subprocess.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,10 @@ default values. The arguments that are most commonly needed are:
341341
from this vulnerability; see the Note in the :class:`Popen` constructor
342342
documentation for helpful hints in getting ``shell=False`` to work.
343343

344+
When using ``shell=True``, :func:`shlex.quote` can be used to properly
345+
escape whitespace and shell metacharacters in strings that are going to
346+
be used to construct shell commands.
347+
344348
These options, along with all of the other options, are described in more
345349
detail in the :class:`Popen` constructor documentation.
346350

Doc/tools/sphinxext/static/version_switch.js

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,19 +43,21 @@
4343

4444
if (new_url != url) {
4545
// check beforehand if url exists, else redirect to version's start page
46-
$.get(new_url, function() {
47-
window.location.href = new_url;
48-
}).error(function() {
49-
window.location.href = 'http://docs.python.org/' + selected;
46+
$.ajax({
47+
url: new_url,
48+
success: function() {
49+
window.location.href = new_url;
50+
},
51+
error: function() {
52+
window.location.href = 'http://docs.python.org/' + selected;
53+
}
5054
});
5155
}
5256
}
5357

5458
$(document).ready(function() {
55-
var version = DOCUMENTATION_OPTIONS.VERSION.split('.'),
56-
release = DOCUMENTATION_OPTIONS.RELEASE || DOCUMENTATION_OPTIONS.VERSION;
57-
58-
version = version[0] + '.' + version[1];
59+
var release = DOCUMENTATION_OPTIONS.VERSION;
60+
var version = release.substr(0, 3);
5961
var select = build_select(version, release);
6062

6163
$('.version_switcher_placeholder').html(select);

Doc/whatsnew/2.6.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
.. XXX add trademark info for Apple, Microsoft, SourceForge.
88
99
:Author: A.M. Kuchling (amk at amk.ca)
10-
:Release: |release|
11-
:Date: |today|
1210

1311
.. $Id$
1412
Rules for maintenance:

Doc/whatsnew/2.7.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
****************************
44

55
:Author: A.M. Kuchling (amk at amk.ca)
6-
:Release: |release|
7-
:Date: |today|
86

97
.. hyperlink all the methods & functions.
108

Doc/whatsnew/3.0.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
.. XXX Add trademark info for Apple, Microsoft.
66
77
:Author: Guido van Rossum
8-
:Release: |release|
9-
:Date: |today|
108

119
.. $Id$
1210
Rules for maintenance:

Doc/whatsnew/3.1.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
****************************
44

55
:Author: Raymond Hettinger
6-
:Release: |release|
7-
:Date: |today|
86

97
.. $Id$
108
Rules for maintenance:

Doc/whatsnew/3.2.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
****************************
44

55
:Author: Raymond Hettinger
6-
:Release: |release|
7-
:Date: |today|
86

97
.. $Id$
108
Rules for maintenance:

Doc/whatsnew/3.3.rst

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@
22
What's New In Python 3.3
33
****************************
44

5-
:Release: |release|
6-
:Date: |today|
7-
85
.. Rules for maintenance:
96
107
* Anyone can add text to this document. Do not spend very much time

0 commit comments

Comments
 (0)