Commit 890129f
committed
Fix Pydantic v2 compatibility and address PR review feedback
- Fix critical bug in GenericAlias handler calling (handler is callable, not object with generate_schema method)
- Completely rewrite test_pydantic_v2_compatibility.py to address all PR feedback:
- Remove invalid imports of nested functions (__get_pydantic_core_schema__)
- Fix assertion mismatches (OpenAPI version 3.1.0, correct API title)
- Restructure tests to validate patching mechanism itself
- Fix handler mocking to treat handlers as callables
- Add comprehensive behavior tests with proper classmethod calling
- All 17 tests now pass with full coverage of patching scenarios
- Address types.GenericAlias immutability issues in tests
- Improve error handling and fallback validation1 parent b1c8878 commit 890129f
File tree
2 files changed
+279
-157
lines changed- src/google/adk/utils
- tests/unittests/utils
2 files changed
+279
-157
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
79 | | - | |
| 79 | + | |
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
| |||
0 commit comments