Skip to content

Commit 037c492

Browse files
authored
Merge branch 'main' into platforms-dir
2 parents 5f0a59b + 27a7160 commit 037c492

36 files changed

+299
-54
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ jobs:
261261
# Keep 1.1.1w in our list despite it being upstream EOL and otherwise
262262
# unsupported as it most resembles other 1.1.1-work-a-like ssl APIs
263263
# supported by important vendors such as AWS-LC.
264-
openssl_ver: [1.1.1w, 3.0.18, 3.2.6, 3.3.5, 3.4.3, 3.5.4]
264+
openssl_ver: [1.1.1w, 3.0.18, 3.3.5, 3.4.3, 3.5.4, 3.6.0]
265265
# See Tools/ssl/make_ssl_data.py for notes on adding a new version
266266
env:
267267
OPENSSL_VER: ${{ matrix.openssl_ver }}

Doc/library/idle.rst

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ Go to Line
158158

159159
Show Completions
160160
Open a scrollable list allowing selection of existing names. See
161-
:ref:`Completions <completions>` in the Editing and navigation section below.
161+
:ref:`Completions <completions>` in the Editing and Navigation section below.
162162

163163
Expand Word
164164
Expand a prefix you have typed to match a full word in the same window;
@@ -167,7 +167,7 @@ Expand Word
167167
Show Call Tip
168168
After an unclosed parenthesis for a function, open a small window with
169169
function parameter hints. See :ref:`Calltips <calltips>` in the
170-
Editing and navigation section below.
170+
Editing and Navigation section below.
171171

172172
Show Surrounding Parens
173173
Highlight the surrounding parenthesis.
@@ -178,9 +178,9 @@ Format menu (Editor window only)
178178
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
179179

180180
Format Paragraph
181-
Reformat the current blank-line-delimited paragraph in comment block or
182-
multiline string or selected line in a string. All lines in the
183-
paragraph will be formatted to less than N columns, where N defaults to 72.
181+
Rewrap the text block containing the text insert cursor.
182+
Avoid code lines. See :ref:`Format block<format-block>` in the
183+
Editing and Navigation section below.
184184

185185
Indent Region
186186
Shift selected lines right by the indent width (default 4 spaces).
@@ -566,6 +566,20 @@ In an editor, import statements have no effect until one runs the file.
566566
One might want to run a file after writing import statements, after
567567
adding function definitions, or after opening an existing file.
568568

569+
.. _format-block:
570+
571+
Format block
572+
^^^^^^^^^^^^
573+
574+
Reformat Paragraph rewraps a block ('paragraph') of contiguous equally
575+
indented non-blank comments, a similar block of text within a multiline
576+
string, or a selected subset of either.
577+
If needed, add a blank line to separate string from code.
578+
Partial lines in a selection expand to complete lines.
579+
The resulting lines have the same indent as before
580+
but have maximum total length of N columns (characters).
581+
Change the default N of 72 on the Window tab of IDLE Settings.
582+
569583
.. _code-context:
570584

571585
Code Context

Doc/whatsnew/3.15.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -792,6 +792,12 @@ tkinter
792792
using Tcl's ``-all`` and ``-overlap`` options.
793793
(Contributed by Rihaan Meher in :gh:`130848`)
794794

795+
* Added new methods :meth:`!pack_content`, :meth:`!place_content` and
796+
:meth:`!grid_content` which use Tk commands with new names (introduced
797+
in Tk 8.6) instead of :meth:`!*_slaves` methods which use Tk commands
798+
with outdated names.
799+
(Contributed by Serhiy Storchaka in :gh:`143754`)
800+
795801
types
796802
------
797803

Include/internal/pycore_interp_structs.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -411,6 +411,7 @@ typedef struct _PyOptimizationConfig {
411411

412412
// Optimization flags
413413
bool specialization_enabled;
414+
bool uops_optimize_enabled;
414415
} _PyOptimizationConfig;
415416

416417
struct

Lib/dbm/dumb.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
- seems to contain a bug when updating...
1010
1111
- reclaim free space (currently, space once occupied by deleted or expanded
12-
items is not reused exept if .reorganize() is called)
12+
items is not reused except if .reorganize() is called)
1313
1414
- support concurrent access (currently, if two processes take turns making
1515
updates, they can mess up the index)

Lib/idlelib/help.html

Lines changed: 18 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Lib/pdb.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -888,7 +888,7 @@ def _exec_in_closure(self, source, globals, locals):
888888
locals.update(pdb_eval["write_back"])
889889
eval_result = pdb_eval["result"]
890890
if eval_result is not None:
891-
print(repr(eval_result))
891+
self.message(repr(eval_result))
892892

893893
return True
894894

Lib/stat.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -166,9 +166,14 @@ def filemode(mode):
166166
perm = []
167167
for index, table in enumerate(_filemode_table):
168168
for bit, char in table:
169-
if mode & bit == bit:
170-
perm.append(char)
171-
break
169+
if index == 0:
170+
if S_IFMT(mode) == bit:
171+
perm.append(char)
172+
break
173+
else:
174+
if mode & bit == bit:
175+
perm.append(char)
176+
break
172177
else:
173178
if index == 0:
174179
# Unknown filetype

Lib/test/test_coroutines.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2265,6 +2265,20 @@ def c():
22652265
# before fixing, visible stack from throw would be shorter than from send.
22662266
self.assertEqual(len_send, len_throw)
22672267

2268+
def test_call_generator_in_frame_clear(self):
2269+
# gh-143939: Running a generator while clearing the coroutine's frame
2270+
# should not be misinterpreted as a yield.
2271+
class CallGeneratorOnDealloc:
2272+
def __del__(self):
2273+
next(x for x in [1])
2274+
2275+
async def coro():
2276+
obj = CallGeneratorOnDealloc()
2277+
return 42
2278+
2279+
yielded, result = run_async(coro())
2280+
self.assertEqual(yielded, [])
2281+
self.assertEqual(result, 42)
22682282

22692283
@unittest.skipIf(
22702284
support.is_emscripten or support.is_wasi,

Lib/test/test_inspect/test_inspect.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2804,6 +2804,30 @@ def running_check_generator():
28042804
# Running after the first yield
28052805
next(self.generator)
28062806

2807+
def test_types_coroutine_wrapper_state(self):
2808+
def gen():
2809+
yield 1
2810+
yield 2
2811+
2812+
@types.coroutine
2813+
def wrapped_generator_coro():
2814+
# return a generator iterator so types.coroutine
2815+
# wraps it into types._GeneratorWrapper.
2816+
return gen()
2817+
2818+
g = wrapped_generator_coro()
2819+
self.addCleanup(g.close)
2820+
self.assertIs(type(g), types._GeneratorWrapper)
2821+
2822+
# _GeneratorWrapper must provide gi_suspended/cr_suspended
2823+
# so inspect.get*state() doesn't raise AttributeError.
2824+
self.assertEqual(inspect.getgeneratorstate(g), inspect.GEN_CREATED)
2825+
self.assertEqual(inspect.getcoroutinestate(g), inspect.CORO_CREATED)
2826+
2827+
next(g)
2828+
self.assertEqual(inspect.getgeneratorstate(g), inspect.GEN_SUSPENDED)
2829+
self.assertEqual(inspect.getcoroutinestate(g), inspect.CORO_SUSPENDED)
2830+
28072831
def test_easy_debugging(self):
28082832
# repr() and str() of a generator state should contain the state name
28092833
names = 'GEN_CREATED GEN_RUNNING GEN_SUSPENDED GEN_CLOSED'.split()

0 commit comments

Comments
 (0)