main commit
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2025-10-16 16:30:25 +09:00
parent 91c7e04474
commit 537e7b363f
1146 changed files with 45926 additions and 77196 deletions

View File

@@ -1,6 +1,8 @@
import sys
from typing import Any, Callable
import warnings
from typing import Any, Callable, Dict
from ._internal._validators import import_string
from .version import version_short
MOVED_IN_V2 = {
@@ -271,11 +273,7 @@ def getattr_migration(module: str) -> Callable[[str], Any]:
The object.
"""
if name == '__path__':
raise AttributeError(f'module {module!r} has no attribute {name!r}')
import warnings
from ._internal._validators import import_string
raise AttributeError(f'module {__name__!r} has no attribute {name!r}')
import_path = f'{module}:{name}'
if import_path in MOVED_IN_V2.keys():
@@ -300,9 +298,9 @@ def getattr_migration(module: str) -> Callable[[str], Any]:
)
if import_path in REMOVED_IN_V2:
raise PydanticImportError(f'`{import_path}` has been removed in V2.')
globals: dict[str, Any] = sys.modules[module].__dict__
globals: Dict[str, Any] = sys.modules[module].__dict__
if name in globals:
return globals[name]
raise AttributeError(f'module {module!r} has no attribute {name!r}')
raise AttributeError(f'module {__name__!r} has no attribute {name!r}')
return wrapper