ITADN

DeprecationWarning for prefix= fires from dspy internals (avatar/signatures.py, avatar_optimizer.py)

#9768Opennullhack 创建于 2026-05-16
N
nullhackcommented
### Environment - **dspy version:** 3.2.1 - **Python version:** 3.14 - **Branch:** `main` ### Description Importing `dspy` produces 11 `DeprecationWarning`s about the deprecated `prefix` argument — but the warnings originate from dspy's own source code: ``` dspy/predict/avatar/signatures.py:12: DeprecationWarning: ... dspy/predict/avatar/signatures.py:16: DeprecationWarning: ... dspy/predict/avatar/signatures.py:20: DeprecationWarning: ... dspy/teleprompt/avatar_optimizer.py:30: DeprecationWarning: ... ... (11 total) ``` ### Affected files 1. `dspy/predict/avatar/signatures.py` — `Actor` class (3 `prefix=`) 2. `dspy/teleprompt/avatar_optimizer.py` — `Comparator` and `FeedbackBasedInstruction` classes (8 `prefix=`) ### Steps to reproduce ```python import warnings warnings.filterwarnings("default", category=DeprecationWarning) import dspy ``` ### Fix See PR #9767 — removes `prefix=` from all 11 internal calls.
0 条评论