Skip to content

chore: migrate to faststream 0.7 (drop <0.7 support)#4

Merged
lesnik512 merged 1 commit into
mainfrom
chore/faststream-0.7-migration
Jun 4, 2026
Merged

chore: migrate to faststream 0.7 (drop <0.7 support)#4
lesnik512 merged 1 commit into
mainfrom
chore/faststream-0.7-migration

Conversation

@lesnik512

@lesnik512 lesnik512 commented Jun 4, 2026

Copy link
Copy Markdown
Member

Summary

  • Bump faststream from >=0.5,<0.7 (set by the companion PR1) to
    >=0.7,<0.8.
  • Drop the _OLD_MIDDLEWARES runtime version-sniff and its <0.6 branch
    in _DiMiddleware. Single code path; no compat shim.
  • Remove the now-unused from importlib.metadata import version import.

The package's version = "0" pre-release posture justifies the hard
break on <0.7 support.

Design spec:
planning/specs/2026-06-04-faststream-0.7-migration-design.md

Implementation plan:
planning/plans/2026-06-04-faststream-0.7-migration-pr2-plan.md

Test plan

  • just lint clean on CI.
  • just test green at 100% coverage on CI.
  • tests/test_faststream_di.py passes against TestNatsBroker (the
    integration path is the regression gate for the middleware
    refactor).
  • python -c "from modern_di_faststream import FromDI, faststream_message_provider, fetch_di_container, setup_di" exits 0.

🤖 Generated with Claude Code

Bumps the dependency from "faststream>=0.5,<0.7" to "faststream>=0.7,<0.8".
Drops the _OLD_MIDDLEWARES runtime version-sniff entirely — single code
path, no compat shim, no <0.7 support. The package's version="0"
pre-release posture allows the hard break.

Changes:
- pyproject.toml: pin "faststream>=0.7,<0.8".
- modern_di_faststream/main.py:
  - Remove "from importlib.metadata import version".
  - Remove _OLD_MIDDLEWARES sniff and its <0.6 branch in
    _DiMiddleware.faststream_context.
  - Collapse the if/else property pair into a single property
    returning self.context.

Companion to:
planning/specs/2026-06-04-faststream-0.7-migration-design.md
planning/plans/2026-06-04-faststream-0.7-migration-pr2-plan.md

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@lesnik512 lesnik512 self-assigned this Jun 4, 2026
@lesnik512 lesnik512 merged commit cd94a3b into main Jun 4, 2026
6 checks passed
@lesnik512 lesnik512 deleted the chore/faststream-0.7-migration branch June 4, 2026 07:04
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.

1 participant