8000 gh-100141: Allow pdb to deal with empty file by gaogaotiantian · Pull Request #125425 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-100141: Allow pdb to deal with empty file #125425

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Oct 15, 2024

Conversation

gaogaotiantian
Copy link
Member
@gaogaotiantian gaogaotiantian commented Oct 14, 2024

f_lineno == 0 is possible and pdb should just stop. The original fix is from #106467, I added the regression test.

Co-authored-by: SonOfLilit

@gaogaotiantian gaogaotiantian added needs backport to 3.12 only security fixes needs backport to 3.13 bugs and security fixes labels Oct 14, 2024
Comment on lines 3955 to 3956
_, _ = self.run_pdb_script(script, commands)
_, _ = self.run_pdb_module(script, commands)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
_, _ = self.run_pdb_script(script, commands)
_, _ = self.run_pdb_module(script, commands)
self.run_pdb_script(script, commands)
self.run_pdb_module(script, commands)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought about this again and I think we should at least check for something so I changed the test a bit.

@rruuaanng

This comment was marked as off-topic.

@gaogaotiantian gaogaotiantian merged commit bb9604b into python:main Oct 15, 2024
36 checks passed
@miss-islington-app
Copy link

Thanks @gaogaotiantian for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12, 3.13.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Oct 15, 2024
(cherry picked from commit bb9604b)

Co-authored-by: Tian Gao <gaogaotiantian@hotmail.com>
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Oct 15, 2024
(cherry picked from commit bb9604b)

Co-authored-by: Tian Gao <gaogaotiantian@hotmail.com>
@bedevere-app
Copy link
bedevere-app bot commented Oct 15, 2024

GH-125536 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.13 bugs and security fixes label Oct 15, 2024
@bedevere-app
Copy link
bedevere-app bot commented Oct 15, 2024

GH-125537 is a backport of this pull request to the 3.12 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.12 only security fixes label Oct 15, 2024
@gaogaotiantian
Copy link
Member Author

Shoot, I forgot to add the co-author in the commit...

@gaogaotiantian gaogaotiantian deleted the pdb-empty-file branch October 15, 2024 15:47
gaogaotiantian added a commit that referenced this pull request Oct 15, 2024
)

gh-100141: Allow pdb to deal with empty file (GH-125425)
(cherry picked from commit bb9604b)

Co-authored-by: Tian Gao <gaogaotiantian@hotmail.com>
gaogaotiantian added a commit that referenced this pull request Oct 15, 2024
)

gh-100141: Allow pdb to deal with empty file (GH-125425)
(cherry picked from commit bb9604b)

Co-authored-by: Tian Gao <gaogaotiantian@hotmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0