chore: deprecate wrap_in_fastapi via PEP 702 @deprecated#69
Merged
Conversation
Mark wrap_in_fastapi (and the etl-uvicorn CLI it backs) as deprecated. New plugins should hand-roll a FastAPI app with explicit /invoke, /schema, /precheck, /id, and /ready handlers; chunker is the reference pattern. Adds the typing_extensions.deprecated decorator (IDE/type-checker strikethrough + runtime DeprecationWarning), a README banner, and a CHANGELOG entry. Bumps version to 0.0.43.
ctrahey
approved these changes
May 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
wrap_in_fastapi(and theetl-uvicornCLI it backs) as deprecated usingtyping_extensions.deprecated(PEP 702).README.mdpointing users at building a FastAPI app directly.CHANGELOG.mdentry and bump version0.0.42→0.0.43.Why
The wrapper obfuscates the mental model of what a plugin actually is. By auto-generating routes from a Python function's signature, plugin authors never have to engage with the HTTP contract the platform actually depends on — which routes exist, what they return, when each one is called. Authors end up reasoning about "my
run()function" instead of "my plugin's API surface," and that gap shows up the moment the contract evolves and the helper doesn't keep up.Encoding the deprecation in code rather than tribal knowledge means:
ruffrecognizes the decorator viaDeprecationWarning.DeprecationWarning(pytest default) emit one warning per call.Noise expectations
DeprecationWarningfrom non-__main__modules.wrap_in_fastapicall. Verified locally: 68 tests pass, 7 distinct call sites emit the warning.Test plan
make check-ruffpassesPYTHONPATH=. pytest test/— 68 passedDeprecationWarningfires fromwrap_in_fastapicall sites in tests