Tortoise-orm

Latest version: v0.20.1

Safety actively analyzes 628919 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 13 of 23

0.14.0

Not secure
------
.. caution::
**This release drops support of Python 3.5:**

Tortoise ORM now requires a minimum of CPython 3.6 or PyPy3.6-7.1

Enhancements:
^^^^^^^^^^^^^
- Models, Fields & QuerySets have significant type annotation improvements,
leading to better IDE integration and more comprehensive static analysis.
- Fetching records from the DB is now up to 25% faster.
- Database functions ``Trim()``, ``Length()``, ``Coalesce()``, ``Lower()``, ``Upper()`` added to tortoise.functions module.
- Annotations can be selected inside ``Queryset.values()`` and ``Queryset.values_list()`` expressions.
- Added support for Python 3.8
- The Foreign Key property is now ``await``-able as long as one didn't populate it via ``.prefetch_related()``
- One can now specify compound indexes in the ``Meta:`` class using ``indexes``. It works just like ``unique_together``.

Bugfixes:
^^^^^^^^^
- The generated index name now has significantly lower chance of collision.
- The compiled SQL query contains HAVING and GROUP BY only for aggregation functions.
- Fields for FK relations are quoted properly.
- Fields are quoted properly in ``UNIQUE`` statements.
- Fields are quoted properly in ``KEY`` statements.
- Comment Fields are quoted properly in PostgreSQL dialect.
- ``unique_together`` will correctly map the foreign key if referenced by name.

Deprecations:
^^^^^^^^^^^^^
- ``import from tortoise.aggregation`` is deprecated, please do ``import from tortoise.functions`` instead.

Breaking Changes:
^^^^^^^^^^^^^^^^^
- The hash used to make generated indexes unique has changed.
The old algorithm had a very high chance of collisions,
the new hash algorithm is much better in this regard.
- Dropped support for Python 3.5

.. rst-class:: emphasize-children

0.13.12

Not secure
-------
- Reverted "The ``Field`` class now calls ``super().__init__``, so mixins are properly initialised."
as it was causing issues on Python 3.6.

0.13.11

Not secure
-------
- Fixed the ``_FieldMeta`` class not to checking if the 1st base class was Field, so would break with mixins.
- The ``Field`` class now calls ``super().__init__``, so mixins are properly initialised.

0.13.10

Not secure
-------
- Names ForeignKey constraints in a consistent way

0.13.9

Not secure
------
- Fields can have 2nd base class which makes IDEs know python type (str, int, datetime...) of the field.
- The ``type`` parameter of ``Field.__init__`` is removed, instead we use the 2nd base class
- Foreign keys and indexes are now defined correctly in MySQL so that they take effect as expected
- MySQL now doesn't warn of unsafe index creation anymore

0.13.8

Not secure
------
- Fixed bug in schema creation for MySQL where non-int PK did not get declared properly (195)

Page 13 of 23

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.