Skip to content

Commit 2e69667

Browse files
committed
Rename _RemotePdb to _PdbServer
1 parent 3986c17 commit 2e69667

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

Lib/pdb.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2516,7 +2516,7 @@ class _InteractState:
25162516
ns: dict[str, typing.Any]
25172517

25182518

2519-
class _RemotePdb(Pdb):
2519+
class _PdbServer(Pdb):
25202520
def __init__(self, sockfile, owns_sockfile=True, **kwargs):
25212521
self._owns_sockfile = owns_sockfile
25222522
self._interact_state = None
@@ -2771,7 +2771,7 @@ def do_interact(self, arg):
27712771

27722772
@typing.override
27732773
def _create_recursive_debugger(self):
2774-
return _RemotePdb(self._sockfile, owns_sockfile=False)
2774+
return _PdbServer(self._sockfile, owns_sockfile=False)
27752775

27762776
@typing.override
27772777
def _prompt_for_confirmation(self, prompt, default):
@@ -3026,7 +3026,7 @@ def _connect(host, port, frame, commands, version):
30263026
with closing(socket.create_connection((host, port))) as conn:
30273027
sockfile = conn.makefile("rwb")
30283028

3029-
remote_pdb = _RemotePdb(sockfile)
3029+
remote_pdb = _PdbServer(sockfile)
30303030
weakref.finalize(remote_pdb, sockfile.close)
30313031

30323032
if Pdb._last_pdb_instance is not None:
@@ -3060,7 +3060,7 @@ def attach(pid, commands=()):
30603060
port={port},
30613061
frame=sys._getframe(1),
30623062
commands={json.dumps("\n".join(commands))},
3063-
version={_RemotePdb.protocol_version()},
3063+
version={_PdbServer.protocol_version()},
30643064
)
30653065
"""
30663066
)

Lib/test/test_remote_pdb.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@
1616
from typing import Dict, List, Optional, Tuple, Union, Any
1717

1818
import pdb
19-
from pdb import _RemotePdb, _PdbClient, _InteractState
19+
from pdb import _PdbServer, _PdbClient, _InteractState
2020

2121

2222
class MockSocketFile:
23-
"""Mock socket file for testing _RemotePdb without actual socket connections."""
23+
"""Mock socket file for testing _PdbServer without actual socket connections."""
2424

2525
def __init__(self):
2626
self.input_queue = []
@@ -62,11 +62,11 @@ def get_output(self) -> List[dict]:
6262

6363

6464
class RemotePdbTestCase(unittest.TestCase):
65-
"""Tests for the _RemotePdb class."""
65+
"""Tests for the _PdbServer class."""
6666

6767
def setUp(self):
6868
self.sockfile = MockSocketFile()
69-
self.pdb = _RemotePdb(self.sockfile)
69+
self.pdb = _PdbServer(self.sockfile)
7070

7171
# Mock some Bdb attributes that are lazily created when tracing starts
7272
self.pdb.botframe = None
@@ -269,7 +269,7 @@ def dummy_function():
269269
port={self.port},
270270
frame=frame,
271271
commands="",
272-
version=pdb._RemotePdb.protocol_version(),
272+
version=pdb._PdbServer.protocol_version(),
273273
)
274274
return x # This line should not be reached in debugging
275275

0 commit comments

Comments
 (0)