We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6d320be commit 614ad71Copy full SHA for 614ad71
libs/core/langchain_core/utils/pydantic.py
@@ -5,13 +5,12 @@
5
import inspect
6
import textwrap
7
import warnings
8
-from contextlib import nullcontext
+from contextlib import AbstractContextManager, nullcontext
9
from functools import lru_cache, wraps
10
from types import GenericAlias
11
from typing import (
12
TYPE_CHECKING,
13
Any,
14
- ContextManager,
15
TypeVar,
16
cast,
17
overload,
@@ -569,7 +568,8 @@ def create_model_v2(
569
568
capture_warnings = True
570
571
ctx = cast(
572
- ContextManager, warnings.catch_warnings() if capture_warnings else nullcontext()
+ "AbstractContextManager",
+ warnings.catch_warnings() if capture_warnings else nullcontext(),
573
)
574
with ctx:
575
if capture_warnings:
0 commit comments