* init_config: wording fixes
* bytearray: remove XXX, there is a good link to the buffer docs
* bytes, call, exceptions: minor wording fixes
(cherry picked from commit 677a879466)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
bpo-47151: Fallback to fork when vfork fails in subprocess. An OS kernel can specifically decide to disallow vfork() in a process. No need for that to prevent us from launching subprocesses.
(cherry picked from commit 4a08c4c469)
Co-authored-by: Gregory P. Smith <greg@krypto.org>
Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
(cherry picked from commit 8be7c2bc5a)
Co-authored-by: Dave Goncalves <davegoncalves@gmail.com>
Update documentation to note that in some circumstances,
KeyboardInterrupt may cause code to enter an inconsistent state. Also
document sample workaround to avoid KeyboardInterrupt, if needed.
(cherry picked from commit d0906c90fc)
Co-authored-by: benfogle <benfogle@gmail.com>
Co-authored-by: Jonathan <89750679+AHypnotoad@users.noreply.github.com>
(cherry picked from commit 66584c890d)
Co-authored-by: Jonathan <jonathan.joyner94@gmail.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
The enter_context is updated with following information: 'The :meth:`__enter__` method
returns the ExitStack instance, and performs no additional operations.'
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
(cherry picked from commit 86384cf83f)
Co-authored-by: vidhya <96202776+Vidhyavinu@users.noreply.github.com>
People are testing those blocs with the default
inline_comment_prefixes of None, leading to a:
configparser.InterpolationSyntaxError: '$' must be followed by '$' or '{', found: '$ sign ($ is the only character that needs to be escaped)'
(cherry picked from commit 3ac4e783e0)
Co-authored-by: Julien Palard <julien@palard.fr>
Replace the child process `typeperf.exe` with a daemon thread that reads the performance counters directly. This prevents the issues that arise from inherited handles in grandchild processes (see issue37531 for discussion).
We only use the load tracker when running tests in multiprocess mode. This prevents inadvertent interactions with tests expecting a single threaded environment. Displaying load is really only helpful for buildbots running in multiprocess mode anyway.
Co-authored-by: Jeremy Kloth <jeremy.kloth@gmail.com>
Also removed asynchat, asyncore, and smtpd from their respective toctree entries so they are only in the superceded subtree.
(cherry picked from commit 9ac2de922a)
Co-authored-by: Brett Cannon <brett@python.org>
Automerge-Triggered-By: GH:brettcannon
Document the deprecation of asyncore, asynchat, and smtpd with a slated removal in Python 3.12 thanks to PEP 594..
(cherry picked from commit 7747384643)
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
The `_SharedFile` tracks its own virtual position into the file as
`self._pos` and updates it after reading or seeking. `tell()` should
return this position instead of calling into the underlying file object,
since if multiple `_SharedFile` instances are being used concurrently on
the same file, another one may have moved the real file position.
Additionally, calling into the underlying `tell` may expose thread
safety issues in the underlying file object because it was called
without taking the lock.
(cherry picked from commit e730ae7eff)
Co-authored-by: Kevin Mehall <km@kevinmehall.net>
Clarifies a versionchanged note on crc32 & adler32 docs that the workaround is only needed for Python 2 and earlier.
Also cleans up an unnecessary intermediate variable in the implementation.
Authored-By: Ma Lin / animalize
Co-authored-by: Gregory P. Smith <greg@krypto.org>
A warning about inline flags not at the start of the regular
expression now contains the position of the flag.
(cherry picked from commit 4142961b9f)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
(cherry picked from commit 3dd9bfac04)
Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
(cherry picked from commit dd0082c627)
Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>