-
-
Couldn't load subscription status.
- Fork 33.2k
gh-125600: Only show stale code warning on source code display commands #125601
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
gaogaotiantian
merged 8 commits into
python:main
from
gaogaotiantian:reduce-file-change-warning
Oct 18, 2024
Merged
Changes from 4 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
b83fe61
Only show stale code warning on source code display commands
gaogaotiantian 1219003
📜🤖 Added by blurb_it.
blurb-it[bot] 3fbac42
Only read the disk when it's needed
gaogaotiantian 9e2949c
Move try block into if
gaogaotiantian fc46da5
Rename function and update docstring
gaogaotiantian 546ab72
Move save_init_file_mtime to setup()
gaogaotiantian 91bbe2a
Update Lib/pdb.py
gaogaotiantian df9e11e
Update Lib/pdb.py
gaogaotiantian File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
Misc/NEWS.d/next/Library/2024-10-16-15-55-50.gh-issue-125600.yMsJx0.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| Only show stale code warning in :mod:`pdb` when we display source code. |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The function name seems wrong - it's not "updating" the mtime if it's already there. It only sets it if it's not there.
Also, the docstring of
_validate_file_mtimeis no longer correct - it's not "since last time we saw it".There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed it to
init, do you think it's better? Also changed the docstring a bit.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe "save"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is "save" better than "init"? Because I think save is similar to update. In this specific case, we only care for the entries that are not intialized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
init sounds to me like you are initialising the actual file_mtime, rather than saving a copy of it. How about save_initial_file_mtime?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay that makes sense. I thought about it and I don't think we need to put it in the command path now. We used to do that because we want the error message on every command. Now we can do it once in setup for all the frames and leave
onecmdalone.