Skip to content

gh-138542: error message is wrong when inspect a custom module#138543

Closed
yihong0618 wants to merge 8 commits into
python:mainfrom
yihong0618:hy/fix_wrong_custom_module_dese_when_inspect
Closed

gh-138542: error message is wrong when inspect a custom module#138543
yihong0618 wants to merge 8 commits into
python:mainfrom
yihong0618:hy/fix_wrong_custom_module_dese_when_inspect

Conversation

@yihong0618

@yihong0618 yihong0618 commented Sep 5, 2025

Copy link
Copy Markdown
Contributor

as diff and issues

for build-in module there's a object.__spec__
this patch make the error message better.

Signed-off-by: yihong0618 <zouzou0208@gmail.com>
Comment thread Lib/inspect.py Outdated
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Comment thread Lib/inspect.py Outdated
Comment thread Misc/NEWS.d/next/Library/2025-09-05-23-18-51.gh-issue-138542.hQ9Q04.rst Outdated
Comment thread Lib/test/test_inspect/test_inspect.py Outdated
Comment thread Lib/test/test_inspect/test_inspect.py Outdated
Co-authored-by: sobolevn <mail@sobolevn.me>
@yihong0618

Copy link
Copy Markdown
Contributor Author

@sobolevn Thank you very much I learned how to apply suggestions batch!

Comment thread Lib/inspect.py Outdated
Co-authored-by: sobolevn <mail@sobolevn.me>
@yihong0618

Copy link
Copy Markdown
Contributor Author

@sobolevn Thank you very much

@yihong0618 yihong0618 requested a review from sobolevn September 7, 2025 10:04
Signed-off-by: yihong0618 <zouzou0208@gmail.com>
Comment thread Lib/test/test_inspect/test_inspect.py Outdated
Comment thread Lib/inspect.py Outdated
yihong0618 and others added 3 commits September 7, 2025 18:57
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Signed-off-by: yihong0618 <zouzou0208@gmail.com>

@picnixz picnixz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants