psycopg[binary] 替代并列声明的 psycopg + psycopg-binary。上游的 binary extra 是 psycopg-binary==<同版本> 的精确 pin,而原来两条各自 带范围,没有东西保证它们同步——单独升级其中一个就可能凑出上游没测过 的组合。解析结果不变,requirements.txt 只多了 extra 自带的 implementation_name != 'pypy' 标记。 apt 依赖从 10 个降到 4 个: - curl / unzip / openssl:全仓库零引用。解压走 Python zipfile, 健康检查走 xmlrpc,openssl 装的是 CLI 而 Python 要的是 libssl - libpq5:psycopg_binary.libs 自带 libpq.so.5.18,容器内实测 psycopg.pq.__impl__ == binary - libjpeg62-turbo:pillow.libs 自带 libjpeg.so.62 - zlib1g:base 镜像的 CPython 已经带着 保留 ca-certificates(smtplib 走 TLS 时读系统信任库,不是 certifi)、 clang-format(submission/utils.py 调用)、passwd(entrypoint 建账号)、 supervisor。 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
48 lines
1000 B
TOML
48 lines
1000 B
TOML
[project]
|
|
name = "onlinejudge"
|
|
version = "2.0.0"
|
|
description = ""
|
|
readme = "README.md"
|
|
requires-python = ">=3.12"
|
|
dependencies = [
|
|
"channels>=4.3.2,<5",
|
|
"channels-redis>=4.3.0,<5",
|
|
"uvicorn[standard]>=0.34.0,<1",
|
|
"django>=6.0.4,<6.1",
|
|
"django-dramatiq>=0.15.0,<0.16",
|
|
"django-redis>=6.0.0,<7",
|
|
"djangorestframework>=3.17.1,<4",
|
|
"dramatiq>=2.1.0,<3",
|
|
"gunicorn>=26.0.0,<27",
|
|
"httpx>=0.28.1,<1",
|
|
"openai>=2.34.0,<3",
|
|
"pillow>=12.2.0,<13",
|
|
"psycopg[binary]>=3.3.4,<4",
|
|
"sentry-sdk[django]>=2.0.0,<3",
|
|
"tree-sitter>=0.25.2",
|
|
"tree-sitter-c>=0.24.2",
|
|
"tree-sitter-python>=0.25.0",
|
|
"xlsxwriter>=3.2.9,<4",
|
|
"asgiref>=3.11.1",
|
|
"jieba>=0.42.1",
|
|
]
|
|
|
|
[dependency-groups]
|
|
dev = [
|
|
"ruff>=0.15.11",
|
|
]
|
|
|
|
[tool.pyright]
|
|
venvPath = "."
|
|
venv = ".venv"
|
|
|
|
[tool.ruff]
|
|
line-length = 180
|
|
exclude = ["*/migrations/*", "*settings.py", "*/apps.py", ".venv"]
|
|
|
|
[tool.ruff.format]
|
|
quote-style = "double"
|
|
|
|
[tool.ruff.lint]
|
|
select = ["E", "F", "I"]
|