Skip to content

Conversation

@xelandernt
Copy link
Collaborator

Resolves #203

@xelandernt xelandernt self-assigned this Oct 14, 2025
@xelandernt xelandernt added enhancement New feature or request v3 Relevant to version 3.* labels Oct 14, 2025
@codecov
Copy link

codecov bot commented Oct 14, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

Flag Coverage Δ
unittests 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
tests/experimental/test_container_1.py 100.00% <100.00%> (ø)
tests/experimental/test_container_2.py 100.00% <100.00%> (ø)
tests/experimental/test_lazy_provider.py 100.00% <100.00%> (ø)
that_depends/experimental/__init__.py 100.00% <100.00%> (ø)
that_depends/experimental/providers.py 100.00% <100.00%> (ø)
that_depends/meta.py 100.00% <100.00%> (ø)
that_depends/providers/context_resources.py 100.00% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@xelandernt xelandernt marked this pull request as ready for review October 17, 2025 22:11
@xelandernt xelandernt requested a review from Copilot October 17, 2025 22:11
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces a new LazyProvider feature that enables lazy loading of providers through import strings, addressing circular dependency issues between containers. The main change removes the abc.ABC inheritance from SupportsContext to support proper multiple inheritance, and adds comprehensive implementation and testing of the lazy provider functionality.

  • Implements LazyProvider class for lazy importing of providers using string-based references
  • Refactors SupportsContext to remove abc.ABC inheritance and fixes MRO issues in BaseContainerMeta
  • Adds version constraint for faststream dependency

Reviewed Changes

Copilot reviewed 10 out of 11 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
that_depends/providers/context_resources.py Removes abc.ABC inheritance from SupportsContext to enable proper multiple inheritance
that_depends/meta.py Reorders parent classes in BaseContainerMeta to fix MRO with updated SupportsContext
that_depends/experimental/providers.py Implements new LazyProvider class with full provider protocol support
that_depends/experimental/init.py Exports LazyProvider from experimental module
tests/experimental/test_lazy_provider.py Adds validation tests for LazyProvider initialization
tests/experimental/test_container_2.py Adds comprehensive integration tests for lazy provider functionality
tests/experimental/test_container_1.py Adds circular dependency test case
pyproject.toml Adds version constraint for faststream dependency
mkdocs.yml Adds documentation navigation for lazy provider
docs/experimental/lazy.md Adds user documentation for lazy provider feature

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@xelandernt xelandernt merged commit 51958c5 into main Oct 17, 2025
7 checks passed
@xelandernt xelandernt deleted the lazy_provider branch November 4, 2025 10:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request v3 Relevant to version 3.*

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Lazy Provider

2 participants