GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||
GeezerVison is showing github.com — gh-96127: Fix `inspect.signature` call on mocks by sobolevn · Pull Request #96335 · python/cpython Conversation
|
|
Re-triggering CI. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I have a similar PR somewhere about this, but I'm on mobile so it's tricky to find |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
#94962 is this related? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
They are not related as far as I can tell :) Your PR does not fix this exact problem: gh pr checkout 94962 Python 3.12.0a0 (heads/main-dirty:a36235d5c7, Sep 11 2022, 12:23:24) [Clang 11.0.0 (clang-1100.0.33.16)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import inspect >>> from unittest.mock import AsyncMock >>> inspect.signature(AsyncMock()) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/Users/sobolev/Desktop/cpython/Lib/inspect.py", line 3272, in signature return Signature.from_callable(obj, follow_wrapped=follow_wrapped, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/sobolev/Desktop/cpython/Lib/inspect.py", line 3020, in from_callable return _signature_from_callable(obj, sigcls=cls, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/sobolev/Desktop/cpython/Lib/inspect.py", line 2507, in _signature_from_callable return _signature_from_function(sigcls, obj, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/sobolev/Desktop/cpython/Lib/inspect.py", line 2351, in _signature_from_function positional = arg_names[:pos_count] ~~~~~~~~~^^^^^^^^^^^^ TypeError: 'Mock' object is not subscriptable |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
@sobolevn - could you rebase and resolve the conflicts? I think this is then good to land after another quick eyeball from a reviewer... |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Sure!
I hope we can land this now! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@sobolevn this fix saved me big time. Thank you for your amazing work! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Sorry @sobolevn and @cjw296, I had trouble checking out the |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Sorry, @sobolevn and @cjw296, I could not cleanly backport this to |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
(cherry picked from commit 9e7d726)
(cherry picked from commit 9e7d726)
|
GH-101646 is a backport of this pull request to the 3.11 branch. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
GH-101647 is a backport of this pull request to the 3.10 branch. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
) (cherry picked from commit 9e7d726) Co-authored-by: Nikita Sobolev <[email protected]>
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.