Releases: ZechCodes/Bevy
v2.0.2
v2.0.1
v2.0.0
Bevy v2.0 is ready for use! Many features are still coming, what Bevy has right now is enough for the average project to be successful!
Full Changelog: v1.3.12...v2.0.0
v2.0.0 Beta 6 - Correct Provider Priority
This update corrects a bug where newly added providers were given a lower priority than existing providers.
Full Changelog: v2.0.0b5...v2.0.0b6
v2.0.0 Beta 5 - Make Providers Stateless
Simplify providers by moving the cache state onto the repository object. A repository cache object is now passed to provider methods. This cache object contains the current state of the provider for the current repository. This allows providers to be passed from one repository to another without using a clone.
Full Changelog: v2.0.0b4...v2.0.0b5
v2.0.0b4 - Fix broken import
Correct incorrect import
v2.0.0 Beta 2
Corrects some minor issues in the readme.
v2.0.0 Beta 1
This is a complete rewrite and reenvisioning of Bevy. Bevy now uses contextvars, so the context state no longer has to be attached to class instances and functions. This allows for cleaner syntax and simple support for both classes and functions!
Version 2.0 also introduces the new Annotated Provider. The Annotated Provider looks for typing.Annotated
hints, which allows for cached instances of the same type to coexist in the same repository.
Version 2.0 also does away with needing to deal with a context repository. You can just write a class, annotate the attributes, and assign them the dependency instance to have them injected at runtime when needed. Same goes for functions, use the inject decorator, annotate your parameters, and assign them the dependency instance as their default value, Bevy will handle everything when you call the function.
v1.3.12 - Improve getting an object's bound context
Fix a bug where the bevy context descriptor would return None
if an object had a __bool__
method that returned False
. Also the descriptor now correctly handles objects that do not have a __bevy_context__
attribute.
v1.3.11 - Make it easier to get and create
- Rename the old get method to find (return default if not found)
- Create a new get method (attempt to create if not found)
- Change the add_to_context parameter to cache