Release notes¶
Wireme follows SemVer with the strict 0.x mapping: breaking changes bump minor, features and fixes bump patch. Published artifacts are immutable; a broken release is fixed by publishing a new version.
0.2.2 - 2026-07-31¶
Added¶
- Support context manager dependency factories. A factory decorated with
@contextmanageror@asynccontextmanagercan be passed towired()directly, so an existing resource no longer has to be rewritten as a bare generator function to be injectable. - Resolve context manager factories through
FromWeb, with the same FastAPI request lifecycle as generator factories: entered when the request needs them, closed after the response, nested resources closed in reverse order. - Accept context manager factories on both sides of
override_dependency()andoverride_web_dependency(), in any combination with sync, async, generator, and async-generator factories. - Add
AbstractContextManagerandAbstractAstowired()`, so a decorated factory infers the yielded type rather than the context manager type. - Add
examples/context_managers.pyandexamples/fastapi_context_managers.py, and factories in the resources and FastAPI guides.
Fixed¶
- A context manager factory passed to
wired()previously resolved to an unentered context manager object instead of h no setup or cleanup and no error.
Notes¶
- No behavior change for any dependency form that already worked. Decorators
applied with
functools.wraps, including `f intact and keep running. - Recorded in ADR 0020.
0.2.1 - 2026-07-18¶
- Refresh the README, documentation landing page, and package metadata to present Wireme as a focused dependency injection library.
- Refine README badges and surface the documentation link more clearly.
- Standardize release preparation and publishing, and enforce Conventional Commits throughout pull requests.
- Update GitHub Actions and build tooling dependencies.
- This release does not change Wireme's runtime dependency injection behavior.
0.2.0 - 2026-07-17¶
- Remove
castandcast_resultfromwireandwired; Wireme now preserves arguments, dependency results, and return values exactly as supplied. - Remove
ValidationErrorandWiremeErrorfrom the public root facade. - Remove the Pydantic runtime dependency and explicitly disable every FastDepends serializer path, including FastAPI bridges.
- Constrain FastDepends to the tested 3.0.x line and add core and integration regressions for serializer-free behavior.
- Reject FastDepends CustomField markers so upstream argument-processing extensions cannot leak through Wireme's DI-only boundary.
- Make examples and strict documentation builds part of the release check, and enforce the DI-only core contract across the CI Python matrix.
- Remove the side-effecting local release recipe. Release preparation now uses a generated, reviewable pull request and draft GitHub Release, while the separated publisher retains tag, history, artifact, Trusted Publishing, and provenance checks.
0.1.1 - 2026-07-16¶
- Replace the repository and documentation identity with approved path-only SVG masters, deterministic typography, responsive dark and light banners, and a compact favicon derived from the same visual language.
- Centralize brand installation in the shared
repo-brandcommand and remove the duplicated project-local installer and maintainer-only task recipe. - Reuse one provider-neutral
social-preview.pngfor GitHub, Open Graph, and Twitter metadata, with absolute website image URLs and an enforced safe area. - Add the optional FastAPI integration
wireme.fastapiwithFromWebandoverride_web_dependency, installed withuv add 'wireme[fastapi]'. FromWeb[WiredClass]lets FastAPI construct classes whose wired constructors resolve internal dependencies through Wireme.FromWeb[WiredAlias]bridges reusable PEP 695 dependency aliases into FastAPI while preserving the static type, nested resolution, cache configuration, overrides, and resource lifecycle.- Bridged factories support sync, async, generator, and async-generator
functions, callable objects, and
functools.partial, with request-scoped cleanup that runs exactly once after the response, closes nested resources in reverse order, and receives endpoint exceptions. override_web_dependency()temporarily replaces direct FastAPI dependencies and bridged Wireme factories, is nested-safe and exception-safe, and accepts replacements with different parameter lists.- Importing
wireme.fastapiwithout the extra raisesModuleNotFoundErrorwith an actionable install hint;import wiremenever requires FastAPI. - Document that explicit values for injected parameters must be passed by keyword.
@wirenow works on classes, wiring the constructor the class defines; a class without its own__init__is rejected with an actionable error.@wireaccepts configuration:castandcast_resultcontrol pydantic validation per function, andrequiresdeclares side-effect dependencies resolved on every call without appearing as parameters.- Document singleton factories (eager module instance for fail-fast
configuration,
functools.cachefor lazy creation) and clarify thatuse_cache=Truecaches once per wired call, not process-wide. - Document and test applying
@wiredirectly to FastAPI endpoints, including its lifecycle and override tradeoffs compared toFromWeb. - Adopt the keyword-only convention for injected parameters (declared after
*) across all documentation and examples. - Record architecture decisions in
docs/adrand document the SemVer 0.x versioning policy. - Restructure documentation: README.md is a thin landing page and the full
guide lives in
website/docs/guidewith one concept per page. - Cover every capability with a runnable example and add the capability
index
examples/README.md(new:nested.py,singletons.py,requires.py,validation.py,fastapi_endpoints.py,project_defaults.py,method_wiring.py). - Fix nested factories losing wired markers: factory signatures are now
resolved when declared with
wired()orrequires, so PEP 695 aliases behind postponed annotations work at any nesting depth. - Document project-wide defaults through bound decorators and the apply combinator pattern for wiring many methods at once.
- Cover pydantic parameter constraints without models (
Field, pydantic types, custom validators, constrained factory parameters) with tests andexamples/field_constraints.py. - Cover all factory forms (classes, callable instances, static and bound
methods, caller-argument sharing) with tests and
examples/factories.py. - Fix annotation resolution for locally defined names when
wireis used through its configured form. - Publish the documentation as a Zensical site at wireme.mghalix.com with a landing page, production recipes, and "The Wireme way" house-style page.
0.1.0 - 2026-07-15¶
- Add
wire,wired,Wired, andoverride_dependency. - Support sync, async, generator, and async-generator dependencies.
- Hide injected parameters from runtime signatures.
- Restore nested dependency overrides correctly.