Skip to content
This repository has been archived by the owner on Dec 18, 2023. It is now read-only.

Commit

Permalink
Pin pydantic<2 and fastapi
Browse files Browse the repository at this point in the history
  • Loading branch information
berland committed Jul 11, 2023
1 parent 8d1d5f6 commit 7137f62
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,12 @@
},
install_requires=[
"alembic",
"fastapi",
"fastapi < 0.100.0",
"httpx",
"numpy",
"pandas",
"pyarrow",
"pydantic",
"pydantic < 2",
"python-multipart",
"requests",
"sqlalchemy>=1.4",
Expand Down
5 changes: 3 additions & 2 deletions src/ert_storage/database.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import os
from typing import Any
from typing import Any, Callable

from fastapi import Depends
from sqlalchemy import create_engine
from sqlalchemy.exc import DBAPIError
from sqlalchemy.orm import declarative_base, sessionmaker
from sqlalchemy.orm import Session as SessionType
from sqlalchemy.sql import text

from ert_storage.security import security
Expand All @@ -31,7 +32,7 @@ def get_env_rdbms() -> str:
engine = create_engine(URI_RDBMS, connect_args={"check_same_thread": False})
else:
engine = create_engine(URI_RDBMS, pool_size=50, max_overflow=100)
Session = sessionmaker(autocommit=False, autoflush=False, bind=engine)
Session: Callable = sessionmaker(autocommit=False, autoflush=False, bind=engine)


Base = declarative_base()
Expand Down

0 comments on commit 7137f62

Please sign in to comment.