@@ -1142,7 +1142,7 @@ class UuidVersion:
1142
1142
Use this class as an annotation via [`Annotated`](https://docs.python.org/3/library/typing.html#typing.Annotated), as seen below.
1143
1143
1144
1144
Attributes:
1145
- uuid_version: The version of the UUID. Must be one of 1, 3, 4, 5,or 7 .
1145
+ uuid_version: The version of the UUID. Must be one of 1, 3, 4, 5,6, 7 or 8 .
1146
1146
1147
1147
Example:
1148
1148
```python
@@ -1166,15 +1166,10 @@ def __get_pydantic_json_schema__(
1166
1166
return field_schema
1167
1167
1168
1168
def __get_pydantic_core_schema__ (self ,source :Any ,handler :GetCoreSchemaHandler )-> core_schema .CoreSchema :
1169
- if isinstance (self ,source ):
1170
- # used directly as a type
1171
- return core_schema .uuid_schema (version = self .uuid_version )
1172
- else :
1173
- # update existing schema with self.uuid_version
1174
- schema = handler (source )
1175
- _check_annotated_type (schema ['type' ],'uuid' ,self .__class__ .__name__ )
1176
- schema ['version' ]= self .uuid_version # type: ignore
1177
- return schema
1169
+ schema = handler (source )
1170
+ _check_annotated_type (schema ['type' ],'uuid' ,self .__class__ .__name__ )
1171
+ schema ['version' ]= self .uuid_version # type: ignore
1172
+ return schema
1178
1173
1179
1174
def __hash__ (self )-> int :
1180
1175
return hash (type (self .uuid_version ))