We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
With pydantic 2.6.0 the example below gives me a false positive warning:
pydantic 2.6.0
from pydantic import BaseModel class Point(BaseModel): coordinates: tuple[float, float] | tuple[float, float, float] print(Point(coordinates=(1.0, 2.0)).model_dump()) print(Point(coordinates=(1.0, 2.0, 3.0)).model_dump())
Output:
{'coordinates': (1.0, 2.0)} /home/me/workspace/myproject/venv/lib/python3.10/site-packages/pydantic/main.py:314: UserWarning: Pydantic serializer warnings: Unexpected extra items present in tuple return self.__pydantic_serializer__.to_python( {'coordinates': (1.0, 2.0, 3.0)}
With pydantic 2.5.3 the example does not produce any warnings.
pydantic 2.5.3
$ python -c "import pydantic.version; print(pydantic.version.version_info())" pydantic version: 2.6.0 pydantic-core version: 2.16.1 pydantic-core build: profile=release pgo=true install path: /home/me/workspace/myproject/venv/lib/python3.10/site-packages/pydantic python version: 3.10.13 (main, Aug 25 2023, 13:20:03) [GCC 9.4.0] platform: Linux-5.15.0-91-generic-x86_64-with-glibc2.31 related packages: mypy-1.8.0 typing_extensions-4.9.0 commit: unknown
The text was updated successfully, but these errors were encountered:
@schenker,
Thanks for the report. We'll look into a fix for this to be included in a patch release soon!
Sorry, something went wrong.
2.6.0
Thanks for the quick fix!
sydney-runkle
Successfully merging a pull request may close this issue.
Initial Checks
Description
With
pydantic 2.6.0
the example below gives me a false positive warning:Output:
With
pydantic 2.5.3
the example does not produce any warnings.Example Code
Python, Pydantic & OS Version
The text was updated successfully, but these errors were encountered: