Skip to content

Commit e26e98a

Browse files
methanenative-api
authored andcommitted
Use the newer breakpoint API
Co-Authored-By: Inada Naoki <[email protected]>
1 parent cc8a7a4 commit e26e98a

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

Lib/site.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,7 @@
7676

7777

7878
if os.environ.get("PYTHONSITEDEBUG", ""):
79-
import pdb
80-
pdb.set_trace()
79+
breakpoint()
8180

8281

8382
# Prefixes for site-packages; add additional prefixes like /usr/local here

Lib/test/test_site.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,10 @@ def _run(input_):
320320
return out
321321
re_pdb_prompt = rb"(?m)^\(Pdb\)\s*$"
322322
envvar = 'PYTHONSITEDEBUG'
323+
323324
environ = os.environ.copy()
325+
try: del environ['PYTHONBREAKPOINT']
326+
except KeyError: pass
324327

325328
environ[envvar]="1"
326329
self.assertRegex(_run(True), re_pdb_prompt)

0 commit comments

Comments
 (0)