chore: Switch to pydantic.ConfigDict in typing_validations.py (#22268)
> PydanticDeprecatedSince20: Support for class-based `config` is deprecated, use ConfigDict instead. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.0/migration/
This commit is contained in:
parent
f88df82820
commit
1380241609
1 changed files with 3 additions and 2 deletions
|
|
@ -4,6 +4,8 @@ from inspect import _empty, isclass, signature
|
||||||
from types import EllipsisType
|
from types import EllipsisType
|
||||||
from typing import ForwardRef, TypeVar, Union
|
from typing import ForwardRef, TypeVar, Union
|
||||||
|
|
||||||
|
from pydantic import ConfigDict
|
||||||
|
|
||||||
from frappe.exceptions import FrappeTypeError
|
from frappe.exceptions import FrappeTypeError
|
||||||
|
|
||||||
SLACK_DICT = {
|
SLACK_DICT = {
|
||||||
|
|
@ -12,8 +14,7 @@ SLACK_DICT = {
|
||||||
T = TypeVar("T")
|
T = TypeVar("T")
|
||||||
|
|
||||||
|
|
||||||
class FrappePydanticConfig:
|
FrappePydanticConfig = ConfigDict(arbitrary_types_allowed=True)
|
||||||
arbitrary_types_allowed = True
|
|
||||||
|
|
||||||
|
|
||||||
def validate_argument_types(func: Callable, apply_condition: Callable = lambda: True):
|
def validate_argument_types(func: Callable, apply_condition: Callable = lambda: True):
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue