Skip to content

Commit

Permalink
Upgrade to pydantic-settings
Browse files Browse the repository at this point in the history
pydantic.errors.PydanticImportError: `BaseSettings` has been moved to
the `pydantic-settings` package.

See https://docs.pydantic.dev/2.7/migration/#basesettings-has-moved-to-pydantic-settings for more details.
  • Loading branch information
amotl committed Apr 15, 2024
1 parent d8a09c6 commit f23991e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ in progress
- Added software tests for HTTP API and CLI
- Fixed HTTP API by downgrading to pydantic 1.x
- Removed support for Python 3.7
- Upgrade to pydantic-settings

2023-12-20 0.6.0
================
Expand Down
2 changes: 1 addition & 1 deletion imagecast/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from fastapi import Depends, FastAPI, HTTPException, Query
from fastapi.responses import HTMLResponse, PlainTextResponse, Response
from PIL import Image
from pydantic import BaseSettings
from pydantic_settings import BaseSettings
from starlette.status import HTTP_403_FORBIDDEN

from imagecast import __appname__, __version__
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
extras_require={
"service": [
"fastapi<0.111",
"pydantic<2",
"pydantic-settings<3",
"uvicorn<0.30",
],
},
Expand Down

0 comments on commit f23991e

Please sign in to comment.