Skip to content

Commit

Permalink
Merge pull request #82 from silx-kit/fix-settings
Browse files Browse the repository at this point in the history
Fix broken import of BaseSettings for pydantic v2
  • Loading branch information
loichuder authored Sep 11, 2023
2 parents 5b71298 + 4f29f86 commit ba195c3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion h5grove/fastapi_utils.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""Helpers for usage with `FastAPI <https://fastapi.tiangolo.com/>`_"""
from fastapi import APIRouter, Depends, Response, Query, Request
from fastapi.routing import APIRoute
from pydantic import BaseSettings
from pydantic_settings import BaseSettings
from typing import List, Optional, Union, Callable

from .content import (
Expand Down
2 changes: 2 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ install_requires =
[options.extras_require]
fastapi =
fastapi
pydantic > 2
pydantic-settings
uvicorn
flask =
Flask
Expand Down
2 changes: 1 addition & 1 deletion test/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def subprocess_server(tmp_path_factory, request):
env = os.environ.copy()
env["PYTHONPATH"] = f"{str(project_root_dir)}:{env.get('PYTHONPATH', '')}"
process = subprocess.Popen(cmd, env=env)
time.sleep(1)
time.sleep(5)
assert process.poll() is None # Check that server is running

yield SubprocessServer(served_dir=base_dir, base_url=f"http://{host}:{port}")
Expand Down

0 comments on commit ba195c3

Please sign in to comment.