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-123756: Only allow restart in command line mode#123757

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
gaogaotiantian merged 19 commits intopython:mainfromgaogaotiantian:pdb-allow-restart
Sep 25, 2024

Conversation

@gaogaotiantian
Copy link
Member

@gaogaotiantiangaogaotiantian commentedSep 6, 2024
edited by bedevere-appbot
Loading

Anallow_restart argument is added topdb.Pdb to enablerun/restart command when needed (for stdlib, only in command line mode).

@gaogaotiantian
Copy link
MemberAuthor

Hi@iritkatriel , could you take a quick look at the proposal and the implementation and see if this makes sense? I will add the tests and the documentation after your pre-approval.

@gaogaotiantian
Copy link
MemberAuthor

Okay I defined a newEnum -PdbInvokeType for pdb to check whether to enable some commands internally. I also exported the enum because the debuggers based on pdb might need it.

Do you think code wise this is the way to go? I'll work on the docs and tests if the feature is good to go.

@gaogaotiantian
Copy link
MemberAuthor

Hi@iritkatriel , I updated the docs and tests, also renamed the enum class. Could you review it? Thanks!

@gaogaotiantian
Copy link
MemberAuthor

Hey@iritkatriel , I made some changes after the discussion on discord. Now the name of the argument ismode and it accepts a string'cli' or'inline', or aNone.

A few questions - do you think we should add run-time checker for the value? If we do, will it affect devs that build their debugger based on pdb? Should we have a separate method to check it so it can be overwritten? We can also do a setting kind of thing.

The related question - should we type hint this? It's not common to type hint arguments inpdb.py - one of the reasons is of course the age of the file. However, last time I heard there's still a debate on whether we should type hint as much as possible in stdlibs.

I think one thing we need to factor in is that - this argument is basically exclusively used by debugger developers. The debugger users should never need to use this. So maybe we can cut some corners (not making it super safe to use).

For the documentation, forrestart command, I did not link the availability of the command to themode argument directly because that's not how normal user experiences the difference.

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
@gaogaotiantian
Copy link
MemberAuthor

The doc change makes sense. I also added the whatsnew entry.

@gaogaotiantiangaogaotiantian merged commit28efeef intopython:mainSep 25, 2024
36 checks passed
@gaogaotiantiangaogaotiantian deleted the pdb-allow-restart branchSeptember 25, 2024 18:18
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@iritkatrieliritkatrieliritkatriel approved these changes

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@gaogaotiantian@iritkatriel

[8]ページ先頭

©2009-2025 Movatter.jp