File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change 13
13
import typing_extensions
14
14
from typing_extensions import deprecated , get_args , get_origin
15
15
from typing_inspection import typing_objects
16
+ from typing_inspection .introspection import is_union_origin
16
17
17
18
from pydantic .version import version_short
18
19
@@ -182,6 +183,11 @@ def is_namedtuple(tp: Any, /) -> bool:
182
183
return lenient_issubclass (tp , tuple ) and hasattr (tp , '_fields' )
183
184
184
185
186
+ # TODO In 2.12, delete this export. It is currently defined only to not break
187
+ # pydantic-settings which relies on it:
188
+ origin_is_union = is_union_origin
189
+
190
+
185
191
def is_generic_alias (tp : Any , / ) -> bool :
186
192
return isinstance (tp , (types .GenericAlias , typing ._GenericAlias )) # pyright: ignore[reportAttributeAccessIssue]
187
193
You can’t perform that action at this time.
0 commit comments