pydantic: Pydantic 1.10.3 incompatible with typing-extensions 4.1.1
Initial Checks
- I have searched GitHub for a duplicate issue and I’m sure this is something new
- I have searched Google & StackOverflow for a solution and couldn’t find anything
- I have read and followed the docs and still think this is a bug
- I am confident that the issue is with pydantic (not my code, or another library in the ecosystem like FastAPI or mypy)
Description
- Installed latest pydantic and typing-extensions 4.1.1
- Code crashes on
import pydantic
I suspect we just need to bump the min version requirement or fix a cross-version incompatibility, since it works with typing-extensions 4.4.0.
Example Code
# Set up a clean venv
# pip install pydantic==1.10.3 typing-extensions==4.1.1
>>> import pydantic
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "pydantic/__init__.py", line 2, in init pydantic.__init__
File "pydantic/dataclasses.py", line 46, in init pydantic.dataclasses
# | None | Attribute is set to None. |
File "pydantic/main.py", line 121, in init pydantic.main
TypeError: dataclass_transform() got an unexpected keyword argument 'field_specifiers'
Python, Pydantic & OS Version
Crashes so I can't run that
Tested with python 3.7.9
Affected Components
- Compatibility between releases
- Data validation/parsing
- Data serialization -
.dict()
and.json()
- JSON Schema
- Dataclasses
- Model Config
- Field Types - adding or changing a particular data type
- Function validation decorator
- Generic Models
- Other Model behaviour -
construct()
, pickling, private attributes, ORM mode - Plugins and integration with other tools - mypy, FastAPI, python-devtools, Hypothesis, VS Code, PyCharm, etc.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 5
- Comments: 15 (10 by maintainers)
Commits related to this issue
- increase minimum typing-extensions version, see #4885 — committed to pydantic/pydantic by samuelcolvin 2 years ago
- Bump pydantic version as 1.10.3 has been pulled See https://github.com/pydantic/pydantic/issues/4885 — committed to schleising/website3 by schleising 2 years ago
v1.10.3 has been yanked.
Humm, just read your message fully 🙈.
Okay, unless @hramezani or @PrettyWood have a problem, I’ll yank v1.10.3.
Once that’s done, do you have a problem with me releasing v1.10.4 with just this fixed?
Thanks for reporting, I thought the bot auto updated that, apparently not.
I’ll check tomorrow if I can update it without having to create another patch release.
On behalf of spacy-related packages: would it be possible for you to temporarily yank v1.10.3?
To address this and be compatible with v1.10.4, we’d have to release new versions of a whole series of packages and nearly everyone (including me) is currently on vacation. Even if v1.10.4 is released with a fix, pip would still back off to v1.10.3 for
spacy
, etc. because of its current pins fortyping_extensions
. If it could instead back off to v1.10.2, we’d have a bit more breathing room to make the updates on our end.