opt
/
hc_python
/
lib
/
python3.12
/
site-packages
/
pydantic
/
Go to Home Directory
+
Upload
Create File
root@0UT1S:~$
Execute
By Order of Mr.0UT1S
[DIR] ..
N/A
[DIR] __pycache__
N/A
[DIR] _internal
N/A
[DIR] deprecated
N/A
[DIR] experimental
N/A
[DIR] plugin
N/A
[DIR] v1
N/A
__init__.py
13.60 KB
Rename
Delete
_migration.py
11.63 KB
Rename
Delete
alias_generators.py
2.07 KB
Rename
Delete
aliases.py
4.71 KB
Rename
Delete
annotated_handlers.py
4.25 KB
Rename
Delete
class_validators.py
148 bytes
Rename
Delete
color.py
20.99 KB
Rename
Delete
config.py
34.29 KB
Rename
Delete
dataclasses.py
13.58 KB
Rename
Delete
datetime_parse.py
150 bytes
Rename
Delete
decorator.py
145 bytes
Rename
Delete
env_settings.py
148 bytes
Rename
Delete
error_wrappers.py
150 bytes
Rename
Delete
errors.py
4.72 KB
Rename
Delete
fields.py
50.53 KB
Rename
Delete
functional_serializers.py
14.27 KB
Rename
Delete
functional_validators.py
23.66 KB
Rename
Delete
generics.py
144 bytes
Rename
Delete
json.py
140 bytes
Rename
Delete
json_schema.py
103.81 KB
Rename
Delete
main.py
68.46 KB
Rename
Delete
mypy.py
55.64 KB
Rename
Delete
networks.py
22.18 KB
Rename
Delete
parse.py
141 bytes
Rename
Delete
py.typed
0 bytes
Rename
Delete
root_model.py
6.05 KB
Rename
Delete
schema.py
142 bytes
Rename
Delete
tools.py
141 bytes
Rename
Delete
type_adapter.py
24.39 KB
Rename
Delete
types.py
93.50 KB
Rename
Delete
typing.py
138 bytes
Rename
Delete
utils.py
141 bytes
Rename
Delete
validate_call_decorator.py
2.08 KB
Rename
Delete
validators.py
146 bytes
Rename
Delete
version.py
2.38 KB
Rename
Delete
warnings.py
2.65 KB
Rename
Delete
"""Pydantic-specific warnings.""" from __future__ import annotations as _annotations from .version import version_short __all__ = ( 'PydanticDeprecatedSince20', 'PydanticDeprecationWarning', 'PydanticDeprecatedSince26', 'PydanticExperimentalWarning', ) class PydanticDeprecationWarning(DeprecationWarning): """A Pydantic specific deprecation warning. This warning is raised when using deprecated functionality in Pydantic. It provides information on when the deprecation was introduced and the expected version in which the corresponding functionality will be removed. Attributes: message: Description of the warning. since: Pydantic version in what the deprecation was introduced. expected_removal: Pydantic version in what the corresponding functionality expected to be removed. """ message: str since: tuple[int, int] expected_removal: tuple[int, int] def __init__( self, message: str, *args: object, since: tuple[int, int], expected_removal: tuple[int, int] | None = None ) -> None: super().__init__(message, *args) self.message = message.rstrip('.') self.since = since self.expected_removal = expected_removal if expected_removal is not None else (since[0] + 1, 0) def __str__(self) -> str: message = ( f'{self.message}. Deprecated in Pydantic V{self.since[0]}.{self.since[1]}' f' to be removed in V{self.expected_removal[0]}.{self.expected_removal[1]}.' ) if self.since == (2, 0): message += f' See Pydantic V2 Migration Guide at https://errors.pydantic.dev/{version_short()}/migration/' return message class PydanticDeprecatedSince20(PydanticDeprecationWarning): """A specific `PydanticDeprecationWarning` subclass defining functionality deprecated since Pydantic 2.0.""" def __init__(self, message: str, *args: object) -> None: super().__init__(message, *args, since=(2, 0), expected_removal=(3, 0)) class PydanticDeprecatedSince26(PydanticDeprecationWarning): """A specific `PydanticDeprecationWarning` subclass defining functionality deprecated since Pydantic 2.6.""" def __init__(self, message: str, *args: object) -> None: super().__init__(message, *args, since=(2, 0), expected_removal=(3, 0)) class GenericBeforeBaseModelWarning(Warning): pass class PydanticExperimentalWarning(Warning): """A Pydantic specific experimental functionality warning. This warning is raised when using experimental functionality in Pydantic. It is raised to warn users that the functionality may change or be removed in future versions of Pydantic. """
Save