Releases: JasperSui/fastapi-injectable
v1.4.6
Changes
- bump: from 1.4.5 to 1.4.6 (#201) @JasperSui
- fix: isolate and manage internal AsyncExitStack for dependency resolution (#200) to fix #199 @JasperSui
v1.4.5
Changes
- bump: from 1.4.4 to 1.4.5 (#198) @JasperSui
- fix: separate async exit stacks for decoupled dependency resolution (#197) to fix #191 @JasperSui
- fix: ensure overrides take precedence over Depends in *get_injected_obj (#196) to fix #194 @JasperSui
📦 Dependencies
- build(deps): bump actions/checkout from 5 to 6 (#193) @dependabot[bot]
v1.4.4
Changes
- bump: from 1.4.3 to 1.4.4 (#188) @JasperSui
- fix: adapt to FastAPI 0.121.0 dependency scope mechanism changes (#187) to fix #185 @JasperSui
📦 Dependencies
- build(deps): bump actions/upload-artifact from 4 to 5 (#183) @dependabot[bot]
- build(deps): bump actions/download-artifact from 4 to 6 (#184) @dependabot[bot]
- build(deps): bump codecov/codecov-action from 4 to 5 (#182) @dependabot[bot]
v1.4.3
Changes
- bump: from 1.4.2 to 1.4.3 (#181) @JasperSui
- chore: remove upper bound for requires-python (#180) to fix #179 @JasperSui
v1.4.2
FastAPI Injectable 1.4.2
This release enhances async compatibility and modernizes the build infrastructure, with support for Python's free-threaded builds and improved event loop handling.
Key Improvements
New Features
async_get_injected_obj()
Resolves "event loop already running" errors when using dependency injection from within async contexts like Kafka consumers, async callbacks, or other running event loops. Use this instead of get_injected_obj() when already inside an async function:
# Inside an async Kafka consumer or callback
async def process_message(message):
service = await async_get_injected_obj(get_my_service)
await service.process(message)Free-Threaded Python Support
Full support for Python 3.13t and 3.14t free-threaded builds, enabling better performance in CPU-bound parallel workloads with PEP 703 compliance.
Fixes
Python 3.14+ Event Loop Compatibility
Fixed RuntimeError: There is no current event loop in thread by implementing fallback logic that creates new event loops when asyncio.get_event_loop() raises errors in Python 3.14+.
Build & Infrastructure
Migration to uv
Replaced Poetry with uv for faster dependency resolution and build times. Development environment now uses modern PEP 621 format with hatchling backend.
Code Changes
- feat: add async_get_injected_obj for running event loops (#174) @JasperSui
- fix(concurrency): add Python 3.14+ event loop compatibility (#175) @JasperSui
- build: migrate from poetry to uv for dependency management (#176) @JasperSui
- feat: add support for free-threaded Python builds (3.14t, 3.13t) (#177) @JasperSui
- bump: from 1.4.1 to 1.4.2 (#178) @JasperSui
Breaking Changes
For Contributors: Development environment setup now requires uv instead of Poetry. Update setup instructions in CONTRIBUTING.md.
Full Changelog: v1.4.1...v1.4.2
v1.4.1
Changes
- bump: from 1.4.0 to 1.4.1 (#172) @JasperSui
- feat: support 3.14 (#171) @JasperSui
- fix(util): allow get_injected_obj to accept all kind of callables (#170) @JasperSui
📦 Dependencies
- build(deps-dev): bump certifi from 2025.6.15 to 2025.8.3 (#166) @dependabot[bot]
- build(deps-dev): bump markupsafe from 3.0.2 to 3.0.3 (#165) @dependabot[bot]
- build(deps): bump typing-inspection from 0.4.1 to 0.4.2 (#167) @dependabot[bot]
- build(deps-dev): bump ipython from 8.31.0 to 8.37.0 (#168) @dependabot[bot]
- build(deps): bump pypa/gh-action-pypi-publish from 1.12.4 to 1.13.0 (#161) @dependabot[bot]
- build(deps-dev): bump wcwidth from 0.2.13 to 0.2.14 (#164) @dependabot[bot]
- build(deps): bump actions/setup-python from 5 to 6 (#163) @dependabot[bot]
- build(deps): bump codecov/codecov-action from 5.5.0 to 5.5.1 (#162) @dependabot[bot]
v1.4.0
Changes
- bump: from 1.3.1 to 1.4.0 (#160) @JasperSui
- feat: allow manual override of dependencies (#159) for fixing #133 @JasperSui
- fix: respect FastAPI dependency_overrides in get_injected_obj (#158) for fixing #153 @JasperSui
- fix: handle Optional and Union types in Depends in injectable (#157) for fixing #154 @JasperSui
📦 Dependencies
- build(deps-dev): bump mypy from 1.15.0 to 1.17.1 (#148) @dependabot[bot]
- build(deps-dev): bump requests from 2.32.4 to 2.32.5 (#149) @dependabot[bot]
- build(deps-dev): bump beautifulsoup4 from 4.13.3 to 4.13.5 (#150) @dependabot[bot]
- build(deps-dev): bump jinja2 from 3.1.5 to 3.1.6 (#151) @dependabot[bot]
- build(deps-dev): bump charset-normalizer from 3.4.2 to 3.4.3 (#152) @dependabot[bot]
- build(deps-dev): bump prompt-toolkit from 3.0.51 to 3.0.52 (#142) @dependabot[bot]
- build(deps-dev): bump soupsieve from 2.6 to 2.8 (#140) @dependabot[bot]
- build(deps-dev): bump uvicorn from 0.34.0 to 0.35.0 (#141) @dependabot[bot]
- build(deps-dev): bump coverage from 7.10.1 to 7.10.6 (#143) @dependabot[bot]
- build(deps): bump actions/download-artifact from 4.3.0 to 5.0.0 (#144) @dependabot[bot]
- build(deps): bump myst-parser from 4.0.0 to 4.0.1 (#145) @dependabot[bot]
- build(deps): bump codecov/codecov-action from 5.4.3 to 5.5.0 (#147) @dependabot[bot]
- build(deps): bump actions/checkout from 4 to 5 (#146) @dependabot[bot]
v1.3.1
v1.3.0
Changes
- bump: from 1.2.0 to 1.3.0 (#136) @JasperSui
- Added support for async generators (#135) @rod7760
📦 Dependencies
- build(deps-dev): bump coverage from 7.9.1 to 7.10.1 (#129) @dependabot[bot]
- build(deps-dev): bump pytest from 8.3.5 to 8.4.1 (#128) @dependabot[bot]
- build(deps): bump exceptiongroup from 1.2.2 to 1.3.0 (#131) @dependabot[bot]
- build(deps-dev): bump watchfiles from 1.0.5 to 1.1.0 (#132) @dependabot[bot]
- build(deps-dev): bump packaging from 24.2 to 25.0 (#130) @dependabot[bot]
v1.2.0
Changes
- bump: from 1.1.0 to 1.2.0 (#127) @JasperSui
- Dynamically create stub types for injectables (#125) @rod7760
📦 Dependencies
- build(deps): bump starlette from 0.41.3 to 0.45.3 in the pip group (#126) @dependabot[bot]
- build(deps-dev): bump coverage from 7.8.0 to 7.9.1 (#119) @dependabot[bot]
- build(deps-dev): bump pydantic from 2.10.6 to 2.11.7 (#120) @dependabot[bot]
- build(deps-dev): bump pluggy from 1.5.0 to 1.6.0 (#121) @dependabot[bot]
- build(deps-dev): bump certifi from 2025.1.31 to 2025.6.15 (#122) @dependabot[bot]
- build(deps-dev): bump pygments from 2.19.1 to 2.19.2 (#123) @dependabot[bot]
- build(deps-dev): bump urllib3 from 2.4.0 to 2.5.0 in the pip group (#118) @dependabot[bot]
- build(deps-dev): bump requests from 2.32.3 to 2.32.4 in the pip group (#117) @dependabot[bot]