Calling these function from a thread when the runtime is finalizing will terminate
the thread, even if the thread was not created by Python. Users can use
_Py_IsFinalizing or sys.is_finalizing to check if the interpreter is in the process of
being finalized before calling this function to avoid unwanted termination.
(cherry picked from commit fde9b33)
Since bpo-30291 it is possible to specify the architecture of Python when using the launcher
(cherry picked from commit 1e2ad6c275)
Co-authored-by: mrh1997 <mrh1997@users.noreply.github.com>
* bpo-36389: _PyObject_IsFreed() now also detects uninitialized memory (GH-12770)
Replace _PyMem_IsFreed() function with _PyMem_IsPtrFreed() inline
function. The function is now way more efficient, it became a simple
comparison on integers, rather than a short loop. It detects also
uninitialized bytes and "forbidden bytes" filled by debug hooks
on memory allocators.
Add unit tests on _PyObject_IsFreed().
(cherry picked from commit 2b00db6855)
* bpo-36389: Change PyMem_SetupDebugHooks() constants (GH-12782)
Modify CLEANBYTE, DEADDYTE and FORBIDDENBYTE constants: use 0xCD,
0xDD and 0xFD, rather than 0xCB, 0xBB and 0xFB, to use the same byte
patterns than Windows CRT debug malloc() and free().
(cherry picked from commit 4c409beb4c)
Move all documentation regarding the readinto method into either io.RawIOBase or io.BufferedIOBase.
Corresponding changes to documentation in the _pyio.py module.
(cherry picked from commit 7b97ab35b2)
Co-authored-by: Steve Palmer <steve@srpalmer.me.uk>
Remove names from the "unimplemented interfaces" list
in the minidom docs that are actually implemented.
(cherry picked from commit 2ea8099523)
Co-authored-by: Stefan Behnel <stefan_ml@behnel.de>
I have added documentation for `PyInterpreterState_Main()`.
I chose to place it under Advanced Debugger Support together with similar functions like `PyInterpreterState_Head()`, `PyInterpreterState_Next(`), and `PyInterpreterState_ThreadHead()` .
https://bugs.python.org/issue36157
(cherry picked from commit 8c61739def)
Co-authored-by: Joannah Nanjekye <33177550+nanjekyejoannah@users.noreply.github.com>
* bpo-34085: Improve wording on classmethod/staticmethod
* Address comments from Éric
* Address comments from Éric
(cherry picked from commit 548cb6060a)
Co-authored-by: Andre Delfino <adelfino@gmail.com>
Clarify capturing or suppressing stdout and stderr on the old call APIs.
Do not state that they are equivalent to run() calls when they are not implemented using run as that was misleading. Unlike run they cannot handle stdout or stderr being set to PIPE without a risk of deadlock.
(cherry picked from commit 7a2e84c348)
Co-authored-by: Gregory P. Smith <greg@krypto.org>
Clarify that the naming of protocol handler methods shouldn't be literally called "protocol" but should be named after the actual protocol.
https://bugs.python.org/issue35155
(cherry picked from commit dd7c4ceed9)
Co-authored-by: Denton Liu <liu.denton+github@gmail.com>
* Replace external recipe link with a link to the dataclasses module.
* Highlight the class definition syntax for typing.NamedTuple
and add an example for clarity.
(cherry picked from commit 9c68543f02)
Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
Be explicit that timedelta division converts an overall duration to the interval
units given by the denominator.
(cherry picked from commit f40b4a0b62)
Co-authored-by: Yasser A <yalshalaan@gmail.com>
For command line option, `option` is better than `parameter`.
(cherry picked from commit 0983fcd0d5)
Co-authored-by: NAKAMURA Osamu <osamu0329nakamura@users.noreply.github.com>
* bpo-20906: Corrections & revisions to Unicode HOWTO
* bpo-34484: don't describe range as a Private Use Area
(cherry picked from commit 97c288df61)
Co-authored-by: Andrew Kuchling <amk@amk.ca>