Skip to content

Commit d1213dc

Browse files
authored
Merge branch 'master' into bpo-28929-news-master
2 parents f6ba012 + 132ac38 commit d1213dc

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

90 files changed

+3884
-3344
lines changed

.gitattributes

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
Misc/NEWS merge=union
2+
3+
*.pck binary
4+
Lib/test/cjkencodings/* binary
5+
Lib/test/decimaltestdata/*.decTest binary
6+
Lib/test/sndhdrdata/sndhdr.* binary
7+
Lib/test/test_email/data/msg_26.txt binary
8+
Lib/test/xmltestdata/* binary
9+
Lib/venv/scripts/nt/* binary
10+
Lib/test/coding20731.py binary

.travis.yml

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -36,17 +36,10 @@ matrix:
3636
env:
3737
- TESTING=docs
3838
before_script:
39-
- |
40-
if git diff --name-only $TRAVIS_COMMIT_RANGE | grep -qvE '^Doc/'
41-
then
42-
echo "Docs weren't updated, stopping build process."
43-
exit
44-
fi
45-
cd Doc
46-
make venv PYTHON=python3
39+
- cd Doc
40+
- make venv
4741
script:
48-
- make html SPHINXBUILD="./venv/bin/python3 -m sphinx" SPHINXOPTS="-q"
49-
- make check
42+
- make check suspicious html PYTHON="./venv/bin/python" SPHINXBUILD="./venv/bin/python -m sphinx" SPHINXOPTS="-q"
5043
- os: linux
5144
language: c
5245
compiler: clang

Doc/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#
55

66
# You can set these variables from the command line.
7-
PYTHON = python
7+
PYTHON = python3
88
SPHINXBUILD = sphinx-build
99
PAPER =
1010
SOURCES =
@@ -153,7 +153,7 @@ dist:
153153
cp -pPR build/epub/Python.epub dist/python-$(DISTVERSION)-docs.epub
154154

155155
check:
156-
$(PYTHON) tools/rstlint.py -i tools -i venv
156+
$(PYTHON) tools/rstlint.py -i tools -i venv -i README.rst
157157

158158
serve:
159159
../Tools/scripts/serve.py build/html

Doc/README.txt renamed to Doc/README.rst

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,21 @@ Python Documentation README
22
~~~~~~~~~~~~~~~~~~~~~~~~~~~
33

44
This directory contains the reStructuredText (reST) sources to the Python
5-
documentation. You don't need to build them yourself, prebuilt versions are
6-
available at <https://docs.python.org/dev/download.html>.
5+
documentation. You don't need to build them yourself, `prebuilt versions are
6+
available <https://docs.python.org/dev/download.html>`_.
77

88
Documentation on authoring Python documentation, including information about
9-
both style and markup, is available in the "Documenting Python" chapter of the
10-
developers guide <https://docs.python.org/devguide/documenting.html>.
9+
both style and markup, is available in the "`Documenting Python
10+
<https://docs.python.org/devguide/documenting.html>`_" chapter of the
11+
developers guide.
1112

1213

1314
Building the docs
1415
=================
1516

16-
You need to have Sphinx <http://sphinx-doc.org/> installed; it is the toolset
17+
You need to have `Sphinx <http://sphinx-doc.org/>`_ installed; it is the toolset
1718
used to build the docs. It is not included in this tree, but maintained
18-
separately and available from PyPI <https://pypi.python.org/pypi/Sphinx>.
19+
separately and `available from PyPI <https://pypi.python.org/pypi/Sphinx>`_.
1920

2021

2122
Using make
@@ -108,11 +109,11 @@ see the make targets above).
108109
Contributing
109110
============
110111

111-
Bugs in the content should be reported to the Python bug tracker at
112-
https://bugs.python.org.
112+
Bugs in the content should be reported to the
113+
`Python bug tracker <https://bugs.python.org>`_.
113114

114-
Bugs in the toolset should be reported in the Sphinx bug tracker at
115-
https://www.bitbucket.org/birkenfeld/sphinx/issues/.
115+
Bugs in the toolset should be reported in the
116+
`Sphinx bug tracker <https://github.com/sphinx-doc/sphinx/issues>`_.
116117

117118
You can also send a mail to the Python Documentation Team at docs@python.org,
118119
and we will process your request as soon as possible.

Doc/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
needs_sphinx = '1.2'
3838

3939
# Ignore any .rst files in the venv/ directory.
40-
exclude_patterns = ['venv/*']
40+
exclude_patterns = ['venv/*', 'README.rst']
4141

4242

4343
# Options for HTML output

Doc/faq/general.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ How do I obtain a copy of the Python source?
159159

160160
The latest Python source distribution is always available from python.org, at
161161
https://www.python.org/downloads/. The latest development sources can be obtained
162-
via anonymous Mercurial access at https://hg.python.org/cpython.
162+
at https://github.com/python/cpython/.
163163

164164
The source distribution is a gzipped tar file containing the complete C source,
165165
Sphinx-formatted documentation, Python library modules, example programs, and
@@ -222,8 +222,8 @@ releases are announced on the comp.lang.python and comp.lang.python.announce
222222
newsgroups and on the Python home page at https://www.python.org/; an RSS feed of
223223
news is available.
224224

225-
You can also access the development version of Python through Mercurial. See
226-
https://docs.python.org/devguide/faq.html for details.
225+
You can also access the development version of Python through Git. See
226+
`The Python Developer's Guide <https://docs.python.org/devguide/>`_ for details.
227227

228228

229229
How do I submit bug reports and patches for Python?

Doc/includes/setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@
55
Extension("noddy2", ["noddy2.c"]),
66
Extension("noddy3", ["noddy3.c"]),
77
Extension("noddy4", ["noddy4.c"]),
8+
Extension("shoddy", ["shoddy.c"]),
89
])

Doc/includes/shoddy.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Shoddy_init(Shoddy *self, PyObject *args, PyObject *kwds)
3131

3232

3333
static PyTypeObject ShoddyType = {
34-
PyObject_HEAD_INIT(NULL)
34+
PyVarObject_HEAD_INIT(NULL, 0)
3535
"shoddy.Shoddy", /* tp_name */
3636
sizeof(Shoddy), /* tp_basicsize */
3737
0, /* tp_itemsize */

Doc/library/ast.rst

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,17 @@ and classes for traversing abstract syntax trees:
133133
.. function:: get_docstring(node, clean=True)
134134

135135
Return the docstring of the given *node* (which must be a
136-
:class:`FunctionDef`, :class:`ClassDef` or :class:`Module` node), or ``None``
137-
if it has no docstring. If *clean* is true, clean up the docstring's
138-
indentation with :func:`inspect.cleandoc`.
136+
:class:`FunctionDef`, :class:`AsyncFunctionDef`, :class:`ClassDef`,
137+
or :class:`Module` node), or ``None`` if it has no docstring.
138+
If *clean* is true, clean up the docstring's indentation with
139+
:func:`inspect.cleandoc`.
140+
141+
.. versionchanged:: 3.5
142+
:class:`AsyncFunctionDef` is now supported.
143+
144+
.. versionchanged:: 3.7
145+
The docstring is now exported from the node docstring field, instead of
146+
the first body statement.
139147

140148

141149
.. function:: fix_missing_locations(node)

Doc/library/inspect.rst

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -905,10 +905,8 @@ Classes and functions
905905
are the names of the ``*`` and ``**`` arguments or ``None``. *locals* is the
906906
locals dictionary of the given frame.
907907

908-
.. deprecated:: 3.5
909-
Use :func:`signature` and
910-
:ref:`Signature Object <inspect-signature-object>`, which provide a
911-
better introspecting API for callables.
908+
.. note::
909+
This function was inadvertently marked as deprecated in Python 3.5.
912910

913911

914912
.. function:: formatargspec(args[, varargs, varkw, defaults, kwonlyargs, kwonlydefaults, annotations[, formatarg, formatvarargs, formatvarkw, formatvalue, formatreturns, formatannotations]])
@@ -944,10 +942,8 @@ Classes and functions
944942
:func:`getargvalues`. The format\* arguments are the corresponding optional
945943
formatting functions that are called to turn names and values into strings.
946944

947-
.. deprecated:: 3.5
948-
Use :func:`signature` and
949-
:ref:`Signature Object <inspect-signature-object>`, which provide a
950-
better introspecting API for callables.
945+
.. note::
946+
This function was inadvertently marked as deprecated in Python 3.5.
951947

952948

953949
.. function:: getmro(cls)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy