Merge in all documentation changes since branching 3.4.0rc1. · pythoncapi/cpython@3732ed2 · GitHub
Skip to content

Commit 3732ed2

Browse files
committed
Merge in all documentation changes since branching 3.4.0rc1.
1 parent b6b6a6d commit 3732ed2

93 files changed

Lines changed: 2029 additions & 567 deletions

Some content is hidden

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

Doc/c-api/arg.rst

Lines changed: 1 addition & 0 deletions

Doc/c-api/exceptions.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -525,11 +525,11 @@ Exception Objects
525525
reference, as accessible from Python through :attr:`__cause__`.
526526
527527
528-
.. c:function:: void PyException_SetCause(PyObject *ex, PyObject *ctx)
528+
.. c:function:: void PyException_SetCause(PyObject *ex, PyObject *cause)
529529
530-
Set the cause associated with the exception to *ctx*. Use *NULL* to clear
531-
it. There is no type check to make sure that *ctx* is either an exception
532-
instance or :const:`None`. This steals a reference to *ctx*.
530+
Set the cause associated with the exception to *cause*. Use *NULL* to clear
531+
it. There is no type check to make sure that *cause* is either an exception
532+
instance or :const:`None`. This steals a reference to *cause*.
533533
534534
:attr:`__suppress_context__` is implicitly set to ``True`` by this function.
535535

Doc/c-api/init.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -582,6 +582,7 @@ code, or when embedding the Python interpreter:
582582
.. index:: module: _thread
583583
584584
.. note::
585+
585586
When only the main thread exists, no GIL operations are needed. This is a
586587
common situation (most Python programs do not use threads), and the lock
587588
operations slow the interpreter down a bit. Therefore, the lock is not

Doc/c-api/module.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ There are only a few functions special to module objects.
120120
121121
Return a pointer to the :c:type:`PyModuleDef` struct from which the module was
122122
created, or *NULL* if the module wasn't created with
123-
:c:func:`PyModule_Create`.i
123+
:c:func:`PyModule_Create`.
124124
125125
.. c:function:: PyObject* PyState_FindModule(PyModuleDef *def)
126126

Doc/c-api/object.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -357,9 +357,9 @@ attribute is considered sufficient for this determination.
357357
358358
.. c:function:: Py_ssize_t PyObject_LengthHint(PyObject *o, Py_ssize_t default)
359359
360-
Return an estimated length for the object *o*. First trying to return its
361-
actual length, then an estimate using ``__length_hint__``, and finally
362-
returning the default value. On error ``-1`` is returned. This is the
360+
Return an estimated length for the object *o*. First try to return its
361+
actual length, then an estimate using :meth:`~object.__length_hint__`, and
362+
finally return the default value. On error return ``-1``. This is the
363363
equivalent to the Python expression ``operator.length_hint(o, default)``.
364364
365365
.. versionadded:: 3.4

Doc/c-api/tuple.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,14 @@ type.
129129
Initializes a struct sequence type *type* from *desc* in place.
130130
131131
132+
.. c:function:: int PyStructSequence_InitType2(PyTypeObject *type, PyStructSequence_Desc *desc)
133+
134+
The same as ``PyStructSequence_InitType``, but returns ``0`` on success and ``-1`` on
135+
failure.
136+
137+
.. versionadded:: 3.4
138+
139+
132140
.. c:type:: PyStructSequence_Desc
133141
134142
Contains the meta information of a struct sequence type to create.

Doc/c-api/typeobj.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -205,9 +205,8 @@ type objects) *must* have the :attr:`ob_size` field.
205205
bit currently defined is :const:`Py_PRINT_RAW`. When the :const:`Py_PRINT_RAW`
206206
flag bit is set, the instance should be printed the same way as :c:member:`~PyTypeObject.tp_str`
207207
would format it; when the :const:`Py_PRINT_RAW` flag bit is clear, the instance
208-
should be printed the same was as :c:member:`~PyTypeObject.tp_repr` would format it. It should
209-
return ``-1`` and set an exception condition when an error occurred during the
210-
comparison.
208+
should be printed the same way as :c:member:`~PyTypeObject.tp_repr` would format it. It should
209+
return ``-1`` and set an exception condition when an error occurs.
211210

212211
It is possible that the :c:member:`~PyTypeObject.tp_print` field will be deprecated. In any case,
213212
it is recommended not to define :c:member:`~PyTypeObject.tp_print`, but instead to rely on

Doc/conf.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@
6161
# By default, highlight as Python 3.
6262
highlight_language = 'python3'
6363

64+
needs_sphinx = '1.1'
65+
6466

6567
# Options for HTML output
6668
# -----------------------
@@ -118,11 +120,11 @@
118120
latex_documents = [
119121
('c-api/index', 'c-api.tex',
120122
'The Python/C API', _stdauthor, 'manual'),
121-
('distutils/index', 'distutils.tex',
123+
('distributing/index', 'distributing.tex',
122124
'Distributing Python Modules', _stdauthor, 'manual'),
123125
('extending/index', 'extending.tex',
124126
'Extending and Embedding Python', _stdauthor, 'manual'),
125-
('install/index', 'install.tex',
127+
('installing/index', 'installing.tex',
126128
'Installing Python Modules', _stdauthor, 'manual'),
127129
('library/index', 'library.tex',
128130
'The Python Library Reference', _stdauthor, 'manual'),

Doc/contents.rst

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
library/index.rst
1212
extending/index.rst
1313
c-api/index.rst
14-
distutils/index.rst
15-
install/index.rst
14+
distributing/index.rst
15+
installing/index.rst
1616
howto/index.rst
1717
faq/index.rst
1818
glossary.rst
@@ -21,3 +21,11 @@
2121
bugs.rst
2222
copyright.rst
2323
license.rst
24+
25+
.. include legacy packaging docs in build
26+
27+
.. toctree::
28+
:hidden:
29+
30+
distutils/index.rst
31+
install/index.rst

Doc/distributing/index.rst

Lines changed: 143 additions & 0 deletions

0 commit comments

Comments
 (0)