-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
bpo-44461: Check early that a pdb target is valid for execution. #27227
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
Conversation
…ge which does not have a __main__ module
Co-authored-by: Jason R. Coombs <[email protected]>
This PR builds on the work @iritkatriel began in GH-26937 and which I submitted for review in iritkatriel#18. This change addresses the root cause more directly (more closely aligning the behaviors of module-based invocation with script-based invocation) by checking early whether an indicated runpy target is actually valid for execution. This change addresses the issue more surgically, applying the fix in a single location and only in |
I see you removed the backport labels, but I do want to backport this bugfix. I know the bugfix can't be backported automatically, but it should be able to be translated to the old approach, as I've demonstrated in iritkatriel#18. |
Thanks @jaraco for the PR 🌮🎉.. I'm working now to backport this PR to: 3.10, 3.9. |
@jaraco: Please replace |
Sorry, @jaraco, I could not cleanly backport this to |
Sorry @jaraco, I had trouble checking out the |
…n. (GH-27227) * bpo-44461: Fix bug with pdb's handling of import error due to a package which does not have a __main__ module * 📜🤖 Added by blurb_it. * remove "else" Co-authored-by: Jason R. Coombs <[email protected]> * If running as a module, first check that it can run as a module. Alternate fix for bpo-44461. Co-authored-by: Irit Katriel <[email protected]> Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> Co-authored-by: Irit Katriel <[email protected]>. (cherry picked from commit ee03bad) Co-authored-by: Jason R. Coombs <[email protected]>
GH-27399 is a backport of this pull request to the 3.10 branch. |
GH-27227) * bpo-44461: Fix bug with pdb's handling of import error due to a package which does not have a __main__ module * 📜🤖 Added by blurb_it. * remove "else" Co-authored-by: Jason R. Coombs <[email protected]> * If running as a module, first check that it can run as a module. Alternate fix for bpo-44461. Co-authored-by: Irit Katriel <[email protected]> Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> Co-authored-by: Irit Katriel <[email protected]>. (cherry picked from commit ee03bad) Co-authored-by: Jason R. Coombs <[email protected]>
GH-27400 is a backport of this pull request to the 3.9 branch. |
GH-27227) (GH-27400) * [3.9] bpo-44461: Check early that a pdb target is valid for execution. (GH-27227) * bpo-44461: Fix bug with pdb's handling of import error due to a package which does not have a __main__ module * 📜🤖 Added by blurb_it. * remove "else" Co-authored-by: Jason R. Coombs <[email protected]> * If running as a module, first check that it can run as a module. Alternate fix for bpo-44461. Co-authored-by: Irit Katriel Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> Co-authored-by: Irit Katriel <[email protected]>. (cherry picked from commit ee03bad) Co-authored-by: Jason R. Coombs <[email protected]> * Ensure os_helper is imported. * Actually, os_helper doesn't exist yet. Just reference rmtree from support.
https://bugs.python.org/issue44461