Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

pydantic-ai-slim is declared `>=0.0.14` with no upper bound; the floor lacks the API darnit uses

已关闭 适合新手
#489 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
70/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
python
领域
backend

调研方向

从 packages/darnit/pyproject.toml#L41 中的依赖声明开始,并将其与 packages/darnit/src/darnit/core/llm_step.py 中 output_type 和 RunResult.output 的用法进行比较;检查 uv.lock 并确定 CI 使用的版本。完成标准是:声明的版本范围排除缺少所需 API 的版本以及未来的主版本,并且锁定文件与该范围一致。

由索引模型根据 Issue 内容生成。

描述

good first issue infrastructure module-core

Summary

darnit-core declares pydantic-ai-slim[anthropic]>=0.0.14. The code needs a much newer version, and nothing stops a future major from being resolved.

Impact

pydantic-ai-slim is a required runtime dependency (RFC-0001 Stage 1 / feature 025) on the LLM path that produces suggestive results. A resolver that honors the floor, or a downstream environment that already pins an older version, gets a darnit that fails at the first LLM consultation. Without an upper bound, the next major installs automatically into fresh pip/pipx/uvx environments.

Evidence

  • Declaration: packages/darnit/pyproject.toml#L41
  • Usage requires Agent(output_type=...) and RunResult.output: llm_step.py#L97-L99, #L139
  • uv.lock resolves 2.24.0. PyPI latest as of 2026-09-25 is 2.51.0.
  • Major history from PyPI: 1.0.0 on 2025-09-05, 2.0.0 on 2026-06-23. The project releases several minors per week.

Reproduction

Check whether each wheel's pydantic_ai/agent* modules mention output_type:

for v in 0.0.14 0.1.0; do
  curl -s https://pypi.org/pypi/pydantic-ai-slim/$v/json | python3 -c \
   "import json,sys;print([u['url'] for u in json.load(sys.stdin)['urls'] if u['filename'].endswith('.whl')][0])" \
   | xargs curl -sL -o p$v.whl
  echo "$v: $(unzip -p p$v.whl 'pydantic_ai/agent*' | grep -c output_type)"
done

Actual: 0.0.14: 0, 0.1.0: 58. The declared floor predates the output_type API. Also, uv run --no-project --with "pydantic-ai-slim[anthropic]==0.0.14" python -c "import pydantic_ai" fails with ModuleNotFoundError: No module named '_griffe' against current transitive dependencies, so the floor is not installable as-is either.

Suggested direction

Pin to the tested major, for example pydantic-ai-slim[anthropic]>=2.24,<3. Raise the floor to the lowest version CI actually exercises (optionally add a --resolution lowest-direct job). Bump the cap deliberately when 3.x ships. This follows the reasoning of #204, which bounded mcp, cryptography, and urllib3 but predates this dependency.

主要语言
Python
星标
22
派生
27
平均合并
2 天 2 小时
30 天内合并 PR
50

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

darnitdevorg/darnit 的其他 Issue

查看 darnitdevorg/darnit 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。