44
55from pydantic .fields import FieldInfo
66from pydantic .version import VERSION as PYDANTIC_VERSION
7- from typing_extensions import deprecated
87
98PYDANTIC_VERSION_MINOR_TUPLE = tuple (int (x ) for x in PYDANTIC_VERSION .split ("." )[:2 ])
109PYDANTIC_V2 = PYDANTIC_VERSION_MINOR_TUPLE [0 ] == 2
@@ -52,7 +51,6 @@ def __init__( # noqa: PLR0913
5251 max_digits : int | None = _Unset ,
5352 decimal_places : int | None = _Unset ,
5453 examples : list [Any ] | None = None ,
55- deprecated : deprecated | str | bool | None = None ,
5654 include_in_schema : bool = True ,
5755 json_schema_extra : dict [str , Any ] | None = None ,
5856 ):
@@ -78,10 +76,6 @@ def __init__( # noqa: PLR0913
7876 if examples is not None :
7977 kwargs ["examples" ] = examples
8078 current_json_schema_extra = json_schema_extra
81- if PYDANTIC_VERSION_MINOR_TUPLE < (2 , 7 ):
82- self .deprecated = deprecated
83- else :
84- kwargs ["deprecated" ] = deprecated
8579 if PYDANTIC_V2 :
8680 kwargs .update (
8781 {
@@ -134,7 +128,6 @@ def __init__( # noqa: PLR0913
134128 max_digits : int | None = _Unset ,
135129 decimal_places : int | None = _Unset ,
136130 examples : list [Any ] | None = None ,
137- deprecated : deprecated | str | bool | None = None ,
138131 include_in_schema : bool = True ,
139132 json_schema_extra : dict [str , Any ] | None = None ,
140133 ):
@@ -163,7 +156,6 @@ def __init__( # noqa: PLR0913
163156 allow_inf_nan = allow_inf_nan ,
164157 max_digits = max_digits ,
165158 decimal_places = decimal_places ,
166- deprecated = deprecated ,
167159 examples = examples ,
168160 include_in_schema = include_in_schema ,
169161 json_schema_extra = json_schema_extra ,
@@ -199,7 +191,6 @@ def __init__( # noqa: PLR0913
199191 max_digits : int | None = _Unset ,
200192 decimal_places : int | None = _Unset ,
201193 examples : list [Any ] | None = None ,
202- deprecated : deprecated | str | bool | None = None ,
203194 include_in_schema : bool = True ,
204195 json_schema_extra : dict [str , Any ] | None = None ,
205196 ):
@@ -226,7 +217,6 @@ def __init__( # noqa: PLR0913
226217 allow_inf_nan = allow_inf_nan ,
227218 max_digits = max_digits ,
228219 decimal_places = decimal_places ,
229- deprecated = deprecated ,
230220 examples = examples ,
231221 include_in_schema = include_in_schema ,
232222 json_schema_extra = json_schema_extra ,
0 commit comments