Release of the Django 3.0 web framework

Took place web framework release Django 3.0, written in Python and designed for developing web applications. The Django 3.0 branch has been categorized as a regular support release and will get updates until April 2021. The 2.22 LTS branch will be supported until April 2022, and the 1.11 branch until April 2020. Support for the 2.1 branch has been discontinued.

Key improvements:

  • Provided by support for working in asynchronous mode with execution in the form of an ASGI application. Software interface ASGIA (Asynchronous Server Gateway Interface) was developed as a replacement for WSGI, aimed at providing interoperability between servers, frameworks and applications that support asynchronous operation. Support for running using WSGI has been retained, and async-related code is only included when running in ASGI-based environments.

    For asynchronous mode, a separate event loop is implemented, in which it is not allowed to call code marked as β€œasync unsafe”. Such code includes, for example, DBMS (ORM) operations that cannot be used in an asynchronous context (in this case, a SynchronousOnlyOperation error will be displayed) and should be moved to a separate synchronous thread.

  • Added specialized enum types TextChoices, IntegerChoices and Choices, which can be use to define text and integer fields in the model, for example, if it is necessary to store sets of readable labels in the fields, translated into certain features:

    class YearInSchool(models.TextChoices):
    FRESHMAN = 'FR', _('Freshman')
    SOPHOMORE = 'SO', _('Sophomore')
    JUNIOR = 'JR', _('Junior')
    SENIOR = 'SR', _('Senior')
    GRADUATE = 'GR', _('Graduate')

  • Added the ability to specify expressions that output BooleanField, directly in QuerySet filters without first annotating them before applying them to filter annotations.
  • MariaDB 10.1 and newer releases are officially supported.
  • Class implemented for PostgreSQL ExclusionConstraint to use expression based constraints EXCLUDES;
  • Support for Python 3.5 has been dropped.

Source: opennet.ru

Add a comment