1. 15
  1.  

  2. 3

    I’m somewhat excited about the ASGI support. My hope is that this will mean that support for Server-Sent Events (SSE) will either become standard, or be provided by a less intrusive library than what you’d have to use now.

    1. 2

      Nothing more productive than django + DRF

      1. 1

        I don’t exactly get what 3.0 adds, since Channels and Daphne existed for a while, and were part of the Django project.

        I wish they made the ORM fully async, but that would be too breaking of a change.

        1. 5

          If you meant in the sense that you were expecting more features from a major version bump then the version bump comes from their release cadence & deprecation policy (new since v2) which sees the major version bumped for the first version after every LTS release (which 2.2 was).

          But if that wasn’t what you meant, then this talk by Andrew Godwin (PyconAU, Aug ‘19) gives a much deeper description of what’s going on under the hood to pave way for more exciting async features. v3 is laying the foundations.

          1. 3

            Personally, the two things I’m excited about in this release are:

            • Exclusion constraints. So many things get easier to model and validate with them.
            • The support for choice enums. This seems like a small thing, but it’s really a huge quality-of-life improvement.

            Plus the end of the Python 2 compatibility shims, because that’s a reminder of how close I am to finally getting to write modern Python in the Django apps I distribute.

            1. 1

              Making the ORM fully async is also next to impossible without a herculean amount of work because all of the database libraries would have to be modified to support async as well.

              There’s a really good talk (by the creator of Daphne) that was given at DjangoCon this year (https://www.youtube.com/watch?v=d9BAUBEyFgM) about the challenges of retrofitting async-await into django and plans to get there.

              1. 5

                Zzzeek (the creator of SQLAlchemy) wrote a very detailed blog post a few years ago about how everyone thinks they want async for their ORM, but it’s really not that great of an idea:

                https://techspot.zzzeek.org/2015/02/15/asynchronous-python-and-databases/

                1. 3

                  Making the ORM fully async is also next to impossible without a herculean amount of work because all of the database libraries would have to be modified to support async as well.

                  Also, I’m not too sure if a fully async ORM would be worth the effort. Sure, it might be an improvement, but if your database queries are taking so much time that they need to be async’d, maybe it’s time to optimize some queries.