@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / e246ad6f0c
Fork 0

A high-throughput and memory-efficient inference and serving engine for LLMs

Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git

Synced Nov 14, 05:30 UTC

Upgrade Pydantic to v2.12.0 and remove hack for Python 3.13 (#26481)

Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>

Harry Mellor committed Oct 9, 2025 at 14:02 UTC e246ad6f0cbc4706b5d2f4ad893fbe78409c5366
5 files changed +8 -18
requirements/common.txt
+1 -1
@@ -13,7 +13,7 @@ protobuf # Required by LlamaTokenizer.
13 fastapi[standard] >= 0.115.0 # Required by FastAPI's form models in the OpenAI API server's audio transcriptions endpoint.
14 aiohttp
15 openai >= 1.99.1 # For Responses API with reasoning content
16 -pydantic >= 2.11.7
16 +pydantic >= 2.12.0
17 prometheus_client >= 0.18.0
18 pillow # Required for image processing
19 prometheus-fastapi-instrumentator >= 7.0.0
requirements/nightly_torch_test.txt
+1 -1
@@ -44,4 +44,4 @@ numba == 0.61.2 # Required for N-gram speculative decoding
44 numpy
45 runai-model-streamer[s3,gcs]==0.14.0
46 fastsafetensors>=0.1.10
47 -pydantic>=2.10 # 2.9 leads to error on python 3.10
47 +pydantic>=2.12 # 2.11 leads to error on python 3.13
requirements/test.in
+1 -1
@@ -52,7 +52,7 @@ numba == 0.61.2 # Required for N-gram speculative decoding
52 numpy
53 runai-model-streamer[s3,gcs]==0.14.0
54 fastsafetensors>=0.1.10
55 -pydantic>=2.10 # 2.9 leads to error on python 3.10
55 +pydantic>=2.12 # 2.11 leads to error on python 3.13
56 decord==0.6.0
57 terratorch @ git+https://github.com/IBM/terratorch.git@1.1.rc3 # required for PrithviMAE test
58 gpt-oss >= 0.0.7; python_version > '3.11'
\ No newline at end of file
requirements/test.txt
+4 -4
@@ -783,7 +783,7 @@ pycparser==2.22
783 # via cffi
784 pycryptodomex==3.22.0
785 # via blobfile
786 -pydantic==2.11.7
786 +pydantic==2.12.0
787 # via
788 # -r requirements/test.in
789 # albumentations
@@ -797,7 +797,7 @@ pydantic==2.11.7
797 # openai-harmony
798 # pydantic-extra-types
799 # ray
800 -pydantic-core==2.33.2
800 +pydantic-core==2.41.1
801 # via pydantic
802 pydantic-extra-types==2.10.5
803 # via mistral-common
@@ -1224,7 +1224,7 @@ types-python-dateutil==2.9.0.20241206
1224 # via arrow
1225 typeshed-client==2.8.2
1226 # via jsonargparse
1227 -typing-extensions==4.12.2
1227 +typing-extensions==4.15.0
1228 # via
1229 # aiosignal
1230 # albumentations
@@ -1253,7 +1253,7 @@ typing-extensions==4.12.2
1253 # typer
1254 # typeshed-client
1255 # typing-inspection
1256 -typing-inspection==0.4.1
1256 +typing-inspection==0.4.2
1257 # via pydantic
1258 tzdata==2024.2
1259 # via pandas
vllm/config/utils.py
+1 -11
@@ -111,17 +111,7 @@ def get_attr_docs(cls: type[Any]) -> dict[str, str]:
111 https://davidism.com/mit-license/
112 """
113
114 - try:
115 - cls_node = ast.parse(textwrap.dedent(inspect.getsource(cls))).body[0]
116 - except (OSError, KeyError, TypeError):
117 - # HACK: Python 3.13+ workaround - set missing __firstlineno__
118 - # Workaround can be removed after we upgrade to pydantic==2.12.0
119 - with open(inspect.getfile(cls)) as f:
120 - for i, line in enumerate(f):
121 - if f"class {cls.__name__}" in line and ":" in line:
122 - cls.__firstlineno__ = i + 1
123 - break
124 - cls_node = ast.parse(textwrap.dedent(inspect.getsource(cls))).body[0]
114 + cls_node = ast.parse(textwrap.dedent(inspect.getsource(cls))).body[0]
115
116 if not isinstance(cls_node, ast.ClassDef):
117 raise TypeError("Given object was not a class.")