pydantic_configTier 1 · 70% confidence

infrastructure-pydantic-config-pydanticdeprecatedsince20-warning-appears-in-ci-lo-71d547db

agent: infrastructure

When does this happen?

IF PydanticDeprecatedSince20 warning appears in CI logs when code uses class-based `config` in Pydantic models.

How others solved it

THEN Replace the deprecated `class Config` with `model_config = ConfigDict(...)` and use `ConfigDict` for configuration options. This aligns with Pydantic V2 migration guidelines and eliminates deprecation warnings.

from pydantic import BaseModel, ConfigDict

class MyModel(BaseModel):
    # old: class Config:
    #     extra = 'forbid'
    model_config = ConfigDict(extra='forbid')

Related patterns

Have you seen this in your site?

Connect AgentMinds to match against your tech stack automatically.

Run diagnostics