Skip to content

Commit 9130bb8

Browse files
committed
Fixes
1 parent 72d3ece commit 9130bb8

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

Doc/whatsnew/3.14.rst

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

118118
.. code-block:: python
119119
120+
import os
120121
import sys
121122
import tempfile
122-
import os
123123
124124
# Create a temporary script
125125
with tempfile.NamedTemporaryFile(mode='w', suffix='.py', delete=False) as f:
@@ -153,7 +153,7 @@ mechanisms to control access:
153153

154154
* A :envvar:`PYTHON_DISABLE_REMOTE_DEBUG` environment variable.
155155
* A :option:`-X disable-remote-debug` command-line option.
156-
* A ``--without-remote-debug`` configure flag to completely disable the feature at build time.
156+
* A :option:`--without-remote-debug` configure flag to completely disable the feature at build time.
157157

158158
A key implementation detail is that the interface piggybacks on the interpreter's existing evaluation
159159
loop and safe points, ensuring zero overhead during normal execution while providing a reliable way

Include/internal/pycore_ceval.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ void _Py_unset_eval_breaker_bit_all(PyInterpreterState *interp, uintptr_t bit);
348348
PyAPI_FUNC(_PyStackRef) _PyFloat_FromDouble_ConsumeInputs(_PyStackRef left, _PyStackRef right, double value);
349349

350350
#ifndef Py_SUPPORTS_REMOTE_DEBUG
351-
#if (defined(__APPLE__) || defined(MS_WINDOWS) || (defined(__linux__) && HAVE_PROCESS_VM_READV))
351+
#if ((defined(__APPLE__) && TARGET_OS_OSX) || defined(MS_WINDOWS) || (defined(__linux__) && HAVE_PROCESS_VM_READV))
352352
# define Py_SUPPORTS_REMOTE_DEBUG 1
353353
#endif
354354
#endif

Lib/test/test_sys.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
import operator
88
import os
99
import random
10+
import socket
1011
import struct
1112
import subprocess
1213
import sys
1314
import sysconfig
14-
import socket
1515
import test.support
1616
from io import StringIO
1717
from unittest import mock
@@ -1962,7 +1962,7 @@ def _supports_remote_attaching():
19621962

19631963
@unittest.skipIf(not sys.is_remote_debug_enabled(), "Remote debugging is not enabled")
19641964
@unittest.skipIf(sys.platform != "darwin" and sys.platform != "linux" and sys.platform != "win32",
1965-
"Test only runs on Linux and MacOS")
1965+
"Test only runs on Linux, Windows and MacOS")
19661966
@unittest.skipIf(sys.platform == "linux" and not _supports_remote_attaching(),
19671967
"Test only runs on Linux with process_vm_readv support")
19681968
class TestRemoteExec(unittest.TestCase):
@@ -1993,11 +1993,11 @@ def _run_remote_exec_test(self, script_code, python_args=None, env=None, prologu
19931993
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
19941994
sock.connect(('localhost', {port}))
19951995
1996+
{prologue}
1997+
19961998
# Signal that the process is ready
19971999
sock.sendall(b"ready")
19982000
1999-
{prologue}
2000-
20012001
print("Target process running...")
20022002
20032003
# Wait for remote script to be executed

0 commit comments

Comments
 (0)