Skip to content

Commit

Permalink
bumped version
Browse files Browse the repository at this point in the history
  • Loading branch information
dantownsend committed Dec 23, 2023
1 parent d05c2da commit 17e9448
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 1 deletion.
34 changes: 34 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,40 @@
Changes
=======

1.2.0
-----

There's now an alternative syntax for joins, which works really well with
static type checkers like Mypy and Pylance.

The traditional syntax (which continues to work as before):

.. code-block:: python
# Get the band name, and the manager's name from a related table
await Band.select(Band.name, Band.manager.name)
The alternative syntax is as follows:

.. code-block:: python
await Band.select(Band.name, Band.manager._.name)
Note how we use ``._.`` instead of ``.`` after a ``ForeignKey``.

This offers a considerably better static typing experience. In the above
example, type checkers know that ``Band.manager._.name`` refers to the ``name``
column on the ``Manager`` table. This means typos can be detected, and code
navigation is easier.

Other changes
~~~~~~~~~~~~~

* Improve static typing for ``get_related``.
* Added support for the ``esmerald`` ASGI framework.

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

1.1.1
-----

Expand Down
2 changes: 1 addition & 1 deletion piccolo/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__VERSION__ = "1.1.1"
__VERSION__ = "1.2.0"

0 comments on commit 17e9448

Please sign in to comment.