Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-141781: Fix pdb line prefix binding#141779

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Merged
Changes from1 commit
Commits
Show all changes
13 commits
Select commitHold shift + click to select a range
9ee94a2
Fix pdb.line_prefix binding in print_stack_entry
pareshjoshijNov 20, 2025
462f9af
Fix indentation in print_stack_entry method
pareshjoshijNov 20, 2025
62564e7
Fix indentation in print_stack_entry method
pareshjoshijNov 20, 2025
d0efb0b
Merge branch 'main' into fix-pdb-line-prefix-binding
pareshjoshijNov 20, 2025
78500dd
Merge branch 'main' into fix-pdb-line-prefix-binding
pareshjoshijNov 22, 2025
f7b6036
Add regression test for gh-141781
pareshjoshijNov 24, 2025
655b3aa
📜🤖 Added by blurb_it.
blurb-it[bot]Nov 24, 2025
83c75b9
Fix formatting in test_pdb.py
pareshjoshijNov 24, 2025
24265c2
Fix regression test spacing and add gh-141781 test
pareshjoshijNov 24, 2025
868c9fd
Update test_pdb.py
pareshjoshijNov 24, 2025
4aeba2a
Refactor test_find_function_found_with_encoding_cookie
pareshjoshijNov 24, 2025
bc231a3
Fix indentation in test_find_function_found_with_encoding_cookie
pareshjoshijNov 24, 2025
b166743
Add Paresh Joshi to ACKS list
pareshjoshijNov 24, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
PrevPrevious commit
NextNext commit
Add regression test forgh-141781
  • Loading branch information
@pareshjoshij
pareshjoshij committedNov 24, 2025
commitf7b6036b2af19d72cc3813f50254a6701d7324bc
15 changes: 15 additions & 0 deletionsLib/test/test_pdb.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -3567,6 +3567,7 @@ def test_find_function_empty_file(self):
def test_find_function_found(self):
self._assert_find_function(
"""\

def foo():
pass

Expand All@@ -3580,6 +3581,20 @@ def quux():
('bœr', 5),
)

def test_print_stack_entry_uses_dynamic_line_prefix(self):
"""Test that pdb.line_prefix binding is dynamic (gh-141781)."""
stdout = io.StringIO()
p = pdb.Pdb(stdout=stdout)

# Get the current frame to use for printing
frame = sys._getframe()

with support.swap_attr(pdb, 'line_prefix', 'CUSTOM_PREFIX> '):
p.print_stack_entry((frame, frame.f_lineno))

# Check if the custom prefix appeared in the output
self.assertIn('CUSTOM_PREFIX> ', stdout.getvalue())

def test_find_function_found_with_encoding_cookie(self):
self._assert_find_function(
"""\
Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp