gh-129748: Update mimalloc to use atomic store for mi_block_set_nextx (GH-134238)
(cherry picked from commit 317c496223)
Co-authored-by: Donghee Na <donghee.na@python.org>
If the error handler is used, a new bytes object is created to set as
the object attribute of UnicodeDecodeError, and that bytes object then
replaces the original data. A pointer to the decoded data will became invalid
after destroying that temporary bytes object. So we need other way to return
the first invalid escape from _PyUnicode_DecodeUnicodeEscapeInternal().
_PyBytes_DecodeEscape() does not have such issue, because it does not
use the error handlers registry, but it should be changed for compatibility
with _PyUnicode_DecodeUnicodeEscapeInternal().
(cherry picked from commit 9f69a58623)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
gh-53189: Document peculiarities of InteractiveConsole in relation to pickle (GH-123069)
(cherry picked from commit a31bbc951a)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* Ensure that created files and dirs are always removed after test.
Now addCleanup() does not conflict with tearDown().
* Use os_helper.unlink() and os_helper.rmdir().
* Import TESTFN from os_helper.
(cherry picked from commit e29171bf8a)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
gh-133940: test_strftime incorrectly calculates expected week (GH-134281)
Let the system determine the correct tm_wday and tm_isdst.
(cherry picked from commit e3dda8f818)
Co-authored-by: Gustaf <79180496+GGyll@users.noreply.github.com>
gh-134201: Expand explanation of Base85 encodings in base64 docs (GH-134288)
Explain history of de-facto standard and how to pick between the two Base-85 encoding functions in the base-64 module.
---------
(cherry picked from commit 66aaad6103)
Co-authored-by: Alek Binion <aleksander.binion@gmail.com>
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
The 'help("topics")' output was misaligned due to "ASSIGNMENTEXPRESSIONS"
exceeding the implicit maximum default column width of 19 characters.
Reduced the number of columns from 4 to 3 in the listtopics()
function to allow more space for longer topic names.
(cherry picked from commit b22460c44d)
Co-authored-by: Étienne Pelletier <EtiennePelletier@users.noreply.github.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
In 3.13.3 we accidentally broke the interface for custom task factory. Factory authors added workarounds.
This PR (for 3.13.4) unbreaks task factories that haven't made a workaround yet while also supporting those that have.
NOTE: The custom task factory API will change to what we accidentally released in 3.13.3.
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
Co-authored-by: Guido van Rossum <gvanrossum@gmail.com>
gh-134150: Clarify distinction between JSON and Python objects (GH-134154)
* gh-134150: Clarify distinction between JSON objects and Python objects in json module docs
* Revert change to JSON introduction
* Clarify occurrences of "object literal" as JSON
(cherry picked from commit fa4e088668)
Co-authored-by: Micha Albert <micha@2231puppy.tech>
Comments immediately preceding the object's source code are used
if the object has no docstring.
Comments that do not describe the object should be separated from
the following source code by an empty line.
(cherry picked from commit 71cf4dd622)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
The code was changed in 0f7cddc308 (bpo-839496/gh-39531).
(cherry picked from commit ea2d707bd5)
Co-authored-by: Saleh Dehqanpour <salehdeh76@gmail.com>
gh-133286: add explanation about `seq` for pathlib Pattern Language (GH-133340)
(cherry picked from commit ac8df4b589)
Co-authored-by: alexey semenyuk <alexsemenyuk88@gmail.com>
gh-133986: Document string split algorithm when sep is None and maxsplit is 0 (GH-133987)
---------
(cherry picked from commit 3e23047363)
Co-authored-by: Joey Smith <joeysmith@gmail.com>
Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
Co-authored-by: Semyon Moroz <donbarbos@proton.me>
This fixes a crash in `_PyObject_TryGetInstanceAttribute` due to the use
of `_PyDictKeys_StringLookup` on an unlocked dictionary that may be
concurrently modified.
The underlying bug was already fixed in 3.14 and the main branch.
(partially cherry picked from commit 1b15c89a17)
gh-133744: Fix multiprocessing interrupt test: add an event (#133746)
Add an event to synchronize the parent process with the child
process: wait until the child process starts sleeping.
(cherry picked from commit c2989b7070)