Skip to content

Add support for Fast Stream Depends #898

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

AndrianEquestrian
Copy link

Inspired by PR 854. A slightly cleaner solution, where FastApi separated from Fast Stream properly. Even though they were together at some point, now Fast Stream - is a separate library after all.

@ZipFile ZipFile changed the base branch from master to develop June 1, 2025 22:57
@AndrianEquestrian AndrianEquestrian force-pushed the better-fast-stream-depends-integration branch from dad7b0f to 575d0e4 Compare June 14, 2025 11:19
@ets-labs ets-labs deleted a comment from cursor-com bot Jun 15, 2025
@ets-labs ets-labs deleted a comment from cursor-com bot Jun 15, 2025
@ets-labs ets-labs deleted a comment from cursor-com bot Jun 15, 2025
@ets-labs ets-labs deleted a comment from cursor-com bot Jun 15, 2025
@ets-labs ets-labs deleted a comment from cursor-com bot Jun 15, 2025
@ets-labs ets-labs deleted a comment from cursor-com bot Jun 15, 2025
@ets-labs ets-labs deleted a comment from cursor-com bot Jun 15, 2025
@ets-labs ets-labs deleted a comment from cursor-com bot Jun 15, 2025
@coveralls
Copy link

coveralls commented Jun 15, 2025

Coverage Status

coverage: 94.584% (-0.04%) from 94.62%
when pulling b414ef7 on AndrianEquestrian:better-fast-stream-depends-integration
into f2da51e on ets-labs:develop.

cursor-com[bot]

This comment was marked as outdated.

Copy link

@cursor-com cursor-com bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Falsy Dependency Extraction Fails

The _get_marker_from_parameter function fails to extract falsy but valid dependencies (e.g., False, 0, "", or a falsy _Marker) from Depends wrappers. The if _marker := marker_extractor(marker): line's implicit truthiness check prevents marker from being updated when the extracted dependency is falsy. This leaves the original Depends object, causing the subsequent isinstance(_Marker) check to fail, unlike the previous implementation.

src/dependency_injector/wiring.py#L616-L620

for marker_extractor in MARKER_EXTRACTORS:
if _marker := marker_extractor(marker):
marker = _marker
break

Fix in Cursor


Was this report helpful? Give feedback by reacting with 👍 or 👎

@ZipFile
Copy link
Contributor

ZipFile commented Jun 16, 2025

Thanks for contribution!

@ZipFile ZipFile merged commit b411807 into ets-labs:develop Jun 16, 2025
14 checks passed
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.

3 participants