@@ -349,16 +349,10 @@ Fix a crash in a debug build when copying an empty :class:`dict` fails with
349349.. section: Core and Builtins
350350
351351 Fix the output of :mod: `marshal ` for compiled code, and so the content of
352- ``.pyc `` files, depending on what was imported or compiled before in the
353- process. A :class: `frozenset ` constant (or, in the :term: `free-threaded
354- build `, a :class: `slice ` constant) used by several functions of a module was
355- copied for each of them when one of its strings was equal to a string which
356- was already interned. The compiler now replaces the strings of the
357- constants by the interned ones before the code objects are created, while
358- equal constants are still one object. Which strings are interned does not
359- change, except for the strings of :class: `slice ` constants made only of
360- ASCII letters, digits and underscores, which are now interned in the default
361- build like those of other constants.
352+ ``.pyc `` files, varying with what was imported or compiled earlier in the
353+ process. Strings in :class: `slice ` constants made only of ASCII letters,
354+ digits and underscores are now interned in the default build, like those of
355+ other constants.
362356
363357..
364358
@@ -2674,16 +2668,10 @@ modified while its elements are serialized, for example by the
26742668.. nonce: mRsh1x
26752669.. section: Library
26762670
2677- The output of :func: `marshal.dumps ` and :func: `marshal.dump `, and so the
2678- content of :file: `.pyc ` files, no longer depends on the reference counts of
2679- the serialized objects: it is no longer changed by unrelated references to
2680- them held elsewhere in the process nor, in the :term: `free-threaded build `,
2681- by whether they have been used by other threads. An object is now written
2682- in a form that can be referenced later in the data if and only if it occurs
2683- more than once in the serialized value; this also applies to interned
2684- strings, which were always written in that form. The format is unchanged
2685- and the data can be read by previous Python versions that support the format
2686- version, but it is not byte-for-byte identical to the data written by them.
2671+ Make the output of :func: `marshal.dumps ` and :func: `marshal.dump `, and so
2672+ the content of :file: `.pyc ` files, independent of the reference counts of
2673+ the serialized objects. The format is unchanged, but the data is not
2674+ byte-for-byte identical to that written by previous Python versions.
26872675
26882676..
26892677
@@ -11337,10 +11325,8 @@ PS1 is no longer exported by venv activate script
1133711325.. nonce: Wq3nTb
1133811326.. section: C API
1133911327
11340- :c:func: `PyMarshal_WriteObjectToFile ` now builds the marshalled data in
11341- memory before writing it to the file, instead of writing it piece by piece
11342- using a buffer of constant size. Nothing is written any more if the object
11343- cannot be marshalled.
11328+ Make :c:func: `PyMarshal_WriteObjectToFile ` write nothing to the file if the
11329+ object cannot be marshalled, instead of partial data.
1134411330
1134511331..
1134611332
0 commit comments