You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
delegate_inference raise error in python-preview branch #168
Describe the bug
while run pytest . in semantic-kernel/python/tests
@staticmethod
def infer_delegate_type(function) -> DelegateTypes:
# Get the function signature
function_signature = signature(function)
awaitable = iscoroutinefunction(function)
for name, value in DelegateInference.__dict__.items():
if name.startswith("infer_") and hasattr(
> value.__wrapped__, "_delegate_type"
):
E AttributeError: 'staticmethod' object has no attribute '__wrapped__'
../semantic_kernel/orchestration/delegate_inference.py:240: AttributeError
======================================================================================= short test summary info =======================================================================================
FAILED test_text_skill.py::test_can_be_imported - AttributeError: 'staticmethod' object has no attribute '__wrapped__'
FAILED test_text_skill.py::test_can_be_imported_with_name - AttributeError: 'staticmethod' object has no attribute '__wrapped__'
===================================================================================== 2 failed, 9 passed in 0.23s =====================================================================================
To Reproduce
Steps to reproduce the behavior:
Go to semantic-kernel/python/tests
run ``pytest .`
Expected behavior
this test should not raise error
Screenshots
Desktop (please complete the following information):
OS: Mac M1
IDE: VS Code
Python version: 3.9.13
Additional context
Add any other context about the problem here.
Hey thanks for this Joowon (@joowon-dm-snu)! Is this on the latest version of the code? I can't reproduce right now (just did a fresh clone and ran pytest w/ no issues).
Ah yep, I think that's the issue. Let me just test your proposed changes and, if it works and helps us be a little bit more robust to various Python version, I'm happy to take them! Thank you for your time on this!
(I think, some point soon, we'll have a discussion and pick a minimum Python version we're looking to support. But until then, robustness to older versions is great)
(I think, some point soon, we'll have a discussion and pick a minimum Python version we're looking to support. But until then, robustness to older versions is great)
Agree with it!! i think set minimum version as 3.10+ and announce users will be fine :)
Activity
[-]in python-preview branch[/-][+]delegate_inference raise error in python-preview branch[/+]jjhenkel commentedon Mar 27, 2023
Hey thanks for this Joowon (@joowon-dm-snu)! Is this on the latest version of the code? I can't reproduce right now (just did a fresh clone and ran
pytestw/ no issues).We did just make an update to some logic related to this (but that was a few days ago)
joowon-dm-snu commentedon Mar 27, 2023
Jordan Henkel (@jjhenkel) i think error comes from python version. i'm using python 3.9 and yours is 3.10.
here is reference (link)

jjhenkel commentedon Mar 27, 2023
Ah yep, I think that's the issue. Let me just test your proposed changes and, if it works and helps us be a little bit more robust to various Python version, I'm happy to take them! Thank you for your time on this!
(I think, some point soon, we'll have a discussion and pick a minimum Python version we're looking to support. But until then, robustness to older versions is great)
joowon-dm-snu commentedon Mar 27, 2023
Agree with it!! i think set minimum version as 3.10+ and announce users will be fine :)
fix: static functions has no attr __wrapped__ (#169)
alexchaomander commentedon Mar 29, 2023
Merged!
fix: static functions has no attr __wrapped__ (#169)
fix: static functions has no attr __wrapped__ (#169)
fix: static functions has no attr __wrapped__ (#169)
fix: static functions has no attr __wrapped__ (microsoft#169)
Bump @azure/msal-browser from 2.38.0 to 2.38.1 in /webapp (microsoft#168