Skip to content

Commit ae2d843

Browse files
authored
chore: upgrade dependencies, pin sqlalchemy below 2.1 (#69)
1 parent d6fec26 commit ae2d843

4 files changed

Lines changed: 483 additions & 540 deletions

File tree

‎app/ioc.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66

77
class Dependencies(Group):
88
database_engine = providers.Factory(
9-
creator=create_sa_engine, cache_settings=providers.CacheSettings(finalizer=close_sa_engine)
9+
creator=create_sa_engine, cache=providers.CacheSettings(finalizer=close_sa_engine)
1010
)
1111
session = providers.Factory(
12-
scope=Scope.REQUEST, creator=create_session, cache_settings=providers.CacheSettings(finalizer=close_session)
12+
scope=Scope.REQUEST, creator=create_session, cache=providers.CacheSettings(finalizer=close_session)
1313
)
1414

1515
decks_repository = providers.Factory(

‎migrations/env.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

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

1414

1515
# this is the Alembic Config object, which provides

‎pyproject.toml‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@ license = "MIT License"
1111
dependencies = [
1212
"fastapi>=0.76",
1313
"lite-bootstrap[fastapi-all]",
14-
"modern-di-fastapi>=2,<3",
14+
"modern-di-fastapi>=3,<4",
1515
"advanced-alchemy",
1616
"pydantic-settings",
1717
"granian[uvloop]",
1818
# database
1919
"alembic",
20-
"psycopg2",
21-
"sqlalchemy[asyncio]",
20+
"psycopg",
21+
"sqlalchemy[asyncio]<2.1",
2222
"asyncpg",
2323
# tracing
2424
"opentelemetry-instrumentation-asyncpg",
@@ -61,6 +61,7 @@ ignore = [
6161
"COM812", # flake8-commas "Trailing comma missing"
6262
"ISC001", # flake8-implicit-str-concat
6363
"S105", # Possible hardcoded password
64+
"CPY001", # Missing copyright notice at top of file
6465
]
6566
isort.lines-after-imports = 2
6667
isort.no-lines-before = ["standard-library", "local-folder"]

0 commit comments

Comments
 (0)