Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions app/ioc.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@

class Dependencies(Group):
database_engine = providers.Factory(
creator=create_sa_engine, cache_settings=providers.CacheSettings(finalizer=close_sa_engine)
creator=create_sa_engine, cache=providers.CacheSettings(finalizer=close_sa_engine)
)
session = providers.Factory(
scope=Scope.REQUEST, creator=create_session, cache_settings=providers.CacheSettings(finalizer=close_session)
scope=Scope.REQUEST, creator=create_session, cache=providers.CacheSettings(finalizer=close_session)
)

decks_repository = providers.Factory(
Expand Down
2 changes: 1 addition & 1 deletion migrations/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

def get_dsn() -> URL:
db_dsn = settings.db_dsn_parsed
return db_dsn.set(drivername="postgresql")
return db_dsn.set(drivername="postgresql+psycopg")


# this is the Alembic Config object, which provides
Expand Down
7 changes: 4 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ license = "MIT License"
dependencies = [
"fastapi>=0.76",
"lite-bootstrap[fastapi-all]",
"modern-di-fastapi>=2,<3",
"modern-di-fastapi>=3,<4",
"advanced-alchemy",
"pydantic-settings",
"granian[uvloop]",
# database
"alembic",
"psycopg2",
"sqlalchemy[asyncio]",
"psycopg",
"sqlalchemy[asyncio]<2.1",
"asyncpg",
# tracing
"opentelemetry-instrumentation-asyncpg",
Expand Down Expand Up @@ -61,6 +61,7 @@ ignore = [
"COM812", # flake8-commas "Trailing comma missing"
"ISC001", # flake8-implicit-str-concat
"S105", # Possible hardcoded password
"CPY001", # Missing copyright notice at top of file
]
isort.lines-after-imports = 2
isort.no-lines-before = ["standard-library", "local-folder"]
Expand Down
Loading
Loading