ImportError: cannot import name 'ModelField' from 'pydantic.fields' with modern-treasury python SDK

The modern-treasury python SDK broke at import time under pydantic v2: ImportError: cannot import name 'ModelField' from 'pydantic.fields' (plus pydantic.typing and pydantic.datetime_parse imports). The SDK was written against pydantic v1 internals. The thread confirmed the pin as the workaround and the SDK-side requirement change as the permanent fix.

The SDK required pydantic v1. Workaround confirmed in the thread: pin pydantic==1.10.7. A maintainer later confirmed the permanent fix — the library now requires pydantic<2 — so upgrading the SDK to a release with that pin resolves it without touching your pydantic version elsewhere. Source: https://github.com/Modern-Treasury/modern-treasury-python/issues/142

Source: https://github.com/Modern-Treasury/modern-treasury-python/issues/142