Skip to content

Commit

Permalink
chore(release): Release new minor version 2.10.0 (litestar-org#3648)
Browse files Browse the repository at this point in the history
* v2.9.1

* chore(release): Prepare for 2.10.0 release

fix(release): Fixed the regex so it works on versions with more than one digit. eg: 10.10.10

* chore: apply pre commit

---------

Co-authored-by: Janek Nouvertné <25355197+provinzkraut@users.noreply.github.com>
Co-authored-by: Alc-Alc <alc@localhost>
  • Loading branch information
3 people committed Jul 26, 2024
1 parent ffaf561 commit 592b77d
Show file tree
Hide file tree
Showing 3 changed files with 71 additions and 3 deletions.
68 changes: 68 additions & 0 deletions docs/release-notes/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,74 @@
2.x Changelog
=============

.. changelog:: 2.10.0
:date: 2024-07-26

.. change:: Allow creating parent directories for a file store
:type: feature
:pr: 3526

Allow ``mkdir`` True when creating a file store.

.. change:: Add ``logging_module`` parameter to ``LoggingConfig``
:type: feature
:pr: 3578
:issue: 3536

Provide a way in the ``logging_module`` to switch easily from ``logging`` to ``picologging``.

.. change:: Add handler name to exceptions in handler validation
:type: feature
:pr: 3575

Add handler name to exceptions raise by ``_validate_handler_function``.

.. change:: Add strict validation support for Pydantic plugin
:type: feature
:pr: 3608
:issue: 3572

Adds parameters in pydantic plugin to support strict validation and all the ``model_dump`` args

.. change:: Fix signature model signatures clash
:type: bugfix
:pr: 3605
:issue: 3593

Ensures that the functions used by the signature model itself do not interfere with the signature model created.

.. change:: Correctly handle Annotated ``NewType``
:type: bugfix
:pr: 3615
:issue: 3614

Resolves infinite loop in schema generation when a model has an Annotated ``NewType``.

.. change:: Use `ASGIConnection` instead of ``Request`` for ``flash``
:type: bugfix
:pr: 3626

Currently, the ``FlashPlugin`` expects the ``request`` parameter to be a type of ``Request``. However, there's no reason it can't use the parent class ``ASGIConnection``.

Doing this, allows for flash to be called in guards that expect an ``ASGIConnection`` instead of ``Request``:

.. code-block:: python
def requires_active_user(connection: ASGIConnection, _: BaseRouteHandler) -> None:
if connection.user.is_active:
return
msg = "Your user account is inactive."
flash(connection, msg, category="error")
raise PermissionDeniedException(msg)
.. change:: Allow returning ``Response[None]`` from head route handlers
:type: bugfix
:pr: 3641
:issue: 3640

Fix a bug where the validation of the return annotation for the ``head`` route handler was too strict and would not allow returning a ``Response[None]``.


.. changelog:: 2.9.1
:date: 2024-06-21

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ maintainers = [
name = "litestar"
readme = "README.md"
requires-python = ">=3.8,<4.0"
version = "2.9.1"
version = "2.10.0"

[project.urls]
Blog = "https://blog.litestar.dev"
Expand Down
4 changes: 2 additions & 2 deletions tools/prepare_release.py
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ def update_pyproject_version(new_version: str) -> None:
# can't use tomli-w / tomllib for this as is messes up the formatting
pyproject = pathlib.Path("pyproject.toml")
content = pyproject.read_text()
content = re.sub(r'(\nversion ?= ?")\d\.\d\.\d("\s*\n)', rf"\g<1>{new_version}\g<2>", content)
content = re.sub(r'(\nversion ?= ?")\d+\.\d+\.\d+("\s*\n)', rf"\g<1>{new_version}\g<2>", content)
pyproject.write_text(content)


Expand Down Expand Up @@ -408,7 +408,7 @@ def cli(
if base is None:
base = _get_latest_tag()

if not re.match(r"\d\.\d\.\d", version):
if not re.match(r"\d+\.\d+\.\d+", version):
click.secho(f"Invalid version: {version!r}")
quit(1)

Expand Down

0 comments on commit 592b77d

Please sign in to comment.