Skip to content

Releases: illagrenan/django-asgi-lifespan

v0.4.0

15 Oct 19:59
Compare
Choose a tag to compare

Added

  • Add support for Python 3.13.

👉 See the CHANGELOG: https://illagrenan.github.io/django-asgi-lifespan/changelog/#040-2024-10-15

v0.3.2

27 Sep 20:25
Compare
Choose a tag to compare

Added

  • Add support for Django 5.1.
  • Test examples using Pyright.

Changed

  • Fix and improve typehints. Use AbstractAsyncContextManager type for lifespan manager function (this should fix Pyright errors as reported in the issue 99).

👉 See the CHANGELOG: https://illagrenan.github.io/django-asgi-lifespan/changelog/#032-2024-09-26

v0.3.1

11 Mar 09:50
3fdc392
Compare
Choose a tag to compare

Changed

  • AsyncMiddleware is now called LifespanStateMiddleware, the original name was too generic (it was a copy-paste from the Django documentation). The original name will remain as an alias for LifespanStateMiddleware, so existing installations should not be affected.

👉 See the CHANGELOG: https://illagrenan.github.io/django-asgi-lifespan/changelog/#031-2024-03-11

v0.3.0

05 Mar 13:16
Compare
Choose a tag to compare

Added

  • Lifespan async context managers are now supported (inspired by Lifespan events in FastAPI). Global variables are no longer necessary for the state management; objects required throughout the application lifecycle are now held in the lifespan scope state. Further details can be found in the ASGI spec. Previous signals (startup and shutdown) remain supported with no plans for their removal. The new, preferred method to manage state is via an async context manager.
  • All major ASGI servers have been tested, an overview of their support is in separate page. It is worth mentioning that the gunicorn+uvicorn combo is now working without problems.
  • Development: Add support for pre-commit.

Changed

  • More tests.
  • Better documentation.

Breaking changes ⚠️

  • Drop support for Django >=4.0.0, <4.2.0 and >=5.0.0, <5.0.3. Supported versions include ^4.2 || ^5.0.3 (^4.2 is LTS).
  • If lifespan signals fail, two new events are sent to the ASGI server: lifespan.startup.failed and lifespan.shutdown.failed. This could stop servers, like uvicorn, from starting if a lifespan.startup.failed event happens. This update makes it easier to find and fix errors, as they are not hidden anymore.

👉 See the CHANGELOG: https://illagrenan.github.io/django-asgi-lifespan/changelog/#030-2024-03-05

v0.2.0

09 Feb 14:48
935d9fd
Compare
Choose a tag to compare

Added

  • Support for Django 5.
  • Support for Python 3.12.

👉 See the CHANGELOG: https://illagrenan.github.io/django-asgi-lifespan/changelog/#020-2024-02-09

v0.1.0

03 Aug 20:20
Compare
Choose a tag to compare