Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32k
gh-132950: Skip test_remote_pdb if remote exec is disabled#132951
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
Uh oh!
There was an error while loading.Please reload this page.
Conversation
I don't think this is the correct way to fix it. If remote debugging is not supported, this whole test file should be skipped. |
Do we have a flag somewhere about whether |
This change is a practical change for the current API. Currently, the only way to check if remote debugging is supported is to actually call Acceptedhttps://peps.python.org/pep-0768/ only adds |
Currently maybe the only test that really uses Having a specific check in |
There is a macro to detect if remote_exec is supported. We can expose the macro somewhere (either the sys module or some other place). Ideas? |
Ah, I am forgetting I added this for this precise purpose:
|
It needs#132959 first |
If you dislike my approach, I suggest adding Checking if it's supported is non-trivial. Pseudo-code: int_PySysRemoteDebug_Supported(void){#if !defined(Py_SUPPORTS_REMOTE_DEBUG)return0;#elif !defined(Py_REMOTE_DEBUG)return0;#elsePyThreadState*tstate=_PyThreadState_GET();constPyConfig*config=_PyInterpreterState_GetConfig(tstate->interp);return (config->remote_debug==1);#endif} |
We already have it: Lines 2433 to 2449 in17718b0
|
Ok, I rewrote my PR to use |
Example:
|
@gaogaotiantian: Please review the updated PR. |
I still think we should skip the whole test file. Like I said, remote debugging does not exist if |
Ok, I updated my PR to do that. Sorry, I don't know this code, so I tried to write the smallest change :-) |
947c4f1
intopython:mainUh oh!
There was an error while loading.Please reload this page.
It makes sense to start with the smallest change :) In this specific case I think skipping the file is the way to go. This looks good. |
Uh oh!
There was an error while loading.Please reload this page.
Skip test_keyboard_interrupt() if remote execution is disabled.