Skip to content

Premature warning about Python 3.14 in pydantic.v1 #12618

Description

@davidgilbertson

Initial Checks

  • I confirm that I'm using Pydantic V2

Description

When a module is imported from pydantic.v1 and a user is running Python 3.14, they'll get a warning: "Core Pydantic V1 functionality isn't compatible with Python 3.14 or greater."

On the surface, the logic here is sound: if the user is importing something from pydantic.v1 they must be about to use that thing, so let's warn them that it's not going to work.

But there are packages that import classes from V1 just to check if the end user is using V1. For example, LangChain in this file.

In these cases, the warning is confusing and sends developers down a rabbit hole of trying to work out "who's trying to use Pydantic V1?" and if they don't know Python intimately, they might think that different packages are using different versions of Pydantic at the same time and they're clashing, all rather unpleasant, considering that nothing's actually wrong!

I see three possible futures:

  1. Python 3.14 users in this situation get warnings, they can ignore them (warning fatigue, not great)
  2. All packages that do this "import from pydantic.v1 to check usage" pattern fix their code to check in some way that doesn't involve importing from pydantic.v1 (probably not going to happen)
  3. Pydantic refines the logic to only show this warning when it looks like something is actually going to break (e.g. triggered in the constructors of classes)

The current logic is going to be helpful to a shrinking number of users, and rather annoying for a growing number of users.

Relevant PR: #12263

Example Code

Python, Pydantic & OS Version

pydantic version: 2.12.5
        pydantic-core version: 2.41.5
          pydantic-core build: profile=release pgo=false
               python version: 3.14.0 (main, Nov 19 2025, 22:43:52) [MSC v.1944 64 bit (AMD64)]
                     platform: Windows-11-10.0.26200-SP0
             related packages: typing_extensions-4.15.0
                       commit: unknown

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions