mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
Python: [Breaking] Upgrade to azure-ai-projects 2.0+ (#4536)
* Prepare azure-ai-projects 2.0 GA compatibility Add allow_preview support for internal AIProjectClient creation, keep backward compatibility for renamed SDK model classes, and align Azure AI/core paths and tests for GA validation workflows. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * upgrade to ai-project==2.0.0 * Python: remove azure-ai-projects keyword-guard paths Assume azure-ai-projects 2.0+ in Azure AI client/provider/responses code paths by removing _supports_keyword_argument gating and related fallback branching. Also fix pyright typing in FoundryMemoryProvider memory store calls by using ResponseInputItemParam-typed items. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * check fixes * Python: remove unsupported foundry_features option Drop foundry_features from Azure AI client and provider surfaces because azure-ai-projects 2.0.0 does not expose that create_version parameter. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Python: add allow_preview to Foundry memory provider Propagate allow_preview when FoundryMemoryProvider constructs an AIProjectClient and update tests accordingly. Also finish wiring allow_preview through AzureAIClient-facing surfaces and related docs. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * aligning docstrings * udpated lock --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
Unverified
parent
d5e240b375
commit
23d6d91c8f
@@ -544,19 +544,19 @@ class TestFunctionExecutor:
|
||||
static_wrapped = staticmethod(my_async_func)
|
||||
|
||||
# Direct check on descriptor object fails (this is the bug)
|
||||
assert not asyncio.iscoroutinefunction(static_wrapped)
|
||||
assert not asyncio.iscoroutinefunction(static_wrapped) # type: ignore[reportDeprecated]
|
||||
assert isinstance(static_wrapped, staticmethod)
|
||||
|
||||
# But unwrapping __func__ reveals the async function
|
||||
unwrapped = static_wrapped.__func__
|
||||
assert asyncio.iscoroutinefunction(unwrapped)
|
||||
assert asyncio.iscoroutinefunction(unwrapped) # type: ignore[reportDeprecated]
|
||||
|
||||
# When accessed via class attribute, Python's descriptor protocol
|
||||
# automatically unwraps it, so it works:
|
||||
class C:
|
||||
async_static = static_wrapped
|
||||
|
||||
assert asyncio.iscoroutinefunction(C.async_static) # Works via descriptor protocol
|
||||
assert asyncio.iscoroutinefunction(C.async_static) # type: ignore[reportDeprecated] # Works via descriptor protocol
|
||||
|
||||
|
||||
class TestExecutorExplicitTypes:
|
||||
|
||||
Reference in New Issue
Block a user