-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Closed
Labels
bug V1Bug related to Pydantic V1.XBug related to Pydantic V1.X
Description
Checks
- I added a descriptive title to this issue
- I have searched (google, github) for similar issues and couldn't find anything
- I have read and followed the docs and still think this is a bug
Bug
Output of python -c "import pydantic.utils; print(pydantic.utils.version_info())":
pydantic version: 1.8.1
pydantic compiled: False
install path: /Users/zen-xu/.pyenv/versions/3.9.1/lib/python3.9/site-packages/pydantic
python version: 3.9.1 (default, Mar 3 2021, 21:05:29) [Clang 12.0.0 (clang-1200.0.32.29)]
platform: macOS-11.2.3-arm64-arm-64bit
optional deps. installed: ['email-validator', 'typing-extensions']
from typing import Final, ClassVar
from pydantic import BaseModel
class Template(BaseModel):
kind: Final[ClassVar[str]] = "xxx"
content: strWill raise TypeError: typing.ClassVar[str] is not valid as type argument
Metadata
Metadata
Assignees
Labels
bug V1Bug related to Pydantic V1.XBug related to Pydantic V1.X