Signed-off-by: Tao He <sighingnow@gmail.com>
(cherry picked from commit 3631d6deab)
Co-authored-by: Tao He <sighingnow@gmail.com>
Co-authored-by: Tao He <sighingnow@gmail.com>
The descriptions of the `codes` and `messages` dictionaries in
`xml.parsers.expat.errors` were swapped, and this commit swaps them
back. For example, `codes` maps string descriptions of errors to numeric
error codes, not the other way around.
(cherry picked from commit 84402eb110)
Co-authored-by: Michael Wayne Goodman <goodman.m.w@gmail.com>
The `pages` argument default value now reflects the implementation.
(cherry picked from commit abba83b4b9)
Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
When the modern text= spelling of the universal_newlines= parameter was added
for Python 3.7, check_output's special case around input=None was overlooked.
So it behaved differently with universal_newlines=True vs text=True. This
reconciles the behavior to be consistent and adds a test to guarantee it.
Also clarifies the existing check_output documentation.
Co-authored-by: Alexey Izbyshev <izbyshev@ispras.ru>
(cherry picked from commit 64abf37344)
Co-authored-by: Gregory P. Smith <greg@krypto.org>
The issue being resolved is shown in the 3.10 docs (if you select docs for older versions you won't see a visual glitch).
The newer sphinx version that produces the 3.10 docs doesn't treat the backslash to escape things in some situations it previously did..
(cherry picked from commit dcc997cd28)
Co-authored-by: Andre Delfino <adelfino@gmail.com>
In Python 2, it was possible to use `except` with a nested tuple, and occasionally natural. For example, `zope.formlib.interfaces.InputErrors` is a tuple of several exception classes, and one might reasonably think to do something like this:
try:
self.getInputValue()
return True
except (InputErrors, SomethingElse):
return False
As of Python 3.0, this raises `TypeError: catching classes that do not inherit from BaseException is not allowed` instead: one must instead either break it up into multiple `except` clauses or flatten the tuple. However, the reference documentation was never updated to match this new restriction. Make it clear that the definition is no longer recursive.
Automerge-Triggered-By: GH:ericvsmith
(cherry picked from commit c95f8bc270)
Co-authored-by: Colin Watson <cjwatson@debian.org>
Co-authored-by: Colin Watson <cjwatson@debian.org>
* Explain when the conversion is not possible with detect_types enabled
(cherry picked from commit 09a36cdfb7)
Co-authored-by: sblondon <sblondon@users.noreply.github.com>
Co-authored-by: sblondon <sblondon@users.noreply.github.com>
Up until now, the `multiprocessing.pool.ThreadPool` class has gone
undocumented, despite being a public class in multiprocessing that is
included in `multiprocessing.pool.__all__`.
(cherry picked from commit 84ebcf271a)
Co-authored-by: Matt Wozniski <mwozniski@bloomberg.net>
The existing method is indented one too many times which
makes it look like a sub-method of print_callees().
(cherry picked from commit a6ba2b9015)
Co-authored-by: Matthew Suozzo <msuozzo@google.com>
Fix the wording in the documentation of `async for` to correctly describe asynchronous iterables. This fix is relevant for version 3.7 onward.
(cherry picked from commit 4b8cdfcb22)
Co-authored-by: Nick Gaya <nicholasgaya+github@gmail.com>
(cherry picked from commit 752cdf21eb)
Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
* Improve description of 'e', 'f' and 'g' presentation types
* Drop the 'E' from Scientific 'E' notation; remove >= 0 qualifications
* Fix false statement that the alternate form is valid for Decimal
* Nitpick: remove the Harvard/Oxford comma
* Add note that the decimal point is also removed if no digits follow it, except in alternate form
(cherry picked from commit c642374b3e)
Co-authored-by: Mark Dickinson <mdickinson@enthought.com>
Co-authored-by: Mark Dickinson <mdickinson@enthought.com>
Removing 'evaluate' makes it more consistent with other assertX entries.
(cherry picked from commit bd8c22e1fa)
Co-authored-by: Ram Rachum <ram@rachum.com>
I believe this is a mistake. SIGCHLD is only available on Unix systems, not Windows.
(cherry picked from commit 4c24b08cd3)
Co-authored-by: Zhang Maiyun <myzhang1029@hotmail.com>
Co-authored-by: Zhang Maiyun <myzhang1029@hotmail.com>