Skip to content

chore: remove legacy OldField and new_to_old_field bridge - #132

Open
detail-app[bot] wants to merge 1 commit into
mainfrom
detail/dead-code/chore-remove-legacy-oldfield-and-new-to-old-field-e24088
Open

detail-app[bot] wants to merge 1 commit into
mainfrom
detail/dead-code/chore-remove-legacy-oldfield-and-new-to-old-field-e24088

Conversation

@detail-app

@detail-app detail-app Bot commented Sep 16, 2026

Copy link
Copy Markdown

Remove the unused legacy field classes (OldField, OldInputField, OldOutputField) and the new_to_old_field bridge function from dspy.signatures, along with their re-exports in the package init.

These symbols were the bridge from the new pydantic-based Signature/field system to the legacy dsp.Template format, used by signature_to_template, langchain.py, and llamaindex.py. All callers were deliberately removed in the "V2.6 RC-01: Deprecations" PR (stanfordnlp#1936, Dec 2024); the symbols no longer have any production, test, or doc references. The 'Old' naming signaled deprecation intent. new_to_old_field was not even exported and had zero call-sites.

History


Dead Code PRs can be configured here.

@greptile-apps

greptile-apps Bot commented Sep 16, 2026

Copy link
Copy Markdown

Greptile Summary

This PR removes the unused legacy field compatibility layer from dspy.signatures.

  • Removes the OldField, OldInputField, and OldOutputField implementations and exports.
  • Removes the unreferenced new_to_old_field conversion helper.
  • Leaves the current Pydantic-based InputField and OutputField APIs unchanged.

Confidence Score: 5/5

The PR appears safe to merge because it cleanly removes an unreferenced legacy compatibility layer without affecting current field APIs.

No repository callers or documented compatibility requirements remain for the removed symbols, and no functional or security defects were identified.

Important Files Changed

Filename Overview
dspy/signatures/init.py Removes package-level imports and exports for the legacy field classes.
dspy/signatures/field.py Deletes the unused legacy field classes and new-to-old conversion helper.

Reviews (1): Last reviewed commit: "chore: remove legacy OldField and new_to..." | Re-trigger Greptile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants