Skip to content

Use of Pydantic V1 is incomaptible with Python 3.14 support #4043

@colin-nolan

Description

@colin-nolan

Describe the Bug

Strawberry currently accepts both version 1 and 2 of Pydantic as a dependency

pydantic = ["pydantic>1.6.1"]
It also supports Python 3.14 (as implied by the test matricies).

According to Pydantic:

Pydantic V1 core functionality will not work properly with Python 3.14 or greater. As such, Python 3.13 is the latest supported Python version for V1.
https://pydantic.dev/articles/pydantic-v2-12-release#support-for-python-314

In order to (safely) work with Python 3.14, the (experimental - and extremely useful) Pydantic support needs to be updated to stop using V1 functionality if V2 is available (and Python 3.14+), e.g. update required to https://github.com/strawberry-graphql/strawberry/blob/846b3c46ce8ce8bd20250475b7010c2382ae7469/strawberry/experimental/pydantic/_compat.py.

System Information

  • Operating system: n/a
  • Python version: 3.14
  • Strawberry version (if applicable): 0.284.1

Additional Context

Warnings get printed:

UserWarning: Core Pydantic V1 functionality isn't compatible with Python 3.14 or greater.

See more details in comment: #4043 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions