Piccolo

Latest version: v1.12.0

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

Scan your dependencies

Page 18 of 50

0.65.1

Not secure
------

Fixed bug with ``BaseUser`` and Piccolo API.

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

0.65.0

Not secure
------

The ``BaseUser`` table hashes passwords before storing them in the database.

When we create a fixture from the ``BaseUser`` table (using ``piccolo fixtures dump``),
it looks something like:

.. code-block:: json

{
"id": 11,
"username": "bob",
"password": "pbkdf2_sha256$10000$abc123",
}

When we load the fixture (using ``piccolo fixtures load``) we need to be
careful in case ``BaseUser`` tries to hash the password again (it would then be a hash of
a hash, and hence incorrect). We now have additional checks in place to prevent
this.

Thanks to mrbazzan for implementing this, and sinisaos for help reviewing.

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

0.64.0

Not secure
------

Added initial support for ``ForeignKey`` columns referencing non-primary key
columns. For example:

.. code-block:: python

class Manager(Table):
name = Varchar()
email = Varchar(unique=True)

class Band(Table):
manager = ForeignKey(Manager, target_column=Manager.email)

Thanks to theelderbeever for suggesting this feature, and with help testing.

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

0.63.1

Not secure
------

Fixed an issue with the ``value_type`` of ``ForeignKey`` columns when
referencing a table with a custom primary key column (such as a ``UUID``).

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

0.63.0

Not secure
------

Added an ``exclude_imported`` option to ``table_finder``.

.. code-block:: python

APP_CONFIG = AppConfig(
table_classes=table_finder(['music.tables'], exclude_imported=True)
)

It's useful when we want to import ``Table`` subclasses defined within a
module itself, but not imported ones:

.. code-block:: python

tables.py
from piccolo.apps.user.tables import BaseUser excluded
from piccolo.columns.column_types import ForeignKey, Varchar
from piccolo.table import Table


class Musician(Table): included
name = Varchar()
user = ForeignKey(BaseUser)

This was also possible using tags, but was less convenient. Thanks to sinisaos
for reporting this issue.

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

0.62.3

Not secure
------

Fixed the error message in ``LazyTableReference``.

Fixed a bug with ``create_pydantic_model`` with nested models. For example:

.. code-block:: python

create_pydantic_model(Band, nested=(Band.manager,))

Sometimes Pydantic couldn't uniquely identify the nested models. Thanks to
wmshort and sinisaos for their help with this.

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

Page 18 of 50

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.