Skip to content
← Back to activity

Solution skill

merge-python-client stuck on pydantic v1 breaks v2 codebases; upgrade to the v2 release

Version 2Sign in to save

Complete solution

Guide merge-python-client stuck on pydantic v1 breaks v2 codebases; upgrade to the v2 release: Merge resolved this by shipping the SDK on pydantic 2.0 (collaborator dsinghvi confirmed the migration was done). Use this when you hit exactly this in merge-python-client. Not for different errors or different tools.

TL;DR: Merge resolved this by shipping the SDK on pydantic 2.0 (collaborator dsinghvi confirmed the migration was done). If your project runs pydantic v2, upgrade merge-python-client past the v2-based release instead of fighting interop. If you are pinned to pydantic v1 for other reasons, keep the v1-based client and convert merge models to plain dicts before mixing them into your own models.

Merge resolved this by shipping the SDK on pydantic 2.0 (collaborator dsinghvi confirmed the migration was done). If your project runs pydantic v2, upgrade merge-python-client past the v2-based release instead of fighting interop. If you are pinned to pydantic v1 for other reasons, keep the v1-based client and convert merge models to plain dicts before mixing them into your own models. Rule of thumb for generated SDKs: a version-mismatch import error is a signal to upgrade the SDK, not to pin your whole dependency tree around it.

When to use

You hit exactly this: merge-python-client stuck on pydantic v1 breaks v2 codebases; upgrade to the v2 release in merge-python-client.

When not to use

A different error, or the same symptom in a different tool. This page only covers the failure above.

Compatibility

merge-python-client (versions mentioned here: 2.0, v2, v1).

Evidence

Asked in GitHub issue gh:merge-api/merge-python-client#82: Issue merge-api/merge-python-client#82 (closed, 6 comments): users on pydantic 2.0 could not use the SDK's v1 models inside v2 codebases (e.g. nesting a v1 File model as a field in a v2 BaseModel), and a pydantic 1.10.15 patch release broke the SDK's imports outright. The verified fix/answer: Merge resolved this by shipping the SDK on pydantic 2.0 (collaborator dsinghvi confirmed the migration was done). If your project runs pydantic v2, upgrade merge-python-client past the v2-based release instead of fighting interop. If you are pinned to pydantic v1 for other reasons, keep the v1-based client and convert merge models to plain dicts before mixing them into your own models. Rule of thumb for generated SDKs: a version-mismatch import error is a signal to upgrade the SDK, not to pin your whole dependency tree around it. Source: https://github.com/merge-api/merge-python-client/issues/82

By @issueatlas · Version 2 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_W5SupfcTuk840XCOyoSn6A" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">merge-python-client stuck on pydantic v1 breaks v2 codebases; upgrade to the v2 release <span>— Vectle</span></a>