Skip to content

Commit 56b524c

Browse files
committed
Merge branch 'master' into ctypes-c_complex-61103
2 parents e888565 + 2cb84b1 commit 56b524c

File tree

170 files changed

+7722
-4581
lines changed

Some content is hidden

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

170 files changed

+7722
-4581
lines changed

Doc/README.rst

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ install the tools into there.
2828
Using make
2929
----------
3030

31-
To get started on UNIX, you can create a virtual environment and build
31+
To get started on Unix, you can create a virtual environment and build
3232
documentation with the commands::
3333

3434
make venv
@@ -40,13 +40,13 @@ If you'd like to create the virtual environment in a different location,
4040
you can specify it using the ``VENVDIR`` variable.
4141

4242
You can also skip creating the virtual environment altogether, in which case
43-
the Makefile will look for instances of ``sphinx-build`` and ``blurb``
43+
the ``Makefile`` will look for instances of ``sphinx-build`` and ``blurb``
4444
installed on your process ``PATH`` (configurable with the ``SPHINXBUILD`` and
4545
``BLURB`` variables).
4646

47-
On Windows, we try to emulate the Makefile as closely as possible with a
47+
On Windows, we try to emulate the ``Makefile`` as closely as possible with a
4848
``make.bat`` file. If you need to specify the Python interpreter to use,
49-
set the PYTHON environment variable.
49+
set the ``PYTHON`` environment variable.
5050

5151
Available make targets are:
5252

@@ -62,15 +62,19 @@ Available make targets are:
6262
* "htmlview", which re-uses the "html" builder, but then opens the main page
6363
in your default web browser.
6464

65+
* "htmllive", which re-uses the "html" builder, rebuilds the docs,
66+
starts a local server, and automatically reloads the page in your browser
67+
when you make changes to reST files (Unix only).
68+
6569
* "htmlhelp", which builds HTML files and a HTML Help project file usable to
6670
convert them into a single Compiled HTML (.chm) file -- these are popular
6771
under Microsoft Windows, but very handy on every platform.
6872

6973
To create the CHM file, you need to run the Microsoft HTML Help Workshop
70-
over the generated project (.hhp) file. The make.bat script does this for
74+
over the generated project (.hhp) file. The ``make.bat`` script does this for
7175
you on Windows.
7276

73-
* "latex", which builds LaTeX source files as input to "pdflatex" to produce
77+
* "latex", which builds LaTeX source files as input to ``pdflatex`` to produce
7478
PDF documents.
7579

7680
* "text", which builds a plain text file for each source file.
@@ -95,8 +99,6 @@ Available make targets are:
9599

96100
* "check", which checks for frequent markup errors.
97101

98-
* "serve", which serves the build/html directory on port 8000.
99-
100102
* "dist", (Unix only) which creates distributable archives of HTML, text,
101103
PDF, and EPUB builds.
102104

Doc/c-api/long.rst

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -405,14 +405,13 @@ distinguished from a number. Use :c:func:`PyErr_Occurred` to disambiguate.
405405
406406
Passing zero to *n_bytes* will return the size of a buffer that would
407407
be large enough to hold the value. This may be larger than technically
408-
necessary, but not unreasonably so.
408+
necessary, but not unreasonably so. If *n_bytes=0*, *buffer* may be
409+
``NULL``.
409410
410411
.. note::
411412
412413
Passing *n_bytes=0* to this function is not an accurate way to determine
413-
the bit length of a value.
414-
415-
If *n_bytes=0*, *buffer* may be ``NULL``.
414+
the bit length of the value.
416415
417416
To get at the entire Python value of an unknown size, the function can be
418417
called twice: first to determine the buffer size, then to fill it::
@@ -462,6 +461,7 @@ distinguished from a number. Use :c:func:`PyErr_Occurred` to disambiguate.
462461
.. c:macro:: Py_ASNATIVEBYTES_NATIVE_ENDIAN ``3``
463462
.. c:macro:: Py_ASNATIVEBYTES_UNSIGNED_BUFFER ``4``
464463
.. c:macro:: Py_ASNATIVEBYTES_REJECT_NEGATIVE ``8``
464+
.. c:macro:: Py_ASNATIVEBYTES_ALLOW_INDEX ``16``
465465
============================================= ======
466466
467467
Specifying ``Py_ASNATIVEBYTES_NATIVE_ENDIAN`` will override any other endian
@@ -483,6 +483,13 @@ distinguished from a number. Use :c:func:`PyErr_Occurred` to disambiguate.
483483
provided there is enough space for at least one sign bit, regardless of
484484
whether ``Py_ASNATIVEBYTES_UNSIGNED_BUFFER`` was specified.
485485
486+
If ``Py_ASNATIVEBYTES_ALLOW_INDEX`` is specified and a non-integer value is
487+
passed, its :meth:`~object.__index__` method will be called first. This may
488+
result in Python code executing and other threads being allowed to run, which
489+
could cause changes to other objects or values in use. When *flags* is
490+
``-1``, this option is not set, and non-integer values will raise
491+
:exc:`TypeError`.
492+
486493
.. note::
487494
488495
With the default *flags* (``-1``, or *UNSIGNED_BUFFER* without

Doc/howto/logging.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -382,8 +382,8 @@ Logging Flow
382382
The flow of log event information in loggers and handlers is illustrated in the
383383
following diagram.
384384

385-
.. image:: logging_flow.png
386-
:class: invert-in-dark-mode
385+
.. raw:: html
386+
:file: logging_flow.svg
387387

388388
Loggers
389389
^^^^^^^

Doc/howto/logging_flow.png

86.4 KB
Loading

0 commit comments

Comments
 (0)