]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.9] bpo-44461: Check early that a pdb target is valid for execution. (GH-27227...
authorJason R. Coombs <jaraco@jaraco.com>
Wed, 28 Jul 2021 22:48:52 +0000 (18:48 -0400)
committerGitHub <noreply@github.com>
Wed, 28 Jul 2021 22:48:52 +0000 (18:48 -0400)
commit49b5e20fa8c091f9158ccd26f9a12fc1e91cfc93
tree8fab72445acb8535ae1448c5c91ff8d99e99394d
parent899e37b202c8b096d55e2e3c300c9759ebfe7f7a
[3.9] bpo-44461: Check early that a pdb target is valid for execution. (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 <jaraco@jaraco.com>
* 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 <1055913+iritkatriel@users.noreply.github.com>.
(cherry picked from commit ee03bad25e83b00ba5fc2a0265b48c6286e6b3f7)

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
* Ensure os_helper is imported.

* Actually, os_helper doesn't exist yet. Just reference rmtree from support.
Lib/pdb.py
Lib/test/test_pdb.py
Misc/NEWS.d/next/Library/2021-06-29-21-17-17.bpo-44461.acqRnV.rst [new file with mode: 0644]