-
-
Notifications
You must be signed in to change notification settings - Fork 32k
3.13.0b3 regression: inspect.signature + unittest.mock #121257
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Could it be because of #121092? (especially: https://github.com/python/cpython/pull/121092/files#diff-b89cd06e4637abacb73f2500301ff979a67ad7ecbfa7cf151c7243715898d7eaL2570-L2573) |
Thank you ! It's definitely related: the test pass if I revert just the bit you pointed to. |
It is not safe to patch Add the following code in your example and you will see that it was broken before #121092. inspect.signature(self.test_mk)
def bar(x: int) -> None: pass
inspect.get_annotations(bar, eval_str=True) |
Thanks for pointing this out ! |
Uh oh!
There was an error while loading. Please reload this page.
Bug report
Bug description:
MRE:
fails with
reproduces locally and in CI: example logs
this test case is adapted from a real life application in
astropy
's test suite, which has been stable since at least Python 3.8CPython versions tested on:
3.8, 3.9, 3.10, 3.11, 3.12, 3.13
Operating systems tested on:
Linux, macOS, Windows
The text was updated successfully, but these errors were encountered: