Piccolo

Latest version: v1.22.0

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

Scan your dependencies

Page 17 of 53

0.75.0

Not secure
------

Changed how ``piccolo.utils.sync.run_sync`` works, to prevent a warning on
Python 3.10. Thanks to Drapersniper for reporting this issue.

Lots of documentation improvements - particularly around testing, and Docker
deployment.

-------------------------------------------------------------------------------

0.74.4

Not secure
------

``piccolo schema generate`` now outputs a warning when it can't detect the
``ON DELETE`` and ``ON UPDATE`` for a ``ForeignKey``, rather than raising an
exception. Thanks to theelderbeever for reporting this issue.

``run_sync`` doesn't use the connection pool by default anymore. It was causing
issues when an app contained sync and async code. Thanks to WintonLi for
reporting this issue.

Added a tutorial to the docs for using Piccolo with an existing project and
database. Thanks to virajkanwade for reporting this issue.

-------------------------------------------------------------------------------

0.74.3

Not secure
------

If you had a table containing an array of ``BigInt``, then migrations could
fail:

.. code-block:: python

from piccolo.table import Table
from piccolo.columns.column_types import Array, BigInt

class MyTable(Table):
my_column = Array(base_column=BigInt())

It's because the ``BigInt`` base column needs access to the parent table to
know if it's targeting Postgres or SQLite. See `PR 501 <https://github.com/piccolo-orm/piccolo/pull/501>`_.

Thanks to cheesycod for reporting this issue.

-------------------------------------------------------------------------------

0.74.2

Not secure
------

If a user created a custom ``Column`` subclass, then migrations would fail.
For example:

.. code-block:: python

class CustomColumn(Varchar):
def __init__(self, custom_arg: str = '', *args, **kwargs):
self.custom_arg = custom_arg
super().__init__(*args, **kwargs)

property
def column_type(self):
return 'VARCHAR'

See `PR 497 <https://github.com/piccolo-orm/piccolo/pull/497>`_. Thanks to
WintonLi for reporting this issue.

-------------------------------------------------------------------------------

0.74.1

Not secure
------

When using ``pip install piccolo[all]`` on Windows it would fail because uvloop
isn't supported. Thanks to jack1142 for reporting this issue.

-------------------------------------------------------------------------------

0.74.0

Not secure
------

We've had the ability to bulk modify rows for a while. Here we append ``'!!!'``
to each band's name:

.. code-block:: python

>>> await Band.update({Band.name: Band.name + '!!!'}, force=True)

It only worked for some columns - ``Varchar``, ``Text``, ``Integer`` etc.

We now allow ``Date``, ``Timestamp``, ``Timestamptz`` and ``Interval`` columns
to be bulk modified using a ``timedelta``. Here we modify each concert's start
date, so it's one day later:

.. code-block:: python

>>> await Concert.update(
... {Concert.starts: Concert.starts + timedelta(days=1)},
... force=True
... )

Thanks to theelderbeever for suggesting this feature.

-------------------------------------------------------------------------------

Page 17 of 53

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.