]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-149010: Improve reliability of inspect CLI (#149357)
authorAlyssa Coghlan <ncoghlan@gmail.com>
Mon, 4 May 2026 13:42:20 +0000 (20:42 +0700)
committerGitHub <noreply@github.com>
Mon, 4 May 2026 13:42:20 +0000 (23:42 +1000)
commit5235467b9183a8be8675aed17bd5b5a993975da7
tree1c697b0703d3ae3ba59b841a56c4f5c59c4f73f5
parentc3972f2795bf9270008d09dc6919b9735e20c606
gh-149010: Improve reliability of inspect CLI (#149357)

* Handle non-source modules more gracefully (and consistently)
* Improve handling of frozen modules (which may or may not have source)
* Avoid reporting misleading info when looking up objects via aliases
* Refactor CLI implementation to improve testability
* Add several more test cases

Closes #149010
Doc/library/inspect.rst
Lib/inspect.py
Lib/test/test_inspect/test_inspect.py
Misc/NEWS.d/next/Library/2026-05-04-00-51-32.gh-issue-149010.BCp_8k.rst [new file with mode: 0644]