Skip to content

Commit f0f5960

Browse files
Merge branch 'main' into binascii-alphabet
2 parents 133505d + 99e2c5e commit f0f5960

Some content is hidden

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

46 files changed

+1346
-974
lines changed

Doc/tutorial/datastructures.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -493,6 +493,9 @@ Curly braces or the :func:`set` function can be used to create sets. Note: to
493493
create an empty set you have to use ``set()``, not ``{}``; the latter creates an
494494
empty dictionary, a data structure that we discuss in the next section.
495495

496+
Because sets are unordered, iterating over them or printing them can
497+
produce the elements in a different order than you expect.
498+
496499
Here is a brief demonstration::
497500

498501
>>> basket = {'apple', 'orange', 'apple', 'pear', 'orange', 'banana'}

Lib/profiling/sampling/_flamegraph_assets/flamegraph_template.html

Lines changed: 45 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,51 @@ <h3 class="section-title">Profile Summary</h3>
178178
</div>
179179
</section>
180180

181+
<!-- Hotspots Section -->
182+
<section class="sidebar-section collapsible" id="hotspots-section">
183+
<button class="section-header" onclick="toggleSection('hotspots-section')">
184+
<h3 class="section-title">Hotspots</h3>
185+
<svg class="section-chevron" width="12" height="12" viewBox="0 0 12 12" fill="none">
186+
<path d="M3 4.5L6 7.5L9 4.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
187+
</svg>
188+
</button>
189+
<div class="section-content">
190+
<div class="hotspot" id="hotspot-1">
191+
<div class="hotspot-rank hotspot-rank--1">1</div>
192+
<div class="hotspot-info">
193+
<div class="hotspot-func" id="hotspot-func-1">--</div>
194+
<div class="hotspot-file" id="hotspot-file-1">--</div>
195+
<div class="hotspot-stats">
196+
<span class="hotspot-percent" id="hotspot-percent-1">--</span>
197+
<span id="hotspot-samples-1"></span>
198+
</div>
199+
</div>
200+
</div>
201+
<div class="hotspot" id="hotspot-2">
202+
<div class="hotspot-rank hotspot-rank--2">2</div>
203+
<div class="hotspot-info">
204+
<div class="hotspot-func" id="hotspot-func-2">--</div>
205+
<div class="hotspot-file" id="hotspot-file-2">--</div>
206+
<div class="hotspot-stats">
207+
<span class="hotspot-percent" id="hotspot-percent-2">--</span>
208+
<span id="hotspot-samples-2"></span>
209+
</div>
210+
</div>
211+
</div>
212+
<div class="hotspot" id="hotspot-3">
213+
<div class="hotspot-rank hotspot-rank--3">3</div>
214+
<div class="hotspot-info">
215+
<div class="hotspot-func" id="hotspot-func-3">--</div>
216+
<div class="hotspot-file" id="hotspot-file-3">--</div>
217+
<div class="hotspot-stats">
218+
<span class="hotspot-percent" id="hotspot-percent-3">--</span>
219+
<span id="hotspot-samples-3"></span>
220+
</div>
221+
</div>
222+
</div>
223+
</div>
224+
</section>
225+
181226
<!-- Thread Stats Section (GIL/GC) -->
182227
<section class="sidebar-section thread-stats-section collapsible" id="thread-stats-bar" style="display: none;">
183228
<button class="section-header" onclick="toggleSection('thread-stats-bar')">
@@ -237,51 +282,6 @@ <h3 class="section-title">Runtime Stats</h3>
237282
</div>
238283
</section>
239284

240-
<!-- Hotspots Section -->
241-
<section class="sidebar-section collapsible" id="hotspots-section">
242-
<button class="section-header" onclick="toggleSection('hotspots-section')">
243-
<h3 class="section-title">Hotspots</h3>
244-
<svg class="section-chevron" width="12" height="12" viewBox="0 0 12 12" fill="none">
245-
<path d="M3 4.5L6 7.5L9 4.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
246-
</svg>
247-
</button>
248-
<div class="section-content">
249-
<div class="hotspot" id="hotspot-1">
250-
<div class="hotspot-rank hotspot-rank--1">1</div>
251-
<div class="hotspot-info">
252-
<div class="hotspot-func" id="hotspot-func-1">--</div>
253-
<div class="hotspot-file" id="hotspot-file-1">--</div>
254-
<div class="hotspot-stats">
255-
<span class="hotspot-percent" id="hotspot-percent-1">--</span>
256-
<span id="hotspot-samples-1"></span>
257-
</div>
258-
</div>
259-
</div>
260-
<div class="hotspot" id="hotspot-2">
261-
<div class="hotspot-rank hotspot-rank--2">2</div>
262-
<div class="hotspot-info">
263-
<div class="hotspot-func" id="hotspot-func-2">--</div>
264-
<div class="hotspot-file" id="hotspot-file-2">--</div>
265-
<div class="hotspot-stats">
266-
<span class="hotspot-percent" id="hotspot-percent-2">--</span>
267-
<span id="hotspot-samples-2"></span>
268-
</div>
269-
</div>
270-
</div>
271-
<div class="hotspot" id="hotspot-3">
272-
<div class="hotspot-rank hotspot-rank--3">3</div>
273-
<div class="hotspot-info">
274-
<div class="hotspot-func" id="hotspot-func-3">--</div>
275-
<div class="hotspot-file" id="hotspot-file-3">--</div>
276-
<div class="hotspot-stats">
277-
<span class="hotspot-percent" id="hotspot-percent-3">--</span>
278-
<span id="hotspot-samples-3"></span>
279-
</div>
280-
</div>
281-
</div>
282-
</div>
283-
</section>
284-
285285
<!-- Thread Filter Section -->
286286
<section class="sidebar-section filter-section" id="thread-section" style="display: none;">
287287
<label class="filter-label" for="thread-filter">Thread Filter</label>

Lib/test/clinic.test.c

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -530,19 +530,19 @@ test_char_converter(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
530530
{
531531
PyObject *return_value = NULL;
532532
char a = 'A';
533-
char b = '\x07';
534-
char c = '\x08';
533+
char b = '\a';
534+
char c = '\b';
535535
char d = '\t';
536536
char e = '\n';
537-
char f = '\x0b';
538-
char g = '\x0c';
537+
char f = '\v';
538+
char g = '\f';
539539
char h = '\r';
540540
char i = '"';
541541
char j = '\'';
542542
char k = '?';
543543
char l = '\\';
544-
char m = '\x00';
545-
char n = '\xff';
544+
char m = '\0';
545+
char n = '\377';
546546

547547
if (!_PyArg_CheckPositional("test_char_converter", nargs, 0, 14)) {
548548
goto exit;
@@ -936,7 +936,7 @@ static PyObject *
936936
test_char_converter_impl(PyObject *module, char a, char b, char c, char d,
937937
char e, char f, char g, char h, char i, char j,
938938
char k, char l, char m, char n)
939-
/*[clinic end generated code: output=ff11e203248582df input=e42330417a44feac]*/
939+
/*[clinic end generated code: output=6503d15448e1d4c4 input=e42330417a44feac]*/
940940

941941

942942
/*[clinic input]
@@ -1192,14 +1192,14 @@ test_int_converter
11921192
11931193
a: int = 12
11941194
b: int(accept={int}) = 34
1195-
c: int(accept={str}) = 45
1195+
c: int(accept={str}) = '-'
11961196
d: int(type='myenum') = 67
11971197
/
11981198
11991199
[clinic start generated code]*/
12001200

12011201
PyDoc_STRVAR(test_int_converter__doc__,
1202-
"test_int_converter($module, a=12, b=34, c=45, d=67, /)\n"
1202+
"test_int_converter($module, a=12, b=34, c=\'-\', d=67, /)\n"
12031203
"--\n"
12041204
"\n");
12051205

@@ -1215,7 +1215,7 @@ test_int_converter(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
12151215
PyObject *return_value = NULL;
12161216
int a = 12;
12171217
int b = 34;
1218-
int c = 45;
1218+
int c = '-';
12191219
myenum d = 67;
12201220

12211221
if (!_PyArg_CheckPositional("test_int_converter", nargs, 0, 4)) {
@@ -1266,7 +1266,7 @@ test_int_converter(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
12661266

12671267
static PyObject *
12681268
test_int_converter_impl(PyObject *module, int a, int b, int c, myenum d)
1269-
/*[clinic end generated code: output=fbcfb7554688663d input=d20541fc1ca0553e]*/
1269+
/*[clinic end generated code: output=d5357b563bdb8789 input=5d8f4eb5899b24de]*/
12701270

12711271

12721272
/*[clinic input]

0 commit comments

Comments
 (0)