Compare -p and -u options help in rendered output to see the difference.
(cherry picked from commit 594f0ce73b)
Co-authored-by: Andre Delfino <adelfino@gmail.com>
I added some information to the `Concurrency and Multithreading` section of the `Developing with asyncio` guide.
This is all information that would have helped me when I started using asyncio. I incorrectly assumed that `loop.call_soon_threadsafe()` and `run_coroutine_threadsafe()` could be called from a thread in a process separate from the one that the event loop is running in. Explicitly stating that this will not work will probably help some people starting out with asyncio in the future.
I also added references to some other functions that can be used for inter-process communication without blocking the event loop. The section already mentions running blocking code in a ThreadPoolExecutor, but I think listing these other options in this section will also be helpful.
(cherry picked from commit c68c5af2dc)
Co-authored-by: Roger Iyengar <ri@rogeriyengar.com>
Use a less surprising document structure.
Automerge-Triggered-By: @csabella
(cherry picked from commit 2ce39631f6)
Co-authored-by: Sydney Pemberton <46042811+sydneypemberton1986@users.noreply.github.com>
* bpo-40204: Allow pre-Sphinx 3 syntax in the doc (GH-21844)
Enable Sphinx 3.2 "c_allow_pre_v3" option and disable the
c_warn_on_allowed_pre_v3 option to make the documentation compatible
with Sphinx 2 and Sphinx 3.
(cherry picked from commit 423e77d6de)
* bpo-40204: Fix Sphinx sytanx in howto/instrumentation.rst (GH-21858)
Use generic '.. object::' to declare markers, rather than abusing
'.. c:function::' which fails on Sphinx 3.
(cherry picked from commit 43577c01a2)
* bpo-40204: Fix duplicates in the documentation (GH-21857)
Fix two Sphinx 3 issues:
Doc/c-api/buffer.rst:304: WARNING: Duplicate C declaration, also defined in 'c-api/buffer'.
Declaration is 'PyBUF_ND'.
Doc/c-api/unicode.rst:1603: WARNING: Duplicate C declaration, also defined in 'c-api/unicode'.
Declaration is 'PyObject* PyUnicode_Translate(PyObject *str, PyObject *table, const char *errors)'.
(cherry picked from commit 46d10b1237)
* bpo-40204: Add :noindex: in the documentation (GH-21859)
Add :noindex: to duplicated documentation to fix "duplicate object
description" errors.
For example, fix this Sphinx 3 issue:
Doc/library/configparser.rst:1146: WARNING: duplicate object
description of configparser.ConfigParser.optionxform, other instance
in library/configparser, use :noindex: for one of them
(cherry picked from commit d3ded08048)
* bpo-40204, doc: Fix syntax of C variables (GH-21846)
For example, fix the following Sphinx 3 errors:
Doc/c-api/buffer.rst:102: WARNING: Error in declarator or parameters
Invalid C declaration: Expected identifier in nested name. [error at 5]
void \*obj
-----^
Doc/c-api/arg.rst:130: WARNING: Unparseable C cross-reference: 'PyObject*'
Invalid C declaration: Expected end of definition. [error at 8]
PyObject*
--------^
The modified documentation is compatible with Sphinx 2 and Sphinx 3.
(cherry picked from commit 474652fe93)
* bpo-40204: Fix reference to terms in the doc (GH-21865)
Sphinx 3 requires to refer to terms with the exact case.
For example, fix the Sphinx 3 warning:
Doc/library/pkgutil.rst:71: WARNING: term Loader not found in case
sensitive match.made a reference to loader instead.
(cherry picked from commit bb0b08540c)
* bpo-40204: Fix duplicated productionlist names in the doc (GH-21900)
Sphinx 3 disallows having more than one productionlist markup with
the same name. Simply remove names in this case, since names are not
shown anyway. For example, fix the Sphinx 3 warning:
Doc/reference/introduction.rst:96: duplicate token description
of *:name, other instance in reference/expressions
(cherry picked from commit 1abeda80f7)
(cherry picked from commit 8f88190af5)
Adds a link to the "Reading and Writing Files" page so users can
more easily discover how file handles are handled with the `with`
context manager vs without it.
(cherry picked from commit 705f145565)
Co-authored-by: Benjamin Kane <bbkane@users.noreply.github.com>
PyUnicodeEncodeError_Create has been deprecated with
`Py_DEPRECATED` macro. But it was not documented.
(cherry picked from commit 46e19b61d3)
Co-authored-by: Inada Naoki <songofacandy@gmail.com>
PEP 563 was updated to change the release where `from __future__ import annotations` becomes the default (and only) behavior from 4.0 to 3.10. Update `__future__.py` and its docs to reflect this.
(cherry picked from commit 0028c14073)
Co-authored-by: YoSTEALTH <35307184+YoSTEALTH@users.noreply.github.com>
Just a simple documentation fix: apply_async and map_async return a "multiprocessing.pool.AsyncResult Object", not a "result object".
(cherry picked from commit f9bf015799)
Co-authored-by: Volker-Weissmann <39418860+Volker-Weissmann@users.noreply.github.com>
These changes updates the doc to comprehensively mention the behaviour of gather.cancel()
Automerge-Triggered-By: @asvetlov
(cherry picked from commit d42528a3a2)
Co-authored-by: Vinay Sharma <vinay04sharma@icloud.com>
GH-msg373510
[bpo-32528]()/GH-13528 changed `asyncio.CancelledError` such that it no longer inherits from `concurrent.futures.CancelledError`. As this affects existing code, specifically when catching the latter instead of the former in exception handling, it should be documented in the "What's new in 3.8?" document.
Automerge-Triggered-By: @1st1
(cherry picked from commit 2a5181829a)
Co-authored-by: JustAnotherArchivist <JustAnotherArchivist@users.noreply.github.com>
This should also fix the syntax highlighting for these code blocks
Automerge-Triggered-By: @csabella
(cherry picked from commit 5e5c0f9866)
Co-authored-by: Christopher Yeh <chrisyeh96@users.noreply.github.com>
The phrase "At any time during execution," was repeated twice.
Automerge-Triggered-By: @Mariatta
(cherry picked from commit 4f28f75dee)
Co-authored-by: Paul McMillan <paul@mcmillan.ws>
Keywords are present in the main module tab completion lists generated by rlcompleter, which is used by REPLs on *nix. Add all keywords to IDLE's main module name list except those already added from builtins (True, False, and None) . This list may also be used by Show Completions on the Edit menu, and its hot key.
Rewrite Completions doc.
Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
(cherry picked from commit bce2eb4646)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>