Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Failure when runningtest_inspect locally #136549

Closed
Labels
3.13bugs and security fixes3.14bugs and security fixes3.15new features, bugs and security fixestestsTests in the Lib/test dirtype-bugAn unexpected behavior, bug, or error
@ZeroIntensity

Description

@ZeroIntensity

Bug report

Bug description:

When runningtest_inspect locally (either viaunittest or via executingLib/test/test_inspect/test_inspect.py), I see this failure:

ERROR: test_threading_module_has_signatures (__main__.TestSignatureDefinitions.test_threading_module_has_signatures) [supported] (builtin='excepthook')----------------------------------------------------------------------Traceback (most recent call last):  File "/home/peter/develop/cpython/Lib/test/test_inspect/test_inspect.py", line 5717, in _test_module_has_signatures    self.assertIsNotNone(inspect.signature(obj))                         ~~~~~~~~~~~~~~~~~^^^^^  File "/home/peter/develop/cpython/Lib/inspect.py", line 3312, in signature    return Signature.from_callable(obj, follow_wrapped=follow_wrapped,           ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                   globals=globals, locals=locals, eval_str=eval_str,                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                   annotation_format=annotation_format)                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  File "/home/peter/develop/cpython/Lib/inspect.py", line 3027, in from_callable    return _signature_from_callable(obj, sigcls=cls,                                    follow_wrapper_chains=follow_wrapped,                                    globals=globals, locals=locals, eval_str=eval_str,                                    annotation_format=annotation_format)  File "/home/peter/develop/cpython/Lib/inspect.py", line 2508, in _signature_from_callable    return _signature_from_builtin(sigcls, obj,                                   skip_bound_arg=skip_bound_arg)  File "/home/peter/develop/cpython/Lib/inspect.py", line 2294, in _signature_from_builtin    return _signature_fromstr(cls, func, s, skip_bound_arg)  File "/home/peter/develop/cpython/Lib/inspect.py", line 2150, in _signature_fromstr    raise ValueError("{!r} builtin has invalid signature".format(obj))ValueError: <built-in function _excepthook> builtin has invalid signature

I'm able to reproduce this back to 3.13, so it's definitely not a recent failure.

Interestingly, this failuredoes not show up when running through regrtest (python -m test test_inspect), both in CI or locally. I'm not sure if this is a misconfiguration that regrtest fixes, or an actual bug that's being hidden.

CPython versions tested on:

CPython main branch

Operating systems tested on:

Linux

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.13bugs and security fixes3.14bugs and security fixes3.15new features, bugs and security fixestestsTests in the Lib/test dirtype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp