Skip to content

Commit 3a4ed23

Browse files
committed
Address doc review
1 parent b442b1c commit 3a4ed23

File tree

3 files changed

+33
-33
lines changed

3 files changed

+33
-33
lines changed

Doc/using/cmdline.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -608,7 +608,7 @@ Miscellaneous options
608608
if is not supported on the current system. See also
609609
:envvar:`PYTHON_DISABLE_REMOTE_DEBUG` and :pep:`768`.
610610

611-
.. versionadded:: 3.14
611+
.. versionadded:: next
612612

613613
* :samp:`-X cpu_count={n}` overrides :func:`os.cpu_count`,
614614
:func:`os.process_cpu_count`, and :func:`multiprocessing.cpu_count`.
@@ -1174,7 +1174,7 @@ conflict.
11741174

11751175
See also the :option:`-X disable_remote_debug` command-line option.
11761176

1177-
.. versionadded:: 3.14
1177+
.. versionadded:: next
11781178

11791179
.. envvar:: PYTHON_CPU_COUNT
11801180

Doc/using/configure.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -667,7 +667,7 @@ also be used to improve performance.
667667
execution of a Python file in a separate process as described in :pep:`768` is
668668
not compiled.
669669

670-
..versionadded:: 3.14
670+
..versionadded:: next
671671

672672

673673
.. _debug-build:

Doc/whatsnew/3.14.rst

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -117,36 +117,36 @@ Here's a simple example that inspects object types in a running Python process:
117117

118118
.. code-block:: python
119119
120-
import sys
121-
import tempfile
122-
import os
123-
124-
# Create a temporary script
125-
with tempfile.NamedTemporaryFile(mode='w', suffix='.py', delete=False) as f:
126-
script_path = f.name
127-
f.write("""
128-
import gc
129-
import collections
130-
131-
# Collect all objects managed by the garbage collector
132-
gc.collect()
133-
134-
# Count objects by type
135-
type_counts = collections.Counter(type(obj).__name__
136-
for obj in gc.get_objects())
137-
138-
# Print the most common types
139-
print("Most common object types in process:")
140-
for type_name, count in type_counts.most_common(10):
141-
print(f" {type_name}: {count}")
142-
""")
143-
144-
try:
145-
# Execute in process with PID 1234
146-
print("Behold! An offering:")
147-
sys.remote_exec(1234, script_path)
148-
finally:
149-
os.unlink(script_path)
120+
import sys
121+
import tempfile
122+
import os
123+
124+
# Create a temporary script
125+
with tempfile.NamedTemporaryFile(mode='w', suffix='.py', delete=False) as f:
126+
script_path = f.name
127+
f.write("""
128+
import gc
129+
import collections
130+
131+
# Collect all objects managed by the garbage collector
132+
gc.collect()
133+
134+
# Count objects by type
135+
type_counts = collections.Counter(type(obj).__name__
136+
for obj in gc.get_objects())
137+
138+
# Print the most common types
139+
print("Most common object types in process:")
140+
for type_name, count in type_counts.most_common(10):
141+
print(f" {type_name}: {count}")
142+
""")
143+
144+
try:
145+
# Execute in process with PID 1234
146+
print("Behold! An offering:")
147+
sys.remote_exec(1234, script_path)
148+
finally:
149+
os.unlink(script_path)
150150
151151
The debugging interface has been carefully designed with security in mind and includes several
152152
mechanisms to control access:

0 commit comments

Comments
 (0)