Skip to content

Commit f028ded

Browse files
committed
Merge remote-tracking branch 'upstream/main' into tsan
2 parents cd4cd26 + 3514ba2 commit f028ded

File tree

137 files changed

+1675
-434
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

137 files changed

+1675
-434
lines changed

.github/CODEOWNERS

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -176,9 +176,9 @@ Tools/wasm/config.site-wasm32-emscripten @freakboy3742 @emmatyping
176176
Tools/wasm/emscripten @freakboy3742 @emmatyping
177177

178178
# WebAssembly (WASI)
179-
Tools/wasm/wasi-env @brettcannon @emmatyping
180-
Tools/wasm/wasi.py @brettcannon @emmatyping
181-
Tools/wasm/wasi @brettcannon @emmatyping
179+
Tools/wasm/wasi-env @brettcannon @emmatyping @savannahostrowski
180+
Tools/wasm/wasi.py @brettcannon @emmatyping @savannahostrowski
181+
Tools/wasm/wasi @brettcannon @emmatyping @savannahostrowski
182182

183183
# Windows
184184
PC/ @python/windows-team

Doc/c-api/long.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -453,8 +453,8 @@ distinguished from a number. Use :c:func:`PyErr_Occurred` to disambiguate.
453453
454454
Otherwise, returns the number of bytes required to store the value.
455455
If this is equal to or less than *n_bytes*, the entire value was copied.
456-
All *n_bytes* of the buffer are written: large buffers are padded with
457-
zeroes.
456+
All *n_bytes* of the buffer are written: remaining bytes filled by
457+
copies of the sign bit.
458458
459459
If the returned value is greater than *n_bytes*, the value was
460460
truncated: as many of the lowest bits of the value as could fit are written,

Doc/c-api/memory.rst

Lines changed: 33 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -293,17 +293,39 @@ The following type-oriented macros are provided for convenience. Note that
293293
294294
Same as :c:func:`PyMem_Free`.
295295
296-
In addition, the following macro sets are provided for calling the Python memory
297-
allocator directly, without involving the C API functions listed above. However,
298-
note that their use does not preserve binary compatibility across Python
299-
versions and is therefore deprecated in extension modules.
300-
301-
* ``PyMem_MALLOC(size)``
302-
* ``PyMem_NEW(type, size)``
303-
* ``PyMem_REALLOC(ptr, size)``
304-
* ``PyMem_RESIZE(ptr, type, size)``
305-
* ``PyMem_FREE(ptr)``
306-
* ``PyMem_DEL(ptr)``
296+
297+
Deprecated aliases
298+
------------------
299+
300+
These are :term:`soft deprecated` aliases to existing functions and macros.
301+
They exist solely for backwards compatibility.
302+
303+
.. list-table::
304+
:widths: auto
305+
:header-rows: 1
306+
307+
* * Deprecated alias
308+
* Corresponding function or macro
309+
* * .. c:macro:: PyMem_MALLOC(size)
310+
* :c:func:`PyMem_Malloc`
311+
* * .. c:macro:: PyMem_NEW(type, size)
312+
* :c:macro:`PyMem_New`
313+
* * .. c:macro:: PyMem_REALLOC(ptr, size)
314+
* :c:func:`PyMem_Realloc`
315+
* * .. c:macro:: PyMem_RESIZE(ptr, type, size)
316+
* :c:macro:`PyMem_Resize`
317+
* * .. c:macro:: PyMem_FREE(ptr)
318+
* :c:func:`PyMem_Free`
319+
* * .. c:macro:: PyMem_DEL(ptr)
320+
* :c:func:`PyMem_Free`
321+
322+
.. versionchanged:: 3.4
323+
324+
The macros are now aliases of the corresponding functions and macros.
325+
Previously, their behavior was the same, but their use did not necessarily
326+
preserve binary compatibility across Python versions.
327+
328+
.. deprecated:: 2.0
307329
308330
309331
.. _objectinterface:

Doc/library/base64.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ POST request.
6868
May assert or raise a :exc:`ValueError` if the length of *altchars* is not 2. Raises a
6969
:exc:`TypeError` if *altchars* is not a :term:`bytes-like object`.
7070

71-
.. versionchanged:: next
71+
.. versionchanged:: 3.15
7272
Added the *wrapcol* parameter.
7373

7474

@@ -285,7 +285,7 @@ Refer to the documentation of the individual functions for more information.
285285

286286
.. versionadded:: 3.13
287287

288-
.. versionchanged:: next
288+
.. versionchanged:: 3.15
289289
The *pad* parameter was added.
290290

291291

Doc/library/binascii.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ The :mod:`binascii` module defines the following functions:
8282
.. versionchanged:: 3.6
8383
Added the *newline* parameter.
8484

85-
.. versionchanged:: next
85+
.. versionchanged:: 3.15
8686
Added the *wrapcol* parameter.
8787

8888

Doc/library/mmap.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ To map anonymous memory, -1 should be passed as the fileno along with the length
241241
specified alone, and the flush operation will extend from *offset*
242242
to the end of the mmap.
243243

244-
.. versionchanged:: next
244+
.. versionchanged:: 3.15
245245
Added *flags* parameter to control synchronization behavior.
246246

247247

@@ -488,4 +488,4 @@ MS_* Constants
488488
* :data:`MS_INVALIDATE` - Invalidate cached data: invalidates other mappings
489489
of the same file so they can see the changes.
490490

491-
.. versionadded:: next
491+
.. versionadded:: 3.15

Doc/library/os.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1562,7 +1562,7 @@ or `the MSDN <https://msdn.microsoft.com/en-us/library/z0kc8e3z.aspx>`_ on Windo
15621562

15631563
.. availability:: Linux >= 6.11
15641564

1565-
.. versionadded:: next
1565+
.. versionadded:: 3.15
15661566

15671567

15681568
.. function:: ptsname(fd, /)

Doc/library/select.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -478,6 +478,8 @@ linearly scanned again. :c:func:`!select` is *O*\ (*highest file descriptor*), w
478478

479479
.. versionchanged:: 3.15
480480
Accepts any real number as *timeout*, not only integer or float.
481+
If ``ppoll()`` function is available, *timeout* has a resolution
482+
of ``1`` ns (``1e-6`` ms) instead of ``1`` ms.
481483

482484

483485
.. _kqueue-objects:

Doc/library/unicodedata.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -188,22 +188,22 @@ following functions:
188188

189189
Returns the Grapheme_Cluster_Break property assigned to the character.
190190

191-
.. versionadded:: next
191+
.. versionadded:: 3.15
192192

193193

194194
.. function:: indic_conjunct_break(chr, /)
195195

196196
Returns the Indic_Conjunct_Break property assigned to the character.
197197

198-
.. versionadded:: next
198+
.. versionadded:: 3.15
199199

200200

201201
.. function:: extended_pictographic(chr, /)
202202

203203
Returns ``True`` if the character has the Extended_Pictographic property,
204204
``False`` otherwise.
205205

206-
.. versionadded:: next
206+
.. versionadded:: 3.15
207207

208208

209209
.. function:: normalize(form, unistr, /)
@@ -262,7 +262,7 @@ following functions:
262262
Standard Annex #29, `"Unicode Text Segmentation"
263263
<https://www.unicode.org/reports/tr29/>`_.
264264

265-
.. versionadded:: next
265+
.. versionadded:: 3.15
266266

267267

268268
In addition, the module exposes the following constant:

Include/internal/pycore_backoff.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ extern "C" {
1212
#include <assert.h>
1313
#include <stdbool.h>
1414
#include "pycore_structs.h" // _Py_BackoffCounter
15-
#include "pycore_tstate.h" // _PyPolicy
15+
#include "pycore_interp_structs.h" // _PyOptimizationConfig
1616

1717
/* 16-bit countdown counters using exponential backoff.
1818
@@ -128,11 +128,11 @@ trigger_backoff_counter(void)
128128
#define JUMP_BACKWARD_INITIAL_VALUE 4000
129129
#define JUMP_BACKWARD_INITIAL_BACKOFF 6
130130
static inline _Py_BackoffCounter
131-
initial_jump_backoff_counter(_PyPolicy *policy)
131+
initial_jump_backoff_counter(_PyOptimizationConfig *opt_config)
132132
{
133133
return make_backoff_counter(
134-
policy->interp.jump_backward_initial_value,
135-
policy->interp.jump_backward_initial_backoff);
134+
opt_config->jump_backward_initial_value,
135+
opt_config->jump_backward_initial_backoff);
136136
}
137137

138138
/* Initial exit temperature.
@@ -143,11 +143,11 @@ initial_jump_backoff_counter(_PyPolicy *policy)
143143
#define SIDE_EXIT_INITIAL_BACKOFF 6
144144

145145
static inline _Py_BackoffCounter
146-
initial_temperature_backoff_counter(_PyPolicy *policy)
146+
initial_temperature_backoff_counter(_PyOptimizationConfig *opt_config)
147147
{
148148
return make_backoff_counter(
149-
policy->jit.side_exit_initial_value,
150-
policy->jit.side_exit_initial_backoff);
149+
opt_config->side_exit_initial_value,
150+
opt_config->side_exit_initial_backoff);
151151
}
152152

153153
/* Unreachable backoff counter. */

0 commit comments

Comments
 (0)