This repository has been archived on 2026-10-02. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
NeteaseUrl/tests
snowy-yang 4962542e78 feat(core): requests 兼容异步垫片 + 同步/异步桥
- core/aiohttp_compat.py:以 requests 同形 API(post/get + Response.json/text/
  status_code/raise_for_status + HTTPError/RequestException/Timeout)实现异步请求,
  使既有 requests 风格代码可「加 await + async def」最小改动迁移;4xx/5xx 不抛、
  仅 raise_for_status() 抛(与 requests 语义一致,保住风控判断逻辑)
- core/async_bridge.py:run_sync(coro) 经常驻后台事件循环线程执行协程并阻塞等待,
  供迁移期同步调用方(遗留 Flask 路由/线程池)复用异步实现

验证:pytest 16/16;ruff All checks passed;pyright 0 errors。
2026-09-26 00:27:47 +08:00
..