|
|
8d35d5c2de
|
chore: psycopg 改用 binary extra,精简 Dockerfile 的 apt 依赖
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>
|
2026-08-05 23:11:33 -06:00 |
|
|
|
8557f8a5f5
|
refactor: python-dateutil 换成标准库
- contest 后台创建/编辑:dateutil.parser.parse 换成
datetime.fromisoformat。serializer 里 start_time/end_time 声明的是
DateTimeField,而 validate_serializer 做的是 request.data = s.data,
即重新序列化一遍,所以视图拿到的必定是 DRF 规范化后的 ISO 8601,
dateutil 的宽容解析能力在这里从来没用上
- AI 学情统计:relativedelta 换成 shift_months 辅助函数,复刻月末
收缩语义(1月31日 + 1个月 = 2月28/29日)。_parse_duration 的配置
由 delta 对象改为 rewind/advance 可调用,周档和月档统一
删除依赖:python-dateutil、six
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
2026-08-05 23:05:50 -06:00 |
|
|
|
989b33d827
|
refactor: 移除 2FA 功能与三个冗余依赖
2FA 早已是死代码:TOTP 相关端点标注为前端未调用,前端唯一的
two_factor_auth 是硬编码 false,没有任何入口能打开它。
- 删除 TwoFactorAuthAPI、CheckTFARequiredAPI、_totp* 辅助函数、
TwoFactorAuthCodeSerializer 及各 serializer 的 tfa_code 字段
- 删除管理端写 two_factor_auth/tfa_token 的分支。登录已不再校验
TOTP,若保留写入路径,置 True 会变成静默的安全降级
- 删除 User.two_factor_auth / tfa_token 字段(迁移 0009)
- 移除 django-dbconn-retry:仅挂在 INSTALLED_APPS,代码零引用。
DATABASES 未配置 CONN_MAX_AGE(默认 0),本就没有持久连接需要
重连修复。要开持久连接用 Django 自带的 CONN_HEALTH_CHECKS
- requests 换成 httpx(openai 已经引入):删除废弃的
ReleaseNotesAPI,judge dispatcher 显式传 timeout=None 以保持
requests 原本的无超时行为,判题请求是同步等结果的
依赖净减 5 个:otpauth、qrcode、requests、charset-normalizer、
django-dbconn-retry
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
2026-08-05 23:00:45 -06:00 |
|
|
|
502078b51b
|
update
|
2026-08-05 08:18:02 -06:00 |
|
|
|
7974d12475
|
build: move ruff from dev to main dependencies (needed at runtime for code formatting)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
2026-06-14 08:05:12 -06:00 |
|
|
|
0764946c17
|
add wc
|
2026-06-03 07:19:57 -06:00 |
|
|
|
57c0572fd9
|
async
|
2026-05-26 21:25:26 -06:00 |
|
|
|
8731012f47
|
use asgi
|
2026-05-26 07:37:05 -06:00 |
|
|
|
9c6c8c6406
|
deps: add tree-sitter with Python and C grammars
|
2026-05-25 20:34:58 -06:00 |
|
|
|
ae372b4ee1
|
fix pip
|
2026-05-05 07:43:25 -06:00 |
|
|
|
0fd7dedea6
|
update deps
|
2026-05-05 07:23:59 -06:00 |
|
|
|
028ea6e5f9
|
fmt
|
2026-04-23 13:57:56 -06:00 |
|
|
|
f2b046c650
|
update
|
2025-12-20 22:04:03 +08:00 |
|
|
|
22d4a9057b
|
add ws
|
2025-10-07 17:03:14 +08:00 |
|
|
|
6e1e3ef0c6
|
新增AI分析
|
2025-09-24 01:02:29 +08:00 |
|
|
|
45d727a9e0
|
删掉旧的数据库迁移文件
|
2025-06-14 17:08:52 +08:00 |
|
|
|
92adfd5415
|
update
|
2025-06-13 18:55:38 +08:00 |
|