Start here
The safe first move
Import BaseSettings from pydantic_settings instead of pydantic.
Stop before automation when: Dynamic imports. Alias-heavy settings modules.
Target shape
from pydantic_settings import BaseSettings
Pydantic Migration Guides
Move BaseSettings imports to pydantic-settings when upgrading to Pydantic v2.
Start here
Import BaseSettings from pydantic_settings instead of pydantic.
Stop before automation when: Dynamic imports. Alias-heavy settings modules.
from pydantic_settings import BaseSettings
Repo fit check
Run the matching scanner locally first. Read the free findings and manual alternatives; consider paid cleanup only if supported patterns repeat enough to justify the price.
Example scan summary
supported_findings: 38
manual_review_findings: 6
files_uploaded: 0
confidence: reviewable
Why this page exists
BaseSettings moved out of pydantic and into the pydantic-settings package.
Direct answer
Import BaseSettings from pydantic_settings instead of pydantic.
Example
from pydantic import BaseSettings
from pydantic_settings import BaseSettings
Decision path
The cleanup pack is strongest when the repo still uses direct pydantic imports and a clean validator/settings/config subset.
Before checkout
Price: $249.99 per team.
Use the exact-problem guides as a triage layer, then decide whether the repo is inside the supported subset.
FAQ
Import BaseSettings from pydantic_settings instead of pydantic.
Automate only the supported subset: Direct BaseSettings import rewrites. Direct pydantic.v1 BaseSettings import cleanup. Reporting when alias imports hide the symbol. Keep these cases in manual review: Dynamic imports. Alias-heavy settings modules. Settings behavior that changed alongside validators.
Use Pydantic v1 to v2 Migration Cleanup Pack only when this pattern repeats across enough files that manual cleanup is still costly. Use the free report and upstream guide to evaluate fit. Buy only if repeated supported edits justify the price; no paid assessment is required.
Purchase fit
One matching page is not enough by itself. Run the local scan, then buy only when the same supported pattern appears often enough to matter.
Replace @validator with @field_validator, Move BaseSettings to pydantic-settings, Convert Config to model_config, Replace validate_arguments with validate_call, Replace @root_validator(pre=True) with @model_validator(mode="before"), Why post root validators need manual review, Move pydantic.v1 imports onto pydantic, Why Config.fields is a manual-review case