Skip to content

Releases: ZechCodes/Bevy

v2.0.2

01 Nov 20:57
d7ad690
Compare
Choose a tag to compare
  • Fix forward references raising NameError by resolving annotations lazily #7 #8
  • Add support for data classes #9

v2.0.1

31 Aug 16:36
Compare
Choose a tag to compare

Improve the @inject decorator so that inspecting async functions still reveals them to be async functions.

v2.0.0

07 May 23:26
Compare
Choose a tag to compare

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

07 May 17:20
Compare
Choose a tag to compare

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

07 May 16:20
Compare
Choose a tag to compare

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

23 Apr 20:31
Compare
Choose a tag to compare
Pre-release
Correct incorrect import

v2.0.0 Beta 2

17 Apr 00:09
Compare
Choose a tag to compare
v2.0.0 Beta 2 Pre-release
Pre-release

Corrects some minor issues in the readme.

v2.0.0 Beta 1

16 Apr 23:31
Compare
Choose a tag to compare
v2.0.0 Beta 1 Pre-release
Pre-release

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

24 Jul 17:55
Compare
Choose a tag to compare

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

03 Jul 17:29
1cdef53
Compare
Choose a tag to compare
  • 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