[ai-ml-testing-pipelines] [langchain-mongodb-deepagents-vfs] failures on py3.14

XMLWordPrintableJSON

    • None
    • Python Drivers
    • Not Needed
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?
    • None
    • None
    • None
    • None
    • None
    • None

      Summary

      pydantic-core versions pulled in by pydantic < 2.13 have no prebuilt wheel for Python 3.14 and fail to build from source under it, breaking install/CI for langchain-mongodb and langchain-mongodb-deepagents-vfs on 3.14. Pin pydantic>=2.13.0 in both packages.

      Background

      Initial symptom looked like a warnings-related test failure: langchain-core emits a warning when its pydantic_v1 compatibility shim is imported, and libs/langchain-mongodb/pyproject.toml sets filterwarnings = ["error", ...] in [tool.pytest.ini_options], which turns any uncaught warning into a test failure. That mechanism is real, but it is not what breaks Python 3.14 support.

      Root cause (verified)

      • pydantic-core is a Rust extension built via PyO3.
      • Reproduced directly: installing pydantic==2.9.2 (pulling pydantic-core==2.23.4) into a clean Python 3.14 venv fails at build time, not at import/warning time:
        error: the configured Python interpreter version (3.14) is newer than
        PyO3's maximum supported version (3.13)
        💥 maturin failed
        
      • PyO3 0.22.2 (the version pydantic-core 2.23.4 was built against) has no support for the Python 3.14 ABI at all, and there is no prebuilt wheel to fall back to — the failure is a hard build error, unrelated to any filterwarnings setting.
      • pydantic>=2.13.0 resolves to a pydantic-core build that ships an actual Python 3.14 wheel — confirmed it installs instantly under 3.14 with no compilation step.
      • Checked libs/langchain-mongodb-deepagents-vfs/pyproject.toml specifically: it has no filterwarnings override in its own [tool.pytest.ini_options] at all, so the "warnings as errors" explanation cannot apply there regardless — the underlying problem in both packages is the same native-extension incompatibility, not test configuration.

      Fix

      • Add "pydantic>=2.13.0" to dependencies in libs/langchain-mongodb/pyproject.toml and libs/langchain-mongodb-deepagents-vfs/pyproject.toml.
      • Regenerate the affected uv.lock files (top-level and both packages) so the resolved dependency graph reflects the new floor.

      Verification

      • Clean-venv reproduction on Python 3.14: pydantic==2.9.2 fails to build (PyO3/maturin error above); pydantic>=2.13.0 installs from a prebuilt wheel with no compilation.
      • langchain-core's own declared constraint is pydantic<3.0.0,>=2.7.4 — well below what's actually required for 3.14, confirming the floor needed tightening explicitly rather than relying on the transitive constraint.

      Notes

      • No code changes were required — this is a dependency floor bump plus lockfile regeneration in both affected packages.
      • The filterwarnings = ["error"] behavior in langchain-mongodb's pytest config is a legitimate, separate mechanism worth knowing about (a genuine langchain-core deprecation warning would fail that package's tests), but it was a red herring for this specific Python 3.14 build failure.

            Assignee:
            Casey Clements
            Reporter:
            Casey Clements
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: