Skip to content

Pydantic 1.10.3 incompatible with typing-extensions 4.1.1 #4885

@hsheth2

Description

@hsheth2

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug V1Bug related to Pydantic V1.X

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions