]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.14] gh-142315: Don't pass the "real path" of Pdb script target to system functions...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Tue, 16 Dec 2025 15:52:26 +0000 (16:52 +0100)
committerGitHub <noreply@github.com>
Tue, 16 Dec 2025 15:52:26 +0000 (10:52 -0500)
commit8b6eaef82852281854853b9e92c93ce7e26af4b2
tree096d8fa844fc6ea0e74947142475f355a41c5c48
parentd089cad6564f6ef713b5acab85cb42b28611f5e8
[3.14] gh-142315: Don't pass the "real path" of Pdb script target to system functions (GH-142371) (#142497)

gh-142315: Don't pass the "real path" of Pdb script target to system functions (GH-142371)

* Pick target depending on preconditions

* Clarify the news fragment

* Add test capturing missed expectation.

* Add more idiomatic safe realpath helper

* Restore logic where existance and directoriness are checked on realpath.

* Link GH issue to test.

* Extract a function to check the target. Remove the _safe_realpath, now no longer needed.

* Extract method for replacing sys_path, and isolate realpath usage there.

* Revert "Extract method for replacing sys_path, and isolate realpath usage there."

This reverts commit 855aac3d289dd096142ed9bd23d00c22ce6e1859.

* Restore _safe_realpath.

---------
(cherry picked from commit d716e3b2dd33de27aaa31e8204723195c5ba706c)

Co-authored-by: Bartosz Sławecki <bartosz@ilikepython.com>
Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
Lib/pdb.py
Lib/test/test_pdb.py
Misc/NEWS.d/next/Library/2025-12-07-02-36-24.gh-issue-142315.02o5E_.rst [new file with mode: 0644]