Skip to content

Commit

Permalink
chore: 更新依赖库
Browse files Browse the repository at this point in the history
  • Loading branch information
FHU-yezi committed Dec 2, 2024
1 parent fb6d437 commit 577d736
Show file tree
Hide file tree
Showing 6 changed files with 167 additions and 131 deletions.
9 changes: 1 addition & 8 deletions backend/models/jianshu/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from datetime import datetime
from enum import Enum

from sshared.postgres import Table, create_enum
from sshared.postgres import Table
from sshared.strict_struct import NonEmptyStr, PositiveInt

from utils.db import jianshu_pool
Expand All @@ -24,13 +24,6 @@ class User(Table, frozen=True):
history_names: list[NonEmptyStr]
avatar_url: NonEmptyStr | None

@classmethod
async def _create_enum(cls) -> None:
async with jianshu_pool.get_conn() as conn:
await create_enum(
conn=conn, name="enum_users_status", enum_class=StatusEnum
)

@classmethod
async def get_by_slug(cls, slug: str) -> User | None:
async with jianshu_pool.get_conn() as conn:
Expand Down
2 changes: 0 additions & 2 deletions backend/models/tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ class Tool(Table, frozen=True):

@classmethod
async def init(cls) -> None:
await super().init()

async with jtools_pool.get_conn() as conn:
cursor = await conn.execute("SELECT COUNT(*) FROM tools;")
if (await cursor.fetchone())[0] == 0: # type: ignore
Expand Down
1 change: 1 addition & 0 deletions backend/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ authors = [{ name = "FHU-yezi", email = "[email protected]" }]
requires-python = ">=3.9"
dependencies = [
"httptools>=0.6.0",
"httpx<0.28.0",
"jkit>=3.0.0a16",
"psycopg[binary]>=3.2.0",
"sshared[config, postgres]>=0.18.0",
Expand Down
21 changes: 11 additions & 10 deletions backend/requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,43 +4,44 @@ click==8.1.7
colorama==0.4.6 ; platform_system == 'Windows'
dnspython==2.7.0
exceptiongroup==1.2.2 ; python_full_version < '3.11'
faker==32.1.0
faker==33.1.0
h11==0.14.0
h2==4.1.0
hpack==4.0.0
httpcore==1.0.6
httpcore==1.0.7
httptools==0.6.4
httpx==0.27.2
hyperframe==6.0.1
idna==3.10
importlib-metadata==8.5.0 ; python_full_version < '3.10'
jkit==3.0.0a16
litestar==2.12.1
litestar==2.13.0
litestar-htmx==0.4.0
markdown-it-py==3.0.0
mdurl==0.1.2
motor==3.6.0
msgspec==0.18.6
multidict==6.1.0
nodeenv==1.9.1
polyfactory==2.18.0
polyfactory==2.18.1
psycopg==3.2.3
psycopg-binary==3.2.3 ; implementation_name != 'pypy'
pygments==2.18.0
pymongo==4.9.2
pyright==1.1.388
pyright==1.1.389
python-dateutil==2.9.0.post0
pyyaml==6.0.2
rich==13.9.4
rich-click==1.8.3
rich-click==1.8.5
ruff==0.8.1
six==1.16.0
sniffio==1.3.1
sshared==0.18.0
sshared==0.19.1
sspeedup==0.25.1
tomli==2.1.0
tomli==2.2.1
typing-extensions==4.12.2
tzdata==2024.2 ; sys_platform == 'win32'
uvicorn==0.32.0
uvicorn==0.32.1
uvloop==0.21.0
watchfiles==0.24.0
watchfiles==1.0.0
zipp==3.21.0 ; python_full_version < '3.10'
17 changes: 9 additions & 8 deletions backend/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,39 +4,40 @@ click==8.1.7
colorama==0.4.6 ; platform_system == 'Windows'
dnspython==2.7.0
exceptiongroup==1.2.2 ; python_full_version < '3.11'
faker==32.1.0
faker==33.1.0
h11==0.14.0
h2==4.1.0
hpack==4.0.0
httpcore==1.0.6
httpcore==1.0.7
httptools==0.6.4
httpx==0.27.2
hyperframe==6.0.1
idna==3.10
importlib-metadata==8.5.0 ; python_full_version < '3.10'
jkit==3.0.0a16
litestar==2.12.1
litestar==2.13.0
litestar-htmx==0.4.0
markdown-it-py==3.0.0
mdurl==0.1.2
motor==3.6.0
msgspec==0.18.6
multidict==6.1.0
polyfactory==2.18.0
polyfactory==2.18.1
psycopg==3.2.3
psycopg-binary==3.2.3 ; implementation_name != 'pypy'
pygments==2.18.0
pymongo==4.9.2
python-dateutil==2.9.0.post0
pyyaml==6.0.2
rich==13.9.4
rich-click==1.8.3
rich-click==1.8.5
six==1.16.0
sniffio==1.3.1
sshared==0.18.0
sshared==0.19.1
sspeedup==0.25.1
tomli==2.1.0
tomli==2.2.1
typing-extensions==4.12.2
tzdata==2024.2 ; sys_platform == 'win32'
uvicorn==0.32.0
uvicorn==0.32.1
uvloop==0.21.0
zipp==3.21.0 ; python_full_version < '3.10'
Loading

0 comments on commit 577d736

Please sign in to comment.