Changelog¶
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
v0.2.2 — Internal Quality (2026-02-06)¶
Changed¶
- Error Handling: Replaced
InvalidConfigurerErrorexception with alogger.warning()— invalid configurers are now logged and discarded instead of raising. - Logging: Added
loggingtofactory.pyfor configurer validation and WebSocket parameter detection.
Removed¶
InvalidConfigurerError: Removed exception class, its export from__init__.py, and all related tests.
Fixed¶
- Code Quality: Changed bare
except:toexcept Exception:in test conftest.
v0.2.1 — Fixes & Quality (2026-02-05)¶
Fixed¶
- Fixed CI badge in README pointing to pico-ioc instead of pico-fastapi.
- Fixed all references from
pico-stacktopico-bootin CHANGELOG and release notes. - Fixed 5 broken unit tests against current pico-ioc attribute names (
_pico_meta,_pico_infra). - Fixed middleware test mock not propagating exceptions correctly.
- Fixed factory test expecting silent return instead of
NoControllersFoundError. - Removed redundant
pip install pico-ioc fastapifrom README (already dependencies).
Changed¶
- Bumped
pico-iocdependency from>= 2.1.3to>= 2.2.0. - Dropped Python 3.10 from CI matrix, tox and Makefile (requires-python is
>=3.11). - Changed
version_schemefrompost-releasetoguess-next-devfor clean release versions.
v0.2.0 — Ecosystem Integration (2025-11-25)¶
🔌 New¶
- Added native
pico-bootauto-discovery using thepico_boot.modulesentry point. pico-fastapiis now automatically detected and loaded when initializing applications withpico-boot.
🧱 No Behavioral Changes¶
- No updates to middleware behavior.
- No DI or request lifecycle changes.
- No breaking changes.
This release focuses exclusively on ecosystem alignment and improving the developer experience when bootstrapping applications with pico-boot.
[0.1.2] - 2025-11-18¶
Fixed¶
- Middleware Ordering: Fixed a critical issue where
PicoScopeMiddlewarewas always added last (outermost), preventing inner middlewares (like Authentication) from accessing the IoC container. - Architecture: Implemented a "Sandwich" strategy for
FastApiConfigurer. Configurers with negative priority (priority < 0) now wrap the scope middleware (e.g., Session, CORS), while configurers with positive priority (priority >= 0) run inside the scope (e.g., Auth, Business Logic).
[0.1.1] - 2025-11-18¶
Fixed¶
- Critical: Fixed a memory leak in
PicoScopeMiddleware. Request and WebSocket scopes were not being explicitly cleaned up after connection closure, leading to unbounded memory usage (aligned withpico-iocv2.1.3 breaking changes). - Fixed WebSocket argument injection mechanism. Previously, the controller method argument had to be named
websocket. It is now detected dynamically by type annotation (websocket: WebSocket), allowing any argument name (e.g.,ws: WebSocket).
Changed¶
- Architecture: Removed the global
CONTROLLERSset used for route registration. Controllers are now discovered by inspecting thepico-ioccontainer's metadata directly. This fixes state pollution issues during testing and ensures a single source of truth. - Updated dependency requirement to
pico-ioc>=2.1.3.
[0.1.0] - 2025-11-02¶
Added¶
- Initial public release of
pico-fastapi. @controllerdecorator for class-based, dependency-injected API routers.- Route decorators (
@get,@post,@put,@delete,@patch,@websocket) for controller methods. PicoScopeMiddlewarefor automaticrequest,session, andwebsocketscope management, linking FastAPI's lifecycle topico-ioc.FastApiAppFactoryto provide aFastAPIinstance as an injectable singleton.FastApiSettingsdataclass for type-safe application configuration via@configured.FastApiConfigurerprotocol for creating custom, prioritized setup hooks.- Automatic FastAPI
lifespanintegration to manage container startup and shutdown (cleanup_all_async,shutdown). - Custom exceptions (
InvalidConfigurerError,NoControllersFoundError).