This file contains important information for maintaining and developing the Bevy dependency injection framework.
Update the version in pyproject.toml:
[tool.poetry]
version = "3.1.1" # Update this lineCreate release notes for the new version:
python .github/create_release_notes.py 3.1.1This creates RELEASE_NOTES_3.1.1.md with a template. Edit this file to include:
- Features: New functionality added
- Improvements: Enhancements to existing features
- Bug Fixes: Issues resolved
- Breaking Changes: Any API changes (if applicable)
- Migration Guide: Instructions for upgrading (if needed)
# Ensure main branch is up to date
git checkout main
git pull origin main
# Commit version and release notes changes
git add pyproject.toml RELEASE_NOTES_3.1.1.md
git commit -m "Prepare release 3.1.1"
git push origin main
# Create and push version tag
git tag v3.1.1
git push origin v3.1.1- Watch GitHub Actions tab for the release workflow
- Verify GitHub release was created successfully
- Check that PyPI package was published
- Test installation:
pip install bevy==3.1.1
Run these commands before releasing:
# Run full test suite
poetry run python -m pytest tests/ -v
# Run type checking
poetry run mypy bevy/
# Run linting (if configured)
poetry run ruff check bevy/bevy/- Main package codecontainers.py- Core dependency injection containerfactories.py- Factory registration and managementhooks.py- Hook system for injection lifecycleinjections.py- Injection decorators and utilitiesregistries.py- Type and dependency registries
tests/- Test suitedocs/- Documentation.github/- GitHub Actions workflows and release automation
- Child containers inherit from parent containers
container.get()and function injection behave identically- Both check parent containers for existing instances
- Factory functions are used as cache keys
- Check for qualified dependencies first
- Use default factory if specified (takes precedence over existing instances)
- Fall back to normal resolution flow
- Traverse parent containers if needed
- Factory functions (not types) are used as cache keys
- Ensures identical behavior between
container.get()and@inject - Maintains proper parent-child inheritance and sibling isolation
- Create feature branch from
main - Implement changes with tests
- Run test suite locally
- Create pull request to
main - After merge, follow release procedure above
- Check for test contamination (global registry state)
- Run individual test files to isolate issues
- Verify imports and dependencies
- Ensure version in
pyproject.tomlmatches tag - Check GitHub Actions logs for detailed errors
- Verify PyPI trusted publisher is configured correctly
- Remember that factory functions are cache keys
- Check parent-child relationships in container hierarchy
- Verify qualified vs unqualified dependency resolution
Plan Document: feature-planning/missing-features/async-dependency-resolution.md
Objective: Implement seamless async/await support for dependency injection with automatic detection and unified API (T | Awaitable[T]).
Key Rules:
- Test-Driven Development: All tasks must have tests written BEFORE implementation
- Task Completion: Tasks are only marked complete when ALL related tests are passing
- Zero Breaking Changes: Existing sync functionality must remain unchanged
- Performance: Sync-only paths must have minimal overhead
Current Progress: Planning complete, implementation not started
Next Steps: Begin Phase 1 - Foundation and Analysis
- Create test suite structure for async dependency resolution
- Implement dependency chain analysis logic
- Add async factory detection capabilities
Testing Commands for This Feature:
# Run async-specific tests (when created)
poetry run python -m pytest tests/test_async_resolution.py -v
# Run full suite to ensure no regressions
poetry run python -m pytest tests/ -v
# Type checking with new return types
poetry run mypy bevy/