MetricFlow has a single dependency point on pydantic but all we
use it for is our pretty printer. Since all of the objects we
pass through there are, in practice, Pydantic 1.x objects loaded
via the dsi_pydantic_shim, we simply re-use that package element
from the dbt-semantic-interfaces installation and thereby ensure
we're loading the same base model.
This build state was tested via linting (which ran on a pydantic
1.10.x install) and unit tests (which ran on a pydantic 2.7.x install).
Thank you for your pull request! We could not find a changelog entry for this change. For details on how to document a change, see the contributing guide.
MetricFlow has a single dependency point on pydantic but all we use it for is our pretty printer. Since all of the objects we pass through there are, in practice, Pydantic 1.x objects loaded via the dsi_pydantic_shim, we simply re-use that package element from the dbt-semantic-interfaces installation and thereby ensure we're loading the same base model.
This build state was tested via linting (which ran on a pydantic 1.10.x install) and unit tests (which ran on a pydantic 2.7.x install).